|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkiwi.util.LoggingMux
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.
LoggingEndpoint
Field Summary | |
private java.util.Vector |
v
|
Fields inherited from interface kiwi.util.LoggingEndpoint |
ERROR, INFO, STATUS, WARNING |
Constructor Summary | |
LoggingMux()
Construct a new LoggingMux . |
Method Summary | |
void |
addLoggingEndpoint(LoggingEndpoint endpoint)
Add a LoggingEndpoint to the set. |
void |
close()
Close this set of endpoints. |
void |
close(boolean closeEndpoints)
Close this set of endpoints. |
void |
logMessage(int type,
java.lang.String message)
Log a message to all endpoints in this set. |
void |
removeAllLoggingEndpoints()
Remove all LoggingEndpoint s from the set. |
void |
removeLoggingEndpoint(LoggingEndpoint endpoint)
Remove a LoggingEndpoint from the set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Vector v
Constructor Detail |
public LoggingMux()
LoggingMux
.
Method Detail |
public void logMessage(int type, java.lang.String message)
logMessage
in interface LoggingEndpoint
type
- The message type; one of the static constants defined above.message
- The message.public void close()
close(false)
.
close
in interface LoggingEndpoint
public void close(boolean closeEndpoints)
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.public void addLoggingEndpoint(LoggingEndpoint endpoint)
LoggingEndpoint
to the set.
endpoint
- The LoggingEndpoint
to add.public void removeLoggingEndpoint(LoggingEndpoint endpoint)
LoggingEndpoint
from the set.
endpoint
- The LoggingEndpoint
to remove.public void removeAllLoggingEndpoints()
LoggingEndpoint
s from the set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |