ome.services.blitz.redirect
Class ConfigRedirector

java.lang.Object
  extended by ome.services.blitz.redirect.AbstractRedirector
      extended by ome.services.blitz.redirect.ConfigRedirector
All Implemented Interfaces:
Redirector

public class ConfigRedirector
extends AbstractRedirector

Redirector implementation which uses the REDIRECT config key via LocalConfig to know which Node is currently active.

Since:
Beta-4.0-RC2

Nested Class Summary
 
Nested classes/interfaces inherited from interface ome.services.blitz.redirect.Redirector
Redirector.Context
 
Field Summary
 
Fields inherited from class ome.services.blitz.redirect.AbstractRedirector
executor, log, ROUTED_FROM
 
Constructor Summary
ConfigRedirector(Executor ex)
           
 
Method Summary
 void chooseNextRedirect(Redirector.Context ctx, Set<String> nodeUuids)
          Gives the Redirector a chance to configure the next appropriate redirect based on the Set of current Node uuids.
 Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx, String userId, Glacier2.SessionControlPrx control, Ice.Current current)
          Create or retrieve and returns a SessionPrx which the current method takes control of.
 void handleRingShutdown(Redirector.Context ctx, String downUuid)
          Gives the Redirector a chance to remove the current Ring when it is being shutdown.
 
Methods inherited from class ome.services.blitz.redirect.AbstractRedirector
alreadyRouted, findProxy, getRedirect, initializeRedirect, nodeProxyQuery, obtainProxy, proxyForSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigRedirector

public ConfigRedirector(Executor ex)
Method Detail

getProxyOrNull

public Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx,
                                          String userId,
                                          Glacier2.SessionControlPrx control,
                                          Ice.Current current)
                                   throws Glacier2.CannotCreateSessionException
Create or retrieve and returns a SessionPrx which the current method takes control of. If it is not returned, then it should be properly destroyed.

Specified by:
getProxyOrNull in interface Redirector
Overrides:
getProxyOrNull in class AbstractRedirector
Parameters:
userId - Not null.
control -
current -
Returns:
Possibly null.
Throws:
Glacier2.CannotCreateSessionException
See Also:
AbstractRedirector.ROUTED_FROM

chooseNextRedirect

public void chooseNextRedirect(Redirector.Context ctx,
                               Set<String> nodeUuids)
Description copied from interface: Redirector
Gives the Redirector a chance to configure the next appropriate redirect based on the Set of current Node uuids.


handleRingShutdown

public void handleRingShutdown(Redirector.Context ctx,
                               String downUuid)
Description copied from interface: Redirector
Gives the Redirector a chance to remove the current Ring when it is being shutdown.



OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.