org.objectweb.jeremie.stub_factories.std
Class DynamicRef

java.lang.Object
  extended byorg.objectweb.jeremie.stub_factories.std.DynamicRef
All Implemented Interfaces:
Externalizable, JRMIRef, org.objectweb.jonathan.binding.api.Reference, RemoteRef, Serializable

public class DynamicRef
extends 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(RemoteCall call)
          Deprecated.  
 org.objectweb.jonathan.binding.api.Identifier[] getIdentifiers()
          Returns the identifiers contained in this reference.
 String getRefClass(ObjectOutput out)
          Not used; left for compatibility with RemoteRef
 void invoke(RemoteCall call)
          Deprecated.  
 Object invoke(Remote obj, Method method, Object[] params, long opnum)
          Carries out a remote method invocation and either returns the result of the invocation is successful, otherwise an exception.
 RemoteCall newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
          Deprecated.  
 void readExternal(ObjectInput in)
           
 boolean remoteEquals(RemoteRef obj)
          Tests for object equality (==) of this reference with the given reference.
 int remoteHashCode()
          Returns a hashcode for this reference.
 String remoteToString()
          Provides a string representation of this reference.
 void setIdentifiers(org.objectweb.jonathan.binding.api.Identifier[] ids)
          Sets the identifiers contained in this reference to the given identifiers.
 void writeExternal(ObjectOutput out)
           
 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 Object writeReplace()

invoke

public Object invoke(Remote obj,
                     Method method,
                     Object[] params,
                     long opnum)
              throws 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 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:
Exception - any exception thrown either by the remote method invocation, or if something goes wrong (network error, etc.).

setIdentifiers

public void setIdentifiers(org.objectweb.jonathan.binding.api.Identifier[] ids)
Sets the identifiers contained in this reference to the given identifiers.

Specified by:
setIdentifiers in interface org.objectweb.jonathan.binding.api.Reference
Parameters:
ids - a set of identifiers.

getIdentifiers

public org.objectweb.jonathan.binding.api.Identifier[] getIdentifiers()
Returns the identifiers contained in this reference.

Specified by:
getIdentifiers in interface org.objectweb.jonathan.binding.api.Reference
Returns:
a set of identifiers.

getRefClass

public String getRefClass(ObjectOutput out)
Not used; left for compatibility with RemoteRef

Specified by:
getRefClass in interface RemoteRef

remoteHashCode

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

Specified by:
remoteHashCode in interface RemoteRef
Returns:
a hashcode.

remoteEquals

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

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

remoteToString

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

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

newCall

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

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

invoke

public void invoke(RemoteCall call)
Deprecated.  

Specified by:
invoke in interface RemoteRef
Parameters:
call -

done

public void done(RemoteCall call)
Deprecated.  

Specified by:
done in interface RemoteRef
Parameters:
call -

readExternal

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

writeExternal

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