javax.slee.management
Interface TraceMBean


public interface TraceMBean

The TraceMBean interface defines the management interface for the TraceFacility (and other vendor-specific trace generating interfaces). Using the TraceMBean a management client may get or set the trace filter level for trace notification generated from various component sources. The TraceMBean is also used as a notification source in the generation of Trace notifications.

The Object Name of a TraceMBean object can be obtained by a management client via the SleeManagementMBean.getTraceMBean() method.

Notifications
Since TraceMBean objects can emit Trace notifications, it is required that that TraceMBean object implement the javax.management.NotificationBroadcaster interface.


Field Summary
static java.lang.String TRACE_NOTIFICATION_TYPE
          The notification type of Trace notifications emitted by this MBean.
 
Method Summary
 Level getTraceLevel(ComponentID id)
          Get the trace filter level for a particular component.
 void setTraceLevel(ComponentID id, Level traceLevel)
          Set the trace filter level for a particular component.
 

Field Detail

TRACE_NOTIFICATION_TYPE

public static final java.lang.String TRACE_NOTIFICATION_TYPE
The notification type of Trace notifications emitted by this MBean. The notification type is equal to the string "javax.slee.management.trace".
Method Detail

setTraceLevel

public void setTraceLevel(ComponentID id,
                          Level traceLevel)
                   throws java.lang.NullPointerException,
                          UnrecognizedComponentException,
                          ManagementException
Set the trace filter level for a particular component. The TraceMBean only generates trace notifications if the trace level of a trace message generated by a component is equal to or greater than the trace filter level set for that component.

The default trace filter level for a component is Level.OFF, ie. trace notifications are never generated for the component unless the trace filter level is explicitly set to a different level.

Parameters:
id - the identifier of the component.
traceLevel - the new trace filter level for the component.
Throws:
java.lang.NullPointerException - if id is null.
UnrecognizedComponentException - if id is not a recognizable ComponentID object for the SLEE or it does not correspond with a component installed in the SLEE.
ManagementException - if the trace level could not be set due to a system-level failure.

getTraceLevel

public Level getTraceLevel(ComponentID id)
                    throws java.lang.NullPointerException,
                           UnrecognizedComponentException,
                           ManagementException
Get the trace filter level for a particular component.

The default trace filter level for a component is Level.OFF, ie. trace notifications are never generated for the component unless the trace filter level is explicitly set to a different level.

Parameters:
id - the identifier of the component.
Returns:
the trace filter level for the component.
Throws:
java.lang.NullPointerException - if id is null.
UnrecognizedComponentException - if id is not a recognizable ComponentID object for the SLEE or it does not correspond with a component installed in the SLEE.
ManagementException - if the trace level could not be set due to a system-level failure.