public abstract class AbstractRedirector extends Object implements Redirector
Redirector
Redirector.Context
Modifier and Type | Field and Description |
---|---|
protected Executor |
executor |
protected org.slf4j.Logger |
log |
protected static String |
ROUTED_FROM |
Constructor and Description |
---|
AbstractRedirector(Executor ex) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
alreadyRouted(Ice.Current current) |
protected String |
findProxy(Redirector.Context ctx,
String redirect) |
Glacier2.SessionPrx |
getProxyOrNull(Redirector.Context ctx,
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 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,
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 String |
nodeProxyQuery(Redirector.Context ctx,
String uuid,
String query) |
protected Glacier2.SessionPrx |
obtainProxy(String proxyString,
Redirector.Context ctx,
String userId,
Glacier2.SessionControlPrx control,
Ice.Current current) |
protected String |
proxyForSession(Redirector.Context ctx,
String sessionUuid) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
chooseNextRedirect, handleRingShutdown
protected static final String ROUTED_FROM
protected final org.slf4j.Logger log
protected final Executor executor
public AbstractRedirector(Executor ex)
public Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx, 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(String proxyString, Redirector.Context ctx, String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException
Glacier2.CannotCreateSessionException
protected 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, String managerUuid)
protected String findProxy(Redirector.Context ctx, String redirect)
protected String proxyForSession(Redirector.Context ctx, String sessionUuid)
protected String nodeProxyQuery(Redirector.Context ctx, String uuid, String query)
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.