public interface EventHandler
Implementations are server plug-ins that perform custom processing of registered events or periodic processing at specified time intervals.
Modifier and Type | Method and Description |
---|---|
void |
handleDispose(EventHandlerContext context)
Called when the EventHandler instance will no longer
be used.
|
void |
handleEventPosted(EventHandlerContext context)
Called when at least one registered event is posted.
|
void |
handleInitialize(EventHandlerContext context)
Initializes this EventHandler.
|
void |
handleTimerExpired(EventHandlerContext context)
Called when the timer for this EventHandler expires.
|
void handleInitialize(EventHandlerContext context) throws Exception
Called immediately after construction and before any of the other methods in the interface are invoked.
context
- the EventHandlerContext to use for processingException
- if the operation failsvoid handleEventPosted(EventHandlerContext context) throws Exception
context
- the EventHandlerContext to use for processingException
- if the operation failsvoid handleTimerExpired(EventHandlerContext context) throws Exception
context
- the EventHandlerContext to use for processingException
- if the operation failsvoid handleDispose(EventHandlerContext context) throws Exception
The instance should release any resources it is holding that would not be automatically released as part of normal garbage collection of the object.
context
- the EventHandlerContext to use for processingException
- if the operation failsCopyright © 2023. All rights reserved.