|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rational.test.lt.recorder.core.extensibility.AnnotationStateHandler
public abstract class AnnotationStateHandler
Handles state management for one or more annotation types. Only one handler can manage
states for a specific annotation type. Handlers must be declared using the extension point
com.ibm.rational.test.lt.recorder.core.recorderAnnotation.
A state manager can process annotations sent to the annotation recorder by overriding
AnnotationStateHandler.annotate(RecorderAnnotation, long)
. It can decide to not allow the annotation
to be recorded. In addition, a state handler can publish some services to external entities
(such as a UI control) by defining an interface it extends and that extends
IAnnotationStateHandler
. It allows external entities to register themselves as
listener to the state handler. In order to broadcast events to listeners, the state handler
must notify them using AnnotationStateHandler.notifyListeners(IAnnotationStateEvent)
.
Constructor Summary | |
---|---|
AnnotationStateHandler()
|
Method Summary | |
---|---|
void |
addListener(IAnnotationStateListener listener)
|
void |
addManagedAnnotationType(String type)
|
void |
annotate(RecorderAnnotation annotation,
long interactionTime)
Sub-classes should override this method in order to examine the annotation. |
void |
complete()
Invoked when the annotation recorder is about to terminate. |
Set<String> |
getManagedAnnotationTypes()
|
protected com.ibm.rational.test.lt.recorder.core.internal.annotations.AnnotationRecorder |
getRecorder()
|
void |
initialize()
Invoked when the annotation recorder has just started running. |
protected void |
notifyListeners(IAnnotationStateEvent event)
|
void |
removeListener(IAnnotationStateListener listener)
|
void |
setRecorder(com.ibm.rational.test.lt.recorder.core.internal.annotations.AnnotationRecorder recorder)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationStateHandler()
Method Detail |
---|
public final void setRecorder(com.ibm.rational.test.lt.recorder.core.internal.annotations.AnnotationRecorder recorder)
protected final com.ibm.rational.test.lt.recorder.core.internal.annotations.AnnotationRecorder getRecorder()
public final void addManagedAnnotationType(String type)
public final Set<String> getManagedAnnotationTypes()
public void annotate(RecorderAnnotation annotation, long interactionTime)
annotation
- The annotation to process.interactionTime
- How long the user spent interacting with the UI in
order to make this annotation.public void addListener(IAnnotationStateListener listener)
addListener
in interface IAnnotationStateHandler
public void removeListener(IAnnotationStateListener listener)
removeListener
in interface IAnnotationStateHandler
protected void notifyListeners(IAnnotationStateEvent event)
public void initialize()
public void complete()
|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |