public abstract class AnnotationStateHandler extends Object implements IAnnotationStateHandler
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 and Description |
---|
AnnotationStateHandler() |
Modifier and Type | Method and Description |
---|---|
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) |
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 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()
© Copyright IBM Corp. 2013. All rights reserved.