danbikel.switchboard
Class Failover
java.lang.Object
danbikel.util.proxy.Reconnect
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Failover
public Failover(Object server,
Client client,
SwitchboardRemote switchboard)
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
Author: Dan Bikel.