qflib 0.98.1

de.qfs.lib.logrmi
Interface LogServer

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
LogServerImplBase

public interface LogServer
extends java.rmi.Remote

A LogServer is a factory for LogListeners. Clients have to register under their name.

Version:
$Revision: 1.1 $
Author:
Gregor Schmid

Method Summary
 void disconnect(int id)
          Disconnect the client from the server.
 int getId(java.lang.String clientName)
          Get an Id for a new client.
 RemoteLogLevelListener getLogLevelListener(int id)
          Get a LogLevelListener for a client.
 LogListener getLogListener(int id)
          Get a LogListener for a client.
 

Method Detail

getId

public int getId(java.lang.String clientName)
          throws java.rmi.RemoteException
Get an Id for a new client. Different clients may connect under the same name, so this identification mechanism is required to differentiate between them.
Returns:
A unique handle identifying the client to the server.

getLogListener

public LogListener getLogListener(int id)
                           throws java.rmi.RemoteException
Get a LogListener for a client.
Parameters:
id - The client identifier obtained with getId.
Returns:
The LogListener
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

getLogLevelListener

public RemoteLogLevelListener getLogLevelListener(int id)
                                           throws java.rmi.RemoteException
Get a LogLevelListener for a client.
Parameters:
id - The client identifier obtained with getId.
Returns:
The LogLevelListener
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

disconnect

public void disconnect(int id)
                throws java.rmi.RemoteException
Disconnect the client from the server. This should automatically disconnect from any LogListener and LogLevelListener returned by the server from getLogListener or getLogLevelListener.
Parameters:
id - The client identifier obtained with getId.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

qflib 0.98.1