org.objectweb.carol.rmi.jrmp.server

Class JUnicastRef

Known Direct Subclasses:
JUnicastRefSf

public class JUnicastRef
extends java.lang.Object

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)

Field Summary

protected JClientRequestInterceptor[]
cis
Client Interceptor for context propagation
protected String[]
initializers
Interceptors initialisers for this References

Constructor Summary

JUnicastRef()
empty constructor
JUnicastRef(Object liveRef)
Constructor without Interceptor
JUnicastRef(Object liveRef, JClientRequestInterceptor[] cis, String[] initial, int local)
Constructor with interceptor

Method Summary

int
getLocalId()
String
getRefClass(ObjectOutput out)
get the ref class always return null
Object
invoke(Remote obj, java.lang.reflect.Method method, Object[] params, long opnum)
wrap the call to send the contexts
void
invoke(java.rmi.server.RemoteCall call)
Deprecated.
protected void
marshalCustomCallData(ObjectOutput out)
override marshalCustomCallData to pass and disociate contexts on the client
RemoteCall
newCall(RemoteObject obj, Operation[] ops, int opnum, long hash)
Deprecated.
void
readExternal(ObjectInput in)
override readExternal to initialise localRef We could actually receive anything from the server on lookup
void
readExternal(ObjectInput in, boolean newFormat)
override readExternal to initialise localRef We could actually receive anything from the server on lookup
void
writeExternal(ObjectOutput out)
override writeExternal to send spaceID We could actually send anything to the client on lookup
void
writeExternal(ObjectOutput out, boolean newFormat)
override writeExternal to send spaceID And the interceptor We could actually send anything to the client on lookup

Field Details

cis

protected JClientRequestInterceptor[] cis
Client Interceptor for context propagation


initializers

protected String[] initializers
Interceptors initialisers for this References

Constructor Details

JUnicastRef

public JUnicastRef()
empty constructor


JUnicastRef

public JUnicastRef(Object liveRef)
Constructor without Interceptor

Parameters:
liveRef - the live reference


JUnicastRef

public JUnicastRef(Object liveRef,
                   JClientRequestInterceptor[] cis,
                   String[] initial,
                   int local)
Constructor with interceptor

Parameters:
liveRef - the live reference
cis - the client interceptor array

Method Details

getLocalId

public int getLocalId()

Returns:


getRefClass

public String getRefClass(ObjectOutput out)
get the ref class always return null

Parameters:
out - the output stream


invoke

public Object invoke(Remote obj,
                     java.lang.reflect.Method method,
                     Object[] params,
                     long opnum)
            throws Exception
wrap the call to send the contexts

Parameters:
obj - the remote object to invoke
method - the method to invoque
params - the methid parametters
opnum - the operation number


invoke

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

Deprecated.

v1.1 style of Stubs call this invoke

Parameters:
call - the remote call


marshalCustomCallData

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

Parameters:
out - the ObjectOutput for the call marchalling


newCall

public RemoteCall newCall(RemoteObject obj,
                          Operation[] ops,
                          int opnum,
                          long hash)
            throws RemoteException

Deprecated.

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

Parameters:
obj - the remote object
ops - the operation
opnum - the operation number
hash - the hash code


readExternal

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

Parameters:
in - the ObjectInput


readExternal

public void readExternal(ObjectInput in,
                         boolean newFormat)
            throws IOException,
                   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


writeExternal

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

Parameters:
out - the object output stream


writeExternal

public void writeExternal(ObjectOutput out,
                          boolean newFormat)
            throws 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