org.objectweb.carol.rmi.jrmp.server

Class JUnicastServerRef

Implemented Interfaces:
RemoteRef
Known Direct Subclasses:
JUnicastServerRefSf

public class JUnicastServerRef
extends java.lang.Object
implements RemoteRef

Class JUnicastServerRef implements the remote reference layer server-side behavior for remote objects exported with the JUnicastRef reference type.

Version:
1.0, 15/07/2002

Author:
Guillaume Riviere (Guillaume.Riviere@inrialpes.fr)

Field Summary

protected JClientRequestInterceptor[]
cis
ClientRequestInterceptor array
protected JServerRequestInterceptor[]
sis
ServerRequestInterceptor array

Constructor Summary

JUnicastServerRef()
constructor
JUnicastServerRef(Object ref, JServerRequestInterceptor[] sis, JClientRequestInterceptor[] cis)
Constructor with interceptor
JUnicastServerRef(int port, JServerRequestInterceptor[] sis, JClientRequestInterceptor[] cis)
Constructor with interceptor

Method Summary

void
dispatch(Remote obj, RemoteCall call)
override dispatch to use a specific thread factory
void
done(RemoteCall call)
Remote
exportObject(Remote obj, Object object, int localId)
protected RemoteRef
getClientRef()
use a different kind of RemoteRef instance.
String
getRefClass(ObjectOutput out)
get the ref class name
Object
invoke(Remote obj, Method method, Object[] params, long opnum)
void
invoke(RemoteCall call)
RemoteCall
newCall(RemoteObject obj, Operation[] op, int opnum, long hash)
void
readExternal(ObjectInput in)
Methods which should have come from sun.rmi.server.UnicastServerRef
boolean
remoteEquals(RemoteRef ref)
int
remoteHashCode()
String
remoteToString()
protected void
unmarshalCustomCallData(ObjectInput in)
override unmarshalCustomCallData to receive and establish contexts sent by the client
void
writeExternal(ObjectOutput out)

Field Details

cis

protected JClientRequestInterceptor[] cis
ClientRequestInterceptor array


sis

protected JServerRequestInterceptor[] sis
ServerRequestInterceptor array

Constructor Details

JUnicastServerRef

public JUnicastServerRef()
constructor


JUnicastServerRef

public JUnicastServerRef(Object ref,
                         JServerRequestInterceptor[] sis,
                         JClientRequestInterceptor[] cis)
Constructor with interceptor

Parameters:
ref - the live reference
sis - the server interceptor array
cis - the client interceptor array


JUnicastServerRef

public JUnicastServerRef(int port,
                         JServerRequestInterceptor[] sis,
                         JClientRequestInterceptor[] cis)
Constructor with interceptor

Parameters:
port - the port reference
sis - the server interceptor array
cis - the client interceptor array

Method Details

dispatch

public void dispatch(Remote obj,
                     RemoteCall call)
            throws IOException
override dispatch to use a specific thread factory

Parameters:
obj - the remote object
call - the remote call on this object


done

public void done(RemoteCall call)


exportObject

public Remote exportObject(Remote obj,
                           Object object,
                           int localId)
            throws RemoteException

Parameters:
obj -
object -
localId -

Returns:


getClientRef

protected RemoteRef getClientRef()
use a different kind of RemoteRef instance. This method is used by the remote client to get the Client reference

Returns:
remote Ref the remote reference


getRefClass

public String getRefClass(ObjectOutput out)
get the ref class name

Returns:
String the class name


invoke

public Object invoke(Remote obj,
                     Method method,
                     Object[] params,
                     long opnum)


invoke

public void invoke(RemoteCall call)


newCall

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


readExternal

public void readExternal(ObjectInput in)
Methods which should have come from sun.rmi.server.UnicastServerRef


remoteEquals

public boolean remoteEquals(RemoteRef ref)


remoteHashCode

public int remoteHashCode()


remoteToString

public String remoteToString()


unmarshalCustomCallData

protected void unmarshalCustomCallData(ObjectInput in)
            throws IOException,
                   ClassNotFoundException
override unmarshalCustomCallData to receive and establish contexts sent by the client

Parameters:
in - the object input


writeExternal

public void writeExternal(ObjectOutput out)