org.apache.uima.internal.util
Class InstrumentationFacility_impl

java.lang.Object
  extended by org.apache.uima.internal.util.InstrumentationFacility_impl
All Implemented Interfaces:
InstrumentationFacility

public class InstrumentationFacility_impl
extends java.lang.Object
implements InstrumentationFacility

Reference implementation of InstrumentationFacility.


Constructor Summary
InstrumentationFacility_impl(ProcessTrace aProcessTrace)
          Creates a new InstrumentationFacility_impl.
 
Method Summary
 void addEvent(java.lang.String aResourceName, java.lang.String aType, java.lang.String aDescription, int aDuration, java.lang.String aResultMsg)
          Records a completed event with the specified parameters.
 void endEvent(java.lang.String aComponentName, java.lang.String aEventType, java.lang.String aResultMessage)
          Records the end of an event.
 void setProcessTrace(ProcessTrace aProcessTrace)
          Sets the process trace object wrapped by this instrumentation facility.
 void startEvent(java.lang.String aComponentName, java.lang.String aEventType, java.lang.String aDescription)
          Records the start of an event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentationFacility_impl

public InstrumentationFacility_impl(ProcessTrace aProcessTrace)
Creates a new InstrumentationFacility_impl.

Parameters:
aProcessTrace - the process trace object in which to record instrumentation information.
Method Detail

startEvent

public void startEvent(java.lang.String aComponentName,
                       java.lang.String aEventType,
                       java.lang.String aDescription)
Description copied from interface: InstrumentationFacility
Records the start of an event. The event will be ended when there is a corresponding call to InstrumentationFacility.endEvent(String,String,String) with the same component name and event type. The duration of the event will be automatically computed from the difference in time between the start and end.

Specified by:
startEvent in interface InstrumentationFacility
Parameters:
aComponentName - name of the component generating the event
aEventType - type of the event. Standard types are defined as constants on the ProcessTraceEvent interface, but any string may be used.
aDescription - description of the event
See Also:
InstrumentationFacility.startEvent(java.lang.String, java.lang.String, java.lang.String)

endEvent

public void endEvent(java.lang.String aComponentName,
                     java.lang.String aEventType,
                     java.lang.String aResultMessage)
Description copied from interface: InstrumentationFacility
Records the end of an event. The event is identified by the component name and type. If there is no open event that matches those values, a UIMA_IllegalStateException will be thrown.

Specified by:
endEvent in interface InstrumentationFacility
Parameters:
aComponentName - name of the component generating the event
aEventType - type of the event. Standard types are defined as constants on the ProcessTraceEvent interface, but any string may be used.
aResultMessage - describes the result of the event
See Also:
InstrumentationFacility.endEvent(java.lang.String, java.lang.String, java.lang.String)

addEvent

public void addEvent(java.lang.String aResourceName,
                     java.lang.String aType,
                     java.lang.String aDescription,
                     int aDuration,
                     java.lang.String aResultMsg)
Description copied from interface: InstrumentationFacility
Records a completed event with the specified parameters.

Specified by:
addEvent in interface InstrumentationFacility
Parameters:
aResourceName - name of the component generating the event
aType - type of the event. Standard types are defined as constants on the ProcessTraceEvent interface, but any string may be used.
aDescription - description of the event
aDuration - duration of the event in milliseconds
aResultMsg - result message of event
See Also:
InstrumentationFacility.addEvent(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String)

setProcessTrace

public void setProcessTrace(ProcessTrace aProcessTrace)
Sets the process trace object wrapped by this instrumentation facility. This is not part of the InstrumentationFacility interface.



Copyright © 2010 The Apache Software Foundation. All Rights Reserved.