Parsing Engine

danbikel.switchboard
Class Failover

java.lang.Object
  extended by danbikel.util.proxy.Reconnect
      extended by danbikel.switchboard.Failover
All Implemented Interfaces:
Serializable, InvocationHandler

public class Failover
extends Reconnect

An RMI invocation handler that gets a new server for switchboard clients in the event of a method invocation failure.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class danbikel.util.proxy.Reconnect
name, stub
 
Constructor Summary
Failover(Object server, Client client, SwitchboardRemote switchboard)
           
 
Method Summary
static Object proxyFor(Object server, Client client, SwitchboardRemote switchboard)
           
protected  void validate()
          Ensures that the server stub on which remote methods will be executed is valid, getting a server instance from the rmiregistry if there was a previous method failure on the stub.
 
Methods inherited from class danbikel.util.proxy.Reconnect
invoke, proxyFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Failover

public Failover(Object server,
                Client client,
                SwitchboardRemote switchboard)
Method Detail

proxyFor

public static Object proxyFor(Object server,
                              Client client,
                              SwitchboardRemote switchboard)

validate

protected void validate()
                 throws RemoteException
Description copied from class: Reconnect
Ensures that the server stub on which remote methods will be executed is valid, getting a server instance from the rmiregistry if there was a previous method failure on the stub. A subclass may override this method if a different type of validation is desired. For example, if for client-side failover, this method may execute some other remote method to get a different server from a registry.

Overrides:
validate in class Reconnect
Throws:
RemoteException

Parsing Engine

Author: Dan Bikel.