|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.rmi.server.RemoteRefStateless
public class RemoteRefStateless
A stub handler that manages reconnecting to another server instance provided a method call fails.
Note that this class does NOT inherit from RemoteRef - despite what
the name mignt suggest. This is because this class, by definition, does not
correspond to a single server endpoint, but to multiple server endpoints.
Indeed, an instance of this class corresponds to all servers that were bound under a given name.
This design might review eventually, to provide a more consistent class hierarchy.
| Nested Class Summary | |
|---|---|
static class |
RemoteRefStateless.ServiceInfo
|
| Field Summary | |
|---|---|
protected java.lang.String |
_domain
|
protected boolean |
_isRegistered
|
protected java.lang.String |
_mcastAddress
|
protected int |
_mcastPort
|
protected javax.naming.Name |
_name
|
protected OID |
_oid
|
protected java.util.List |
_serviceInfos
|
| Constructor Summary | |
|---|---|
RemoteRefStateless()
Constructor for RemoteRefStateless. |
|
RemoteRefStateless(javax.naming.Name name,
java.lang.String domain)
Creates an instance of this class |
|
| Method Summary | |
|---|---|
protected RemoteRefStateless.ServiceInfo |
acquire()
|
void |
addSibling(RemoteRefStateless other)
Adds another ref's information to this instance. |
protected boolean |
clean()
|
protected java.lang.Object |
doInvoke(RemoteRefStateless.ServiceInfo info,
java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
|
boolean |
equals(java.lang.Object o)
|
static RemoteRefStateless |
fromRemoteRefs(javax.naming.Name name,
java.lang.String domain,
java.util.List remoteRefs)
Returns a stateless remote reference. |
OID |
getOID()
Returns the object identifier of the remote object corresponding to this instance. |
protected java.lang.Object |
handleError(RemoteRefStateless.ServiceInfo info,
java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params,
java.lang.Throwable err)
|
int |
hashCode()
|
java.lang.Object |
invoke(java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
|
boolean |
isValid()
|
void |
readExternal(java.io.ObjectInput in)
|
protected RemoteRefStateless.ServiceInfo |
removeAcquire(RemoteRefStateless.ServiceInfo toRemove)
|
protected java.lang.Object |
sendCommand(RMICommand cmd)
|
java.lang.String |
toString()
|
StubContainer |
toStubContainer(java.lang.Object proxy)
Returns this instance's stub container. |
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected javax.naming.Name _name
protected java.lang.String _domain
protected java.lang.String _mcastAddress
protected int _mcastPort
protected OID _oid
protected transient boolean _isRegistered
protected java.util.List _serviceInfos
| Constructor Detail |
|---|
public RemoteRefStateless()
public RemoteRefStateless(javax.naming.Name name,
java.lang.String domain)
| Method Detail |
|---|
public OID getOID()
StubInvocationHandler
getOID in interface StubInvocationHandlerOID.StubInvocationHandler.getOID()
public java.lang.Object invoke(java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.ThrowableInvocationHandler.invoke(Object, Method, Object[])public boolean isValid()
isValid in interface HealthCheckHealthCheck.isValid()public StubContainer toStubContainer(java.lang.Object proxy)
StubInvocationHandler
toStubContainer in interface StubInvocationHandlerStubContainerStubInvocationHandler.toStubContainer(Object)
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionExternalizable.readExternal(ObjectInput)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionExternalizable.writeExternal(ObjectOutput)
public static RemoteRefStateless fromRemoteRefs(javax.naming.Name name,
java.lang.String domain,
java.util.List remoteRefs)
remoteRefs - a list of RemoteRefname - the name of the service to which the returned object corresponds.domain - the name of the domain to which the service belongs.
RemoteRefStateless instance.public void addSibling(RemoteRefStateless other)
other - a RemoteRefStateless.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected boolean clean()
protected java.lang.Object sendCommand(RMICommand cmd)
throws java.lang.Throwable
java.lang.Throwable
protected java.lang.Object doInvoke(RemoteRefStateless.ServiceInfo info,
java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params)
throws java.lang.Throwable
java.lang.Throwable
protected RemoteRefStateless.ServiceInfo acquire()
throws java.rmi.RemoteException
java.rmi.RemoteException
protected RemoteRefStateless.ServiceInfo removeAcquire(RemoteRefStateless.ServiceInfo toRemove)
throws java.rmi.RemoteException
java.rmi.RemoteException
protected java.lang.Object handleError(RemoteRefStateless.ServiceInfo info,
java.lang.Object obj,
java.lang.reflect.Method toCall,
java.lang.Object[] params,
java.lang.Throwable err)
throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||