ome.services.blitz.redirect
Class AbstractRedirector
java.lang.Object
ome.services.blitz.redirect.AbstractRedirector
- All Implemented Interfaces:
- Redirector
- Direct Known Subclasses:
- ConfigRedirector, ScaleRedirector
public abstract class AbstractRedirector
- extends Object
- implements Redirector
Base Redirector
- Since:
- Beta-4.0-RC2
Method Summary |
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
#getProxyOrNull(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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROUTED_FROM
protected static final String ROUTED_FROM
- See Also:
- Constant Field Values
log
protected final org.apache.commons.logging.Log log
executor
protected final Executor executor
AbstractRedirector
public AbstractRedirector(Executor ex)
getProxyOrNull
public Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx,
String userId,
Glacier2.SessionControlPrx control,
Ice.Current current)
throws Glacier2.CannotCreateSessionException
- 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.
- Specified by:
getProxyOrNull
in interface Redirector
userId
- Not null.
- Returns:
- Possibly null.
- Throws:
Glacier2.CannotCreateSessionException
- See Also:
ROUTED_FROM
alreadyRouted
protected boolean alreadyRouted(Ice.Current current)
obtainProxy
protected Glacier2.SessionPrx obtainProxy(String proxyString,
Redirector.Context ctx,
String userId,
Glacier2.SessionControlPrx control,
Ice.Current current)
throws Glacier2.CannotCreateSessionException
- Throws:
Glacier2.CannotCreateSessionException
getRedirect
protected String getRedirect(Redirector.Context ctx)
- Returns the current redirect, to which all calls to
#getProxyOrNull(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.
initializeRedirect
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. Otherwise the value is set if it
is currently missing.
findProxy
protected String findProxy(Redirector.Context ctx,
String redirect)
proxyForSession
protected String proxyForSession(Redirector.Context ctx,
String sessionUuid)
nodeProxyQuery
protected String nodeProxyQuery(Redirector.Context ctx,
String uuid,
String query)
OmeroJava Api
Version: Beta-4.2.0-r7571-b29
Copyright © 2009 The University of Dundee. All Rights Reserved.