de.qfs.apps.qflog
Class LogListenerImpl

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--de.qfs.lib.logrmi.LogListenerImplBase
                          |
                          +--de.qfs.apps.qflog.LogListenerImpl

public class LogListenerImpl
extends de.qfs.lib.logrmi.LogListenerImplBase
implements de.qfs.lib.log.LogSource, java.rmi.server.Unreferenced

Implementation of the LogListener interface.

Version:
$Revision: 1.13 $
Author:
Gregor Schmid
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
LogListenerImpl(int id)
          Create a new LogListenerImpl.
 
Method Summary
 void addFilter(de.qfs.lib.log.LogFilter filter)
          Add a LogFilter to the front of the filter chain.
 void disconnect()
          End the connection with the LogListener.
 void finalize()
          Finalize the LogListenerImpl.
 int getId()
          Get the id of the LogListenerImpl.
 void log(de.qfs.lib.log.LogEntry entry)
          Accept a log message.
 void log(de.qfs.lib.log.LogEntry[] entries)
          Accept many log messages.
 void remove()
          Remove and unexport the LogListenerImpl.
 void removeFilter(de.qfs.lib.log.LogFilter filter)
          Remove a LogFilter from the front of the filter chain.
 java.lang.String toString()
          Create a String representation for the LogListenerImpl
 void unreferenced()
          Notify the LogListenerImpl that it is no longer referenced by the client.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toStub
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogListenerImpl

public LogListenerImpl(int id)
                throws java.rmi.RemoteException
Create a new LogListenerImpl.
Parameters:
id - The id of the LogListenerImpl.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
Method Detail

remove

public void remove()
Remove and unexport the LogListenerImpl.

getId

public final int getId()
Get the id of the LogListenerImpl.
Returns:
The id of the LogListenerImpl.

toString

public java.lang.String toString()
Create a String representation for the LogListenerImpl
Overrides:
toString in class java.rmi.server.RemoteObject
Returns:
The String representation.

log

public void log(de.qfs.lib.log.LogEntry entry)
         throws java.rmi.RemoteException
Accept a log message.
Overrides:
log in class de.qfs.lib.logrmi.LogListenerImplBase
Parameters:
entry - The LogEntry that holds the message details.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

log

public void log(de.qfs.lib.log.LogEntry[] entries)
         throws java.rmi.RemoteException
Accept many log messages.
Overrides:
log in class de.qfs.lib.logrmi.LogListenerImplBase
Parameters:
entries - A LogEntry array that holds the message details.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

disconnect

public void disconnect()
                throws java.rmi.RemoteException
End the connection with the LogListener.
Overrides:
disconnect in class de.qfs.lib.logrmi.LogListenerImplBase

addFilter

public void addFilter(de.qfs.lib.log.LogFilter filter)
Add a LogFilter to the front of the filter chain.
Specified by:
addFilter in interface de.qfs.lib.log.LogSource
Parameters:
filter - The filter to add.

removeFilter

public void removeFilter(de.qfs.lib.log.LogFilter filter)
Remove a LogFilter from the front of the filter chain.
Specified by:
removeFilter in interface de.qfs.lib.log.LogSource
Parameters:
filter - The filter to remove

unreferenced

public void unreferenced()
Notify the LogListenerImpl that it is no longer referenced by the client.
Specified by:
unreferenced in interface java.rmi.server.Unreferenced

finalize

public void finalize()
Finalize the LogListenerImpl.
Overrides:
finalize in class java.lang.Object