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

java.lang.Object
  extended by sun.rmi.server.UnicastRef
      extended by sun.rmi.server.UnicastServerRef
          extended by org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.rmi.server.RemoteRef, java.rmi.server.ServerRef, sun.rmi.server.Dispatcher
Direct Known Subclasses:
JUnicastServerRefSf

public class JUnicastServerRef
extends sun.rmi.server.UnicastServerRef

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)
See Also:
Serialized Form

Field Summary
protected  JClientRequestInterceptor[] cis
          ClientRequestInterceptor array
protected  JServerRequestInterceptor[] sis
          ServerRequestInterceptor array
 
Fields inherited from class sun.rmi.server.UnicastServerRef
callLog, logCalls
 
Fields inherited from class sun.rmi.server.UnicastRef
clientCallLog, clientRefLog, ref
 
Fields inherited from interface java.rmi.server.RemoteRef
packagePrefix
 
Constructor Summary
JUnicastServerRef()
          constructor
JUnicastServerRef(int port, JServerRequestInterceptor[] sis, JClientRequestInterceptor[] cis)
          Constructor with interceptor
JUnicastServerRef(sun.rmi.transport.LiveRef ref, JServerRequestInterceptor[] sis, JClientRequestInterceptor[] cis)
          Constructor with interceptor
 
Method Summary
 void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call)
          override dispatch to use a specific thread factory
 java.rmi.Remote exportObject(java.rmi.Remote obj, java.lang.Object object, int localId)
           
protected  java.rmi.server.RemoteRef getClientRef()
          use a different kind of RemoteRef instance.
 java.lang.String getRefClass(java.io.ObjectOutput out)
          get the ref class name
protected  void unmarshalCustomCallData(java.io.ObjectInput in)
          override unmarshalCustomCallData to receive and establish contexts sent by the client
 
Methods inherited from class sun.rmi.server.UnicastServerRef
clearStackTraces, exportObject, exportObject, getClientHost, oldDispatch, readExternal, setSkeleton, writeExternal
 
Methods inherited from class sun.rmi.server.UnicastRef
done, invoke, invoke, marshalCustomCallData, marshalValue, newCall, remoteEquals, remoteHashCode, remoteToString, unmarshalValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.rmi.server.RemoteRef
done, invoke, invoke, newCall, remoteEquals, remoteHashCode, remoteToString
 

Field Detail

sis

protected JServerRequestInterceptor[] sis
ServerRequestInterceptor array


cis

protected JClientRequestInterceptor[] cis
ClientRequestInterceptor array

Constructor Detail

JUnicastServerRef

public JUnicastServerRef()
constructor


JUnicastServerRef

public JUnicastServerRef(sun.rmi.transport.LiveRef 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 Detail

getRefClass

public java.lang.String getRefClass(java.io.ObjectOutput out)
get the ref class name

Specified by:
getRefClass in interface java.rmi.server.RemoteRef
Overrides:
getRefClass in class sun.rmi.server.UnicastServerRef
Returns:
String the class name

getClientRef

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

Overrides:
getClientRef in class sun.rmi.server.UnicastServerRef
Returns:
remote Ref the remote reference

exportObject

public java.rmi.Remote exportObject(java.rmi.Remote obj,
                                    java.lang.Object object,
                                    int localId)
                             throws java.rmi.RemoteException
Parameters:
obj -
localId -
object -
Returns:
Throws:
java.rmi.RemoteException

unmarshalCustomCallData

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

Overrides:
unmarshalCustomCallData in class sun.rmi.server.UnicastServerRef
Parameters:
in - the object input
Throws:
java.io.IOException
java.lang.ClassNotFoundException

dispatch

public void dispatch(java.rmi.Remote obj,
                     java.rmi.server.RemoteCall call)
              throws java.io.IOException
override dispatch to use a specific thread factory

Specified by:
dispatch in interface sun.rmi.server.Dispatcher
Overrides:
dispatch in class sun.rmi.server.UnicastServerRef
Parameters:
obj - the remote object
call - the remote call on this object
Throws:
java.io.IOException