org.elkoserver.util.trace
Class TraceController

java.lang.Object
  extended by org.elkoserver.util.trace.TraceController

public class TraceController
extends Object

The single trace controller which manages the operation of the tracing system.


Method Summary
static void setAcceptor(TraceMessageAcceptor acceptor)
          Set the acceptor that will be used to actually handle trace events.
static void setProperties(Properties props)
          Set the trace control properties from a given set of properties.
static void setProperty(String key, String value)
          Set one of the trace control properties.
static void start(Properties props)
          Start the operation of the trace system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setAcceptor

public static void setAcceptor(TraceMessageAcceptor acceptor)
Set the acceptor that will be used to actually handle trace events.

Parameters:
acceptor - The new acceptor.

setProperties

public static void setProperties(Properties props)
Set the trace control properties from a given set of properties.

IMPORTANT: The properties are processed in an unpredictable order.

Parameters:
props -

setProperty

public static void setProperty(String key,
                               String value)
Set one of the trace control properties.

If the given key names a tracing property, process its value. Note that it is not an error for the key to have nothing to do with tracing; in that case, it's ignored. It is an error for the value to be null.

Parameters:
key - The name of the property to set.
value - The value to set it to, if it is a trace control property.

start

public static void start(Properties props)
Start the operation of the trace system. Prior to this call, Trace objects may be obtained and messages may be sent to them. However, the messages will be queued up until this routine is called. (Note that the messages will be governed by the default thresholds.)

Applications should not need to call this method, since normally it is called automatically by the server boot class (e.g., Boot).

Parameters:
props - The initial set of properties provided by the user. They override the defaults. They may be changed later.