com.sun.jdmk.trace
Interface TraceDestination


public interface TraceDestination

Defines the methods that a trace destination must implement.

Since:
JDMK 5.0

Method Summary
 boolean isSelected(int level, int type)
          Verify whether the specified info level and the info type are selected by a listener.
 void reset()
          Reset the trace destination.
 boolean send(int level, int type, String className, String methodName, String info)
          Send a new information to this Trace destination
 boolean send(int level, int type, String className, String methodName, Throwable exception)
          Send an exception to this Trace class.
 

Method Detail

isSelected

public boolean isSelected(int level,
                          int type)
Verify whether the specified info level and the info type are selected by a listener.

It is strongly recommended to call this method before sending information to this Trace class.

Parameters:
level - the level of trace information.
type - the type of the trace information.

send

public boolean send(int level,
                    int type,
                    String className,
                    String methodName,
                    String info)
Send a new information to this Trace destination

Parameters:
level - the level of trace information to be sent.
type - the type of trace information to be sent.
className - the name of the class from which the trace information is from.
methodName - the name of the method from which the trace information is from.
info - the trace information to be sent.
Returns:
false if the level and the type are not selected.

send

public boolean send(int level,
                    int type,
                    String className,
                    String methodName,
                    Throwable exception)
Send an exception to this Trace class.

Parameters:
level - the level of trace information to be sent.
type - the type of trace information to be sent.
className - the name of the class from which the trace information is from.
methodName - the name of the method from which the trace information is from.
exception - exception sent as the trace information.

reset

public void reset()
           throws IOException
Reset the trace destination. The behaviour of this method is implementation dependent. It could be used, for instance, to (re)initialize the traces according to some default System properties, or to flush (empty) the log file, etc...

IOException

JMX 1.2_8   2002.10.31_20:03:55_MET

Copyright 1999-2002 Sun Microsystems, Inc.   901 San Antonio Road Palo Alto, California, 94303, U.S.A.   All Rights Reserved.