Package com.sun.javatest
Class ObservableTestFilter
java.lang.Object
com.sun.javatest.TestFilter
com.sun.javatest.ObservableTestFilter
- Direct Known Subclasses:
LastRunFilter
,ParameterFilter
An extension to the basic test filter which provides observer capabilities.
The observer can be used to receive notification when the filter changes
state. A typical response to that change message may be to run a set of
tests back through the filter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
An observer that is notified when the filter has been changed.Nested classes/interfaces inherited from class com.sun.javatest.TestFilter
TestFilter.Fault
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ObservableTestFilter.Observer[]
The set of observers for this filter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an observer to be notified when this filter has been changed.protected void
notifyUpdated
(ObservableTestFilter filter) Notify observers that this filter has changed it's internal state (behavior).void
Remove a previously registered observer so that it will no longer be notified of changes to this filter.Methods inherited from class com.sun.javatest.TestFilter
accepts, accepts, accepts, accepts, getDescription, getName, getReason
-
Field Details
-
observers
The set of observers for this filter.
-
-
Constructor Details
-
ObservableTestFilter
public ObservableTestFilter()
-
-
Method Details
-
addObserver
Add an observer to be notified when this filter has been changed.- Parameters:
o
- The observer to be registered. Should never be null.
-
removeObserver
Remove a previously registered observer so that it will no longer be notified of changes to this filter.- Parameters:
o
- The filter to be un-registered.
-
notifyUpdated
Notify observers that this filter has changed it's internal state (behavior).- Parameters:
filter
- the filter that has changed
-