java.rmi.server

Class RemoteServer

public abstract class RemoteServer extends RemoteObject

A common superclass for the server implementations.
Constructor Summary
protected RemoteServer()
Does nothing, delegates to super().
protected RemoteServer(RemoteRef ref)
Does nothing, delegates to super(ref).
Method Summary
static StringgetClientHost()
Get the host of the calling client.
static PrintStreamgetLog()
Get the stream for logging RMI calls.
static voidsetLog(OutputStream out)
Set the stream for logging RMI calls.

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()
Get the host of the calling client. The current thread must be an instance of the {@link RMIIncomingThread}.

Returns: the client host address

Throws: ServerNotActiveException if the current thread is not an instance of the RMIIncomingThread.

getLog

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

Returns: the associated stream.

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.