Top Description Fields Constructors Methods
org.glassfish.pfl.tf.timer.spi

public abstract Class TimerEventControllerBase

extends NamedBase
Class Inheritance
Known Direct Subclasses
org.glassfish.pfl.tf.timer.spi.TimerEventController
Imports
java.util.Collections, .HashSet, .Set, org.glassfish.pfl.tf.timer.impl.TimerFactoryImpl

Supports registration of TimerEventHandlers. A subclass of this class must also provide some mechanism to create and propagate TimerEvents, which may be subclasses of TimerEvent if needed. A subclass typically provides methods to indicate when enter and exit. If additional data is stored in the event, customer enter/exit methods can pass the extra data to the extended event.

Field Summary

Modifier and TypeField and Description
private Set<TimerEventHandler>
private Set<TimerEventHandler>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
deregister(TimerEventHandler handler)

Deregister the handler to stop receiving events from this controller.

public Set<TimerEventHandler>
handlers()

Read-only image of the set of Handlers.

protected void
propagate(TimerEvent ev)

Send the event to all registered handlers.

public void
register(TimerEventHandler handler)

Register the handler to start receiving events from this controller.

Inherited from org.glassfish.pfl.tf.timer.spi.NamedBase:
equalsfactoryhashCodenamesetFactorytoString

Field Detail

handlersback to summary
private Set<TimerEventHandler> handlers
roHandlersback to summary
private Set<TimerEventHandler> roHandlers

Constructor Detail

TimerEventControllerBaseback to summary
public TimerEventControllerBase(TimerFactory factory, String name)

Method Detail

deregisterback to summary
public void deregister(TimerEventHandler handler)

Deregister the handler to stop receiving events from this controller.

handlersback to summary
public Set<TimerEventHandler> handlers()

Read-only image of the set of Handlers.

propagateback to summary
protected void propagate(TimerEvent ev)

Send the event to all registered handlers.

registerback to summary
public void register(TimerEventHandler handler)

Register the handler to start receiving events from this controller.