Package com.groiss.event
Interface IEventHandler
- All Known Implementing Classes:
EventHandler
public interface IEventHandler
Interface for event handler.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
handle
(Event e, ProcessInstance handlerProc, EventRegistry reg) The handle method is called when an event is raised and a handler has been registered.boolean
This method is called before the handler is actually registeredvoid
This method is called when the handler is unregistered.
-
Method Details
-
handle
The handle method is called when an event is raised and a handler has been registered. The return value is used only in "sync" event handlers, where returning true immediatly finishs the activity and ungegisters the handler.- Parameters:
e
- the raised eventhandlerProc
- the process instance which has registered for the event.reg
- the event registry entry- Returns:
- this implementation returns true
-
onRegister
boolean onRegister()This method is called before the handler is actually registered- Returns:
- if true is returned the handler will be registered, if false is returned, the handler will not be registered (in this case a sync terminates immediately)
-
onUnregister
This method is called when the handler is unregistered.- Parameters:
reg
-
-