Class java.rmi.server.RemoteServer
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
- Subclasses:
- Activatable, UnicastRemoteObject
- public abstract class RemoteServer
- extends RemoteObject
The RemoteServer class is the common superclass to all server
implementations and provides the framework to support a wide range
of remote reference semantics. Specifically, the functions needed
to create and export remote objects (i.e. to make them remotely
available) are provided abstractly by RemoteServer and concretely
by its subclass(es).
The subclass selected identifies the semantics of the remote
reference, for example whether the server is a single object or is
a replicated object requiring communications with multiple
locations. At present only UnicastRemoteObject is supported.
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteServer
protected RemoteServer()
RemoteServer
protected RemoteServer(RemoteRef ref)
unexportObject
public static boolean unexportObject(Remote obj,
boolean force) throws NoSuchObjectException
- Remove the remote object, obj, from the RMI runtime. If
successful, the object can no longer accept incoming RMI calls.
If the force parameter is true, the object is forcibly unexported
even if there are pending calls to the remote object or the
remote object still has calls in progress. If the force
parameter is false, the object is only unexported if there are
no pending or in progress calls to the object.
- Parameters:
obj
- the remote object to be unexported
force
- if true, unexports the object even if there are
pending or in-progress calls; if false, only unexports the object
if there are no pending or in-progress calls
- Returns:
- true if operation is successful, false otherwise
- Throws:
- NoSuchObjectException - if the remote object is not
currently exported
getClientHost
public static String getClientHost() throws ServerNotActiveException
- Return the hostname of the current client. When called from a
thread actively handling a remote method invocation the
hostname of the client is returned.
- Throws:
- ServerNotActiveException - If called outside of servicing
a remote method invocation.
setLog
public static void setLog(OutputStream out)
- Log RMI calls to the output stream out. If out is
null, call logging is turned off.
getLog
public static PrintStream getLog()
- Returns stream for the RMI call log.
Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.