|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.objectweb.carol.irmi.Server
The Server class manages exported Remote objects and
listens for connections from remote references. It also contains
static methods that the Ref class uses to make remote
invocations.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface org.objectweb.carol.irmi.Constants |
DGC_PING, METHOD_CALL, METHOD_ERROR, METHOD_RESULT, SYSTEM_ERROR |
| Constructor Summary | |
Server()
Constructs a Server instance that will bind to any available port and does not have any Interceptors. |
|
Server(ClientInterceptor clint,
Interceptor srvint)
Constructs a Server instance that will bind to any available port and use the given client and server Interceptors. |
|
Server(int port,
ClientInterceptor clint,
Interceptor srvint)
Construcst a Server instance with the specified port, client, and server Interceptors. |
|
| Method Summary | |
void |
export(java.rmi.Remote object)
Exports the given Remote object. |
java.lang.ClassLoader |
getLoader(java.rmi.server.ObjID oid)
Return the ClassLoader used for deserializing arguments
to methods of the exported object mapped to the given oid or
null if there is none. |
java.rmi.Remote |
getObject(java.rmi.server.ObjID oid)
Return the exported object for the given oid or null if there is none. |
java.rmi.server.ObjID |
getOID(java.rmi.Remote obj)
Return the ObjID for the given Remote object or null if
there is none. |
static java.util.Collection |
getServers()
Returns all the Server instances for this JVM. |
java.rmi.server.Skeleton |
getSkel(java.rmi.Remote obj)
Construct and return a Skeleton for the given Remote object. |
java.rmi.server.RemoteStub |
getStub(java.rmi.Remote obj)
Converts the given Remote object to a RemoteStub instance. |
void |
run()
Accepts connections and launches Handler threads. |
boolean |
unexport(java.rmi.server.ObjID oid)
Unexports the Remote object associated with the given
ObjID if it is being exported by this Server. |
boolean |
unexport(java.rmi.Remote obj)
Unexports the given Remote object if it is being
exported by this Server. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Server(int port,
ClientInterceptor clint,
Interceptor srvint)
Interceptors. If port is zero then any
available port will be chosen.
port - the port for the server to bind toclint - the client Interceptor or nullsrvint - the server Interceptor or null
public Server(ClientInterceptor clint,
Interceptor srvint)
Interceptors.
clint - the client Interceptorsrvint - the server Interceptorpublic Server()
Interceptors.
| Method Detail |
public static java.util.Collection getServers()
public void run()
run in interface java.lang.Runnablepublic java.rmi.Remote getObject(java.rmi.server.ObjID oid)
oid - the oid of an exported object
public java.rmi.server.ObjID getOID(java.rmi.Remote obj)
Remote object or null if
there is none.
obj - an exported object
public java.lang.ClassLoader getLoader(java.rmi.server.ObjID oid)
ClassLoader used for deserializing arguments
to methods of the exported object mapped to the given oid or
null if there is none.
oid - the oid of an exported object
public java.rmi.server.Skeleton getSkel(java.rmi.Remote obj)
Skeleton for the given Remote object.
obj - a Remote object
Skeleton for objpublic java.rmi.server.RemoteStub getStub(java.rmi.Remote obj)
Remote object to a RemoteStub instance. This may involve nothing if the object is
already a stub, or it may involve search for an appropriate
stub class and constructing an instance of it.
obj - the Remote object
RemoteStub for obj
public void export(java.rmi.Remote object)
throws java.rmi.server.ExportException
Remote object.
object - the object to export
java.rmi.server.ExportException - when there is an errorpublic boolean unexport(java.rmi.Remote obj)
Remote object if it is being
exported by this Server.
obj - the object to unexport
public boolean unexport(java.rmi.server.ObjID oid)
Remote object associated with the given
ObjID if it is being exported by this Server.
oid - the ObjID of the Remote object to be
unexported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||