public abstract class AbstractRedirector extends java.lang.Object implements Redirector
Redirector
Redirector.Context
Modifier and Type | Field and Description |
---|---|
protected Executor |
executor |
protected org.slf4j.Logger |
log |
protected static java.lang.String |
ROUTED_FROM |
Constructor and Description |
---|
AbstractRedirector(Executor ex) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
alreadyRouted(Ice.Current current) |
protected java.lang.String |
findProxy(Redirector.Context ctx,
java.lang.String redirect) |
Glacier2.SessionPrx |
getProxyOrNull(Redirector.Context ctx,
java.lang.String userId,
Glacier2.SessionControlPrx control,
Ice.Current current)
Returns null early if the
Current has already once been
routed by a Redirector implementation, returns an existing
session if it can be found, or returns a null. |
protected java.lang.String |
getRedirect(Redirector.Context ctx)
Returns the current redirect, to which all calls to
Redirector.getProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
will be pointed. |
protected boolean |
initializeRedirect(Redirector.Context ctx,
java.lang.String managerUuid)
Set the new redirect value if null, or if the uuid is null or empty, then
the existing redirect will be removed.
|
protected java.lang.String |
nodeProxyQuery(Redirector.Context ctx,
java.lang.String uuid,
java.lang.String query) |
protected Glacier2.SessionPrx |
obtainProxy(java.lang.String proxyString,
Redirector.Context ctx,
java.lang.String userId,
Glacier2.SessionControlPrx control,
Ice.Current current) |
protected java.lang.String |
proxyForSession(Redirector.Context ctx,
java.lang.String sessionUuid) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
chooseNextRedirect, handleRingShutdown
protected static final java.lang.String ROUTED_FROM
protected final org.slf4j.Logger log
protected final Executor executor
public AbstractRedirector(Executor ex)
public Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx, java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException
Current
has already once been
routed by a Redirector
implementation, returns an existing
session if it can be found, or returns a null.getProxyOrNull
in interface Redirector
userId
- Not null.Glacier2.CannotCreateSessionException
ROUTED_FROM
protected boolean alreadyRouted(Ice.Current current)
protected Glacier2.SessionPrx obtainProxy(java.lang.String proxyString, Redirector.Context ctx, java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException
Glacier2.CannotCreateSessionException
protected java.lang.String getRedirect(Redirector.Context ctx)
Redirector.getProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
will be pointed. May be null, but is typically set to a non-null value
when the first Ring
joins the cluster.protected boolean initializeRedirect(Redirector.Context ctx, java.lang.String managerUuid)
protected java.lang.String findProxy(Redirector.Context ctx, java.lang.String redirect)
protected java.lang.String proxyForSession(Redirector.Context ctx, java.lang.String sessionUuid)
protected java.lang.String nodeProxyQuery(Redirector.Context ctx, java.lang.String uuid, java.lang.String query)
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.