org.apache.log4j.net
Class SocketNode
java.lang.Object
|
+--org.apache.log4j.spi.ComponentBase
|
+--org.apache.log4j.net.SocketNode
- All Implemented Interfaces:
- Component, Pauseable, Runnable
- public class SocketNode
- extends ComponentBase
- implements Runnable, Pauseable
Read LoggingEvent
objects sent from a remote client using
Sockets (TCP). These logging events are logged according to local
policy, as if they were generated locally.
For example, the socket node might decide to log events to a
local file and also resent them to a second socket node.
- Since:
- 0.8.4
- Author:
- Ceki Gülcü, Paul Smith
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketNode
public SocketNode(Socket socket,
LoggerRepository hierarchy)
- Constructor for socket and logger repository.
SocketNode
public SocketNode(Socket socket,
Receiver receiver)
- Constructor for socket and reciever.
setListener
public void setListener(SocketNodeEventListener _listener)
- Deprecated. Now supports mutliple listeners, this method
simply invokes the removeSocketNodeEventListener() to remove
the listener, and then readds it.
- Set the event listener on this node.
addSocketNodeEventListener
public void addSocketNodeEventListener(SocketNodeEventListener listener)
- Adds the listener to the list of listeners to be notified of the
respective event
- Parameters:
listener
- the listener to add to the list
removeSocketNodeEventListener
public void removeSocketNodeEventListener(SocketNodeEventListener listener)
- Removes the registered Listener from this instances list of
listeners. If the listener has not been registered, then invoking
this method has no effect.
- Parameters:
listener
- the SocketNodeEventListener to remove
run
public void run()
- Specified by:
run
in interface Runnable
setPaused
public void setPaused(boolean paused)
- Specified by:
setPaused
in interface Pauseable
isPaused
public boolean isPaused()
- Specified by:
isPaused
in interface Pauseable
Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.