org.objectweb.carol.rmi.jrmp.server
Class JUnicastRef

java.lang.Object
  extended by sun.rmi.server.UnicastRef
      extended by org.objectweb.carol.rmi.jrmp.server.JUnicastRef
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.rmi.server.RemoteRef
Direct Known Subclasses:
JUnicastRefSf

public class JUnicastRef
extends sun.rmi.server.UnicastRef

Class JUnicastRef is the CAROL JRMP UnicastRef with context propagation

Version:
1.0, 15/07/2002 Unicast Reference ensuring context propagation
Author:
Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)
See Also:
Serialized Form

Field Summary
protected  JClientRequestInterceptor[] cis
          Client Interceptor for context propagation
protected  java.lang.String[] initializers
          Interceptors initialisers for this References
 
Fields inherited from class sun.rmi.server.UnicastRef
clientCallLog, clientRefLog, ref
 
Fields inherited from interface java.rmi.server.RemoteRef
packagePrefix, serialVersionUID
 
Constructor Summary
JUnicastRef()
          empty constructor
JUnicastRef(sun.rmi.transport.LiveRef liveRef)
          Constructor without Interceptor
JUnicastRef(sun.rmi.transport.LiveRef liveRef, JClientRequestInterceptor[] cis, java.lang.String[] initial, int local)
          Constructor with interceptor
 
Method Summary
 int getLocalId()
           
 java.lang.String getRefClass(java.io.ObjectOutput out)
          get the ref class always return null
 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)
          wrap the call to send the contexts
protected  void marshalCustomCallData(java.io.ObjectOutput out)
          override marshalCustomCallData to pass and disociate contexts on the client
 java.rmi.server.RemoteCall newCall(java.rmi.server.RemoteObject obj, java.rmi.server.Operation[] ops, int opnum, long hash)
          Deprecated.  
 void readExternal(java.io.ObjectInput in)
          override readExternal to initialise localRef We could actually receive anything from the server on lookup
 void readExternal(java.io.ObjectInput in, boolean newFormat)
          override readExternal to initialise localRef We could actually receive anything from the server on lookup
 void writeExternal(java.io.ObjectOutput out)
          override writeExternal to send spaceID We could actually send anything to the client on lookup
 void writeExternal(java.io.ObjectOutput out, boolean newFormat)
          override writeExternal to send spaceID And the interceptor We could actually send anything to the client on lookup
 
Methods inherited from class sun.rmi.server.UnicastRef
done, getLiveRef, marshalValue, remoteEquals, remoteHashCode, remoteToString, unmarshalValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cis

protected transient JClientRequestInterceptor[] cis
Client Interceptor for context propagation


initializers

protected transient java.lang.String[] initializers
Interceptors initialisers for this References

Constructor Detail

JUnicastRef

public JUnicastRef()
empty constructor


JUnicastRef

public JUnicastRef(sun.rmi.transport.LiveRef liveRef)
Constructor without Interceptor

Parameters:
liveRef - the live reference

JUnicastRef

public JUnicastRef(sun.rmi.transport.LiveRef liveRef,
                   JClientRequestInterceptor[] cis,
                   java.lang.String[] initial,
                   int local)
Constructor with interceptor

Parameters:
liveRef - the live reference
cis - the client interceptor array
int - localId
Method Detail

getRefClass

public java.lang.String getRefClass(java.io.ObjectOutput out)
get the ref class always return null

Specified by:
getRefClass in interface java.rmi.server.RemoteRef
Overrides:
getRefClass in class sun.rmi.server.UnicastRef
Parameters:
out - the output stream

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
wrap the call to send the contexts

Specified by:
invoke in interface java.rmi.server.RemoteRef
Overrides:
invoke in class sun.rmi.server.UnicastRef
Parameters:
obj - the remote object to invoke
method - the method to invoke
params - the methid parametters
opnum - the operation number
Throws:
java.lang.Exception

invoke

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

v1.1 style of Stubs call this invoke

Specified by:
invoke in interface java.rmi.server.RemoteRef
Overrides:
invoke in class sun.rmi.server.UnicastRef
Parameters:
call - the remote call
Throws:
java.lang.Exception

newCall

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

override v1.1 RemoteCall instanciation to wrap the call and send the context

Specified by:
newCall in interface java.rmi.server.RemoteRef
Overrides:
newCall in class sun.rmi.server.UnicastRef
Parameters:
obj - the remote object
ops - the operation
opnum - the operation number
hash - the hash code
Throws:
java.rmi.RemoteException

marshalCustomCallData

protected void marshalCustomCallData(java.io.ObjectOutput out)
                              throws java.io.IOException
override marshalCustomCallData to pass and disociate contexts on the client

Overrides:
marshalCustomCallData in class sun.rmi.server.UnicastRef
Parameters:
out - the ObjectOutput for the call marchalling
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
override readExternal to initialise localRef We could actually receive anything from the server on lookup

Specified by:
readExternal in interface java.io.Externalizable
Overrides:
readExternal in class sun.rmi.server.UnicastRef
Parameters:
in - the ObjectInput
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
override writeExternal to send spaceID We could actually send anything to the client on lookup

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class sun.rmi.server.UnicastRef
Parameters:
out - the object output stream
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in,
                         boolean newFormat)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
override readExternal to initialise localRef We could actually receive anything from the server on lookup

Parameters:
in - the object input
newFormat - the new format boolean
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out,
                          boolean newFormat)
                   throws java.io.IOException
override writeExternal to send spaceID And the interceptor We could actually send anything to the client on lookup

Parameters:
out - the object output
newFormat - the boolean new format
Throws:
java.io.IOException

getLocalId

public int getLocalId()
Returns: