org.sapia.ubik.rmi.server
Class RemoteRefReliable
java.lang.Object
org.sapia.ubik.rmi.server.RemoteRef
org.sapia.ubik.rmi.server.RemoteRefEx
org.sapia.ubik.rmi.server.RemoteRefReliable
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, java.lang.reflect.InvocationHandler, HealthCheck, StubInvocationHandler
public class RemoteRefReliable
- extends RemoteRefEx
- implements HealthCheck
A stub handler that manages reconnecting to another server instance
provided a method call fails.
- Copyright:
- Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
- License:
- Read the license.txt file of the jar or visit the
license page at the Sapia OSS web site
- See Also:
- Serialized Form
|
Field Summary |
protected java.lang.String |
_url
|
|
Method Summary |
protected java.lang.Object |
doFailOver(java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params,
java.lang.Throwable err)
Implements fail-over logic. |
java.lang.Object |
invoke(java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
|
protected java.lang.Object |
onShutdown(java.lang.Object proxy,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
setUp(java.lang.String url)
Sets this handler's server URL. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_url
protected java.lang.String _url
RemoteRefReliable
public RemoteRefReliable()
- Constructor for StubHandlerReliable.
RemoteRefReliable
public RemoteRefReliable(OID oid,
ServerAddress serverAddress)
- Creates an instance of this class, with the given object and host
identifiers.
- Parameters:
oid - an OIDserverAddress - a ServerAddress
setUp
public void setUp(java.lang.String url)
- Sets this handler's server URL.
- Parameters:
url - a URL string.
invoke
public java.lang.Object invoke(java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
throws java.lang.Throwable
- Specified by:
invoke in interface java.lang.reflect.InvocationHandler- Overrides:
invoke in class RemoteRefEx
- Throws:
java.lang.Throwable- See Also:
InvocationHandler.invoke(Object, Method, Object[])
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable- Overrides:
readExternal in class RemoteRef
- Throws:
java.io.IOException
java.lang.ClassNotFoundException- See Also:
Externalizable.readExternal(ObjectInput)
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal in interface java.io.Externalizable- Overrides:
writeExternal in class RemoteRef
- Throws:
java.io.IOException- See Also:
Externalizable.writeExternal(ObjectOutput)
onShutdown
protected java.lang.Object onShutdown(java.lang.Object proxy,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
throws java.lang.Throwable
- Overrides:
onShutdown in class RemoteRefEx
- Throws:
java.lang.Throwable- See Also:
RemoteRefEx.onShutdown(Object, Method, Object[])
doFailOver
protected java.lang.Object doFailOver(java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params,
java.lang.Throwable err)
throws java.lang.Throwable
- Implements fail-over logic.
- Throws:
java.lang.Throwable
Copyright © 2010 Sapia OSS. All Rights Reserved.