|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TraceMessageAcceptor
This interface represents objects that accept messages and do something useful with them. A TraceMessageAcceptor lives in two main states: prior to its starting environment being set up, and after that environment is set up. A TraceMessageAcceptor may choose to accept messages prior to the completion of setup, but it may not make them available to a user.
An instance of this interface is given to the TraceController via
its setAcceptor() method. If a message
acceptor is not provided in this way, the TraceController class will
provide a standard default implementation, which simply writes messages to a
log file. Typically that default implementation is the one you want to use.
This interface exists for circumstances which require trace messages to
receive special handling (for example, to make the message appear in an
application server's log file using a vendor-proprietary logging API).
| Method Summary | |
|---|---|
void |
accept(TraceMessage message)
Accept a message and do whatever is appropriate to make it visible to a user, either now or later. |
boolean |
setConfiguration(String name,
String value)
Modify the acceptor configuration based on a property setting. |
void |
setupIsComplete()
After this call, the TraceMessageAcceptor must obey settings from the environment. |
| Method Detail |
|---|
void accept(TraceMessage message)
Note that this method will be called after the message passes a priority threshold check. TraceMessageAcceptors don't know about priorities.
The TraceMessageAcceptor is allowed to unilaterally discard the message. Generally, this is done only if it was turned off by a control external to this interface.
message - The trace message to be handled.
boolean setConfiguration(String name,
String value)
name - Property name.value - Property value.
void setupIsComplete()
It is an error to call this method more than once.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||