javax.slee.facilities
Interface TraceFacility


public interface TraceFacility

The Trace Facility is used by SBBs (and other components as determined by the SLEE vendor) to generate trace notifications intended for consumption by management clients external to the SLEE. For example, an SCE may attach a trace listener in order to deliver trace message output to the Service developer. Management clients register register interest in receiving trace notifictions using the SLEE's TraceMBean object.

The Trace Facility is non-transactional. The effects of operations invoked on this facility occur regardless of the state or outcome of any enclosing transaction.

SBB JNDI Location:
java:comp/env/slee/facilities/trace

See Also:
TraceMBean, TraceNotification

Method Summary
 void createTrace(ComponentID messageSource, Level traceLevel, java.lang.String messageType, java.lang.String message, long timeStamp)
          Emit a trace notification containing the specified trace message.
 void createTrace(ComponentID messageSource, Level traceLevel, java.lang.String messageType, java.lang.String message, java.lang.Throwable cause, long timeStamp)
          Emit a trace notification containing the specified trace message and cause throwable.
 Level getTraceLevel(ComponentID messageSource)
          Get the current trace filter level set for a component identifier.
 

Method Detail

getTraceLevel

public Level getTraceLevel(ComponentID messageSource)
                    throws java.lang.NullPointerException,
                           UnrecognizedComponentException,
                           FacilityException
Get the current trace filter level set for a component identifier.

This method is a non-transactional method.

Parameters:
messageSource - the component identifier.
Returns:
the current trace filter level for the identified 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.
FacilityException - if the trace level could not be obtained due to a system-level failure.

createTrace

public void createTrace(ComponentID messageSource,
                        Level traceLevel,
                        java.lang.String messageType,
                        java.lang.String message,
                        long timeStamp)
                 throws java.lang.NullPointerException,
                        java.lang.IllegalArgumentException,
                        UnrecognizedComponentException,
                        FacilityException
Emit a trace notification containing the specified trace message. The trace notification will only be generated by the TraceMBean if the trace filter level of the specified component identifer does not cause the trace message to be filtered.

This method is a non-transactional method.

Parameters:
messageSource - the identifer of the component that is emitting the trace message.
traceLevel - the logging level of the trace message.
messageType - a string denoting the type of the trace message.
message - the trace message.
timeStamp - the time (in ms since January 1, 1970 UTC) that the message was generated.
Throws:
java.lang.NullPointerException - if any parameter is null.
java.lang.IllegalArgumentException - if traceLevel == Level.OFF.
UnrecognizedComponentException - if messageSource is not a recognizable ComponentID object for the SLEE or it does not correspond with a component installed in the SLEE.
FacilityException - if the trace could not be generated due to a system-level failure.

createTrace

public void createTrace(ComponentID messageSource,
                        Level traceLevel,
                        java.lang.String messageType,
                        java.lang.String message,
                        java.lang.Throwable cause,
                        long timeStamp)
                 throws java.lang.NullPointerException,
                        java.lang.IllegalArgumentException,
                        UnrecognizedComponentException,
                        FacilityException
Emit a trace notification containing the specified trace message and cause throwable. The trace notification will only be generated by the TraceMBean if the trace filter level of the specified component identifer does not cause the trace message to be filtered.

This method is a non-transactional method.

Parameters:
messageSource - the identifer of the component that is emitting the trace message.
traceLevel - the logging level of the trace message.
messageType - a string denoting the type of the trace message.
message - the trace message.
cause - the reason (if any) this trace message was generated.
timeStamp - the time (in ms since January 1, 1970 UTC) that the message was generated.
Throws:
java.lang.NullPointerException - if any parameter is null.
java.lang.IllegalArgumentException - if traceLevel == Level.OFF.
UnrecognizedComponentException - if messageSource is not a recognizable ComponentID object for the SLEE or it does not correspond with a component installed in the SLEE.
FacilityException - if the trace could not be generated due to a system-level failure.