kiwi.util
Class LoggingMux
java.lang.Object
|
+--kiwi.util.LoggingMux
- All Implemented Interfaces:
- LoggingEndpoint
- public class LoggingMux
- extends java.lang.Object
- implements LoggingEndpoint
A logging multiplexor. This class manages a set of
LoggingEndpoint
s and itself implements the
LoggingEndpoint
interface. It may be use to direct logging
messages to several endpoints simultaneously. For example, an application
may send messages to both a console and a file.
- Author:
- Mark Lindner, PING Software Group
- See Also:
LoggingEndpoint
Field Summary |
private java.util.Vector |
v
|
Constructor Summary |
LoggingMux()
Construct a new LoggingMux . |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
v
private java.util.Vector v
LoggingMux
public LoggingMux()
- Construct a new
LoggingMux
.
logMessage
public void logMessage(int type,
java.lang.String message)
- Log a message to all endpoints in this set.
- Specified by:
logMessage
in interface LoggingEndpoint
- Following copied from interface:
kiwi.util.LoggingEndpoint
- Parameters:
type
- The message type; one of the static constants defined above.message
- The message.
close
public void close()
- Close this set of endpoints. Equivalent to
close(false)
.
- Specified by:
close
in interface LoggingEndpoint
close
public void close(boolean closeEndpoints)
- Close this set of endpoints.
- Parameters:
closeEndpoints
- If true, in addition to removing every
LoggingEndpoint
from its list, the LoggingMux
closes each LoggingEndpoint
explicitly via a call to its
close()
method.
addLoggingEndpoint
public void addLoggingEndpoint(LoggingEndpoint endpoint)
- Add a
LoggingEndpoint
to the set.
- Parameters:
endpoint
- The LoggingEndpoint
to add.
removeLoggingEndpoint
public void removeLoggingEndpoint(LoggingEndpoint endpoint)
- Remove a
LoggingEndpoint
from the set.
- Parameters:
endpoint
- The LoggingEndpoint
to remove.
removeAllLoggingEndpoints
public void removeAllLoggingEndpoints()
- Remove all
LoggingEndpoint
s from the set.