public abstract class Listener extends Object
This class does not define the update() method, the call back method from the runtime when a sample should be taken. The expectation is that immediately derived classes define an interface to the update() method from which classes may be further derived.
CONSTRAINTS:
Classes that are derived from Listener
must be annotated as Uninterruptible
to ensure that they
are not interrupted by a thread switch.
Since thread switching is disabled, listeners are
expected to complete execution quickly, and therefore,
must do a minimal amount of work.
Modifier and Type | Field and Description |
---|---|
private boolean |
active
Is the listener active or passive?
|
private Organizer |
organizer
the associated organizer
|
Constructor and Description |
---|
Listener() |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Transition listener to active state
|
void |
activateOrganizer()
Wake up the organizer thread (if any) associated with the listener
|
boolean |
isActive() |
void |
passivate()
Transition listener to passive state
|
abstract void |
report()
Entry point to dump what has been collected.
|
abstract void |
reset()
Reset the listeners data structures in preparation of a new sampling
window.
|
void |
setOrganizer(Organizer organizer) |
private boolean active
public Listener()
public abstract void report()
public final boolean isActive()
public final void activate()
public final void passivate()
public abstract void reset()
public final void setOrganizer(Organizer organizer)
public final void activateOrganizer()