|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.ow2.carol.irmi.Server
public class 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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Fields inherited from interface org.ow2.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 use the given client and server Interceptors. |
|
Server(int port)
Construct 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<Server> |
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. |
protected void |
setInterceptors(java.rmi.Remote obj,
ClientInterceptor clientInterceptor,
Interceptor serverInterceptor)
|
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, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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)
Interceptors. If port is zero then any
available port will be chosen.
port - the port for the server to bind topublic Server()
Interceptors.
| Method Detail |
|---|
public static java.util.Collection<Server> getServers()
protected void setInterceptors(java.rmi.Remote obj,
ClientInterceptor clientInterceptor,
Interceptor serverInterceptor)
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic 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 | ||||||||