org.objectweb.jeremie.libs.stub_factories.std
Class DynamicRef

java.lang.Object
  extended byorg.objectweb.jeremie.libs.stub_factories.std.DynamicRef
All Implemented Interfaces:
java.io.Externalizable, JRMIRef, Reference, java.rmi.server.RemoteRef, java.io.Serializable

public class DynamicRef
extends java.lang.Object
implements JRMIRef

Provides an implementation of a Jeremie reference to a remote object.

A Jeremie reference contains:

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface java.rmi.server.RemoteRef
packagePrefix, serialVersionUID
 
Constructor Summary
DynamicRef(JRMIRef client_ref, DynamicRemote target)
           
 
Method Summary
 void done(java.rmi.server.RemoteCall call)
          Deprecated.  
 Identifier[] getIdentifiers()
          Returns the identifiers contained in this reference.
 java.lang.String getRefClass(java.io.ObjectOutput out)
          Not used; left for compatibility with RemoteRef
 void invoke(java.rmi.server.RemoteCall call)
          Deprecated.  
 java.lang.Object invoke(java.rmi.Remote obj, java.lang.reflect.Method method, java.lang.Object[] params, long opnum)
          Carries out a remote method invocation and either returns the result of the invocation is successful, otherwise an exception.
 java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject obj, java.rmi.server.Operation[] op, int opnum, long hash)
          Deprecated.  
 void readExternal(java.io.ObjectInput in)
           
 boolean remoteEquals(java.rmi.server.RemoteRef obj)
          Tests for object equality (==) of this reference with the given reference.
 int remoteHashCode()
          Returns a hashcode for this reference.
 java.lang.String remoteToString()
          Provides a string representation of this reference.
 void setIdentifiers(Identifier[] ids)
          Sets the identifiers contained in this reference to the given identifiers.
 void writeExternal(java.io.ObjectOutput out)
           
 java.lang.Object writeReplace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicRef

public DynamicRef(JRMIRef client_ref,
                  DynamicRemote target)
Method Detail

writeReplace

public java.lang.Object writeReplace()

invoke

public java.lang.Object invoke(java.rmi.Remote obj,
                               java.lang.reflect.Method method,
                               java.lang.Object[] params,
                               long opnum)
                        throws java.lang.Exception
Carries out a remote method invocation and either returns the result of the invocation is successful, otherwise an exception.

Specified by:
invoke in interface java.rmi.server.RemoteRef
Parameters:
obj - ignored; left for compatibility with RemoteRef;
method - the remote method to be invoked;
params - arguments to the invocation of the remote method;
opnum - ignored; left for compatibility with RemoteRef.
Returns:
the result of the remote method invocation, if successful.
Throws:
java.lang.Exception - any exception thrown either by the remote method invocation, or if something goes wrong (network error, etc.).

setIdentifiers

public void setIdentifiers(Identifier[] ids)
Sets the identifiers contained in this reference to the given identifiers.

Specified by:
setIdentifiers in interface Reference
Parameters:
ids - a set of identifiers.

getIdentifiers

public Identifier[] getIdentifiers()
Returns the identifiers contained in this reference.

Specified by:
getIdentifiers in interface Reference
Returns:
a set of identifiers.

getRefClass

public java.lang.String getRefClass(java.io.ObjectOutput out)
Not used; left for compatibility with RemoteRef

Specified by:
getRefClass in interface java.rmi.server.RemoteRef

remoteHashCode

public int remoteHashCode()
Returns a hashcode for this reference.

Specified by:
remoteHashCode in interface java.rmi.server.RemoteRef
Returns:
a hashcode.

remoteEquals

public boolean remoteEquals(java.rmi.server.RemoteRef obj)
Tests for object equality (==) of this reference with the given reference.

Specified by:
remoteEquals in interface java.rmi.server.RemoteRef
Parameters:
obj - the remote reference to be compared with.
Returns:
the result of the object equality (==) test.

remoteToString

public java.lang.String remoteToString()
Provides a string representation of this reference.

Specified by:
remoteToString in interface java.rmi.server.RemoteRef
Returns:
a string representation of this reference.

newCall

public java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject obj,
                                          java.rmi.server.Operation[] op,
                                          int opnum,
                                          long hash)
Deprecated.  

Specified by:
newCall in interface java.rmi.server.RemoteRef
Parameters:
obj -
op -
opnum -
hash -
Returns:
a remote call

invoke

public void invoke(java.rmi.server.RemoteCall call)
Deprecated.  

Specified by:
invoke in interface java.rmi.server.RemoteRef
Parameters:
call -

done

public void done(java.rmi.server.RemoteCall call)
Deprecated.  

Specified by:
done in interface java.rmi.server.RemoteRef
Parameters:
call -

readExternal

public void readExternal(java.io.ObjectInput in)
Specified by:
readExternal in interface java.io.Externalizable

writeExternal

public void writeExternal(java.io.ObjectOutput out)
Specified by:
writeExternal in interface java.io.Externalizable