java.rmi.server
Class RemoteServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
All Implemented Interfaces:
Serializable, Remote
Direct Known Subclasses:
Activatable, UnicastRemoteObject

public abstract class RemoteServer
extends RemoteObject

A common superclass for the server implementations.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
protected RemoteServer()
          Does nothing, delegates to super().
protected RemoteServer(RemoteRef ref)
          Does nothing, delegates to super(ref).
 
Method Summary
static String getClientHost()
          Get the host of the calling client.
static PrintStream getLog()
          Get the stream for logging RMI calls.
static void setLog(OutputStream out)
          Set the stream for logging RMI calls.
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteServer

protected RemoteServer()
Does nothing, delegates to super().


RemoteServer

protected RemoteServer(RemoteRef ref)
Does nothing, delegates to super(ref).

Method Detail

getClientHost

public static String getClientHost()
                            throws ServerNotActiveException
Get the host of the calling client. The current thread must be an instance of the RMIIncomingThread.

Returns:
the client host address
Throws:
ServerNotActiveException - if the current thread is not an instance of the RMIIncomingThread.

setLog

public static void setLog(OutputStream out)
Set the stream for logging RMI calls.

Parameters:
out - the stream to set or null to turn the logging off.

getLog

public static PrintStream getLog()
Get the stream for logging RMI calls.

Returns:
the associated stream.