|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.event.EventManager
public class EventManager
The event-manager allows registrating for events, unregistrating, and raising events.
Field Summary | |
---|---|
static int |
CURRENT_TX
execute event in current transaction |
static int |
NEW_TX
reserved for future use, execute event in a new transaction (not yet implemented) |
Constructor Summary | |
---|---|
EventManager()
|
Method Summary | |
---|---|
static void |
raiseEvent(Event e)
Raises an event. |
static long |
register(java.lang.String name,
java.lang.Class<? extends IEventHandler> eh,
java.lang.Object context)
Register an event handler |
static long |
register(java.lang.String name,
java.lang.Class<? extends IEventHandler> eh,
java.lang.Object context,
ActivityInstance registrant)
Register an event handler |
static void |
unregister(long oid)
unregister an event handler |
static void |
unregister(java.lang.String name,
ProcessInstance registrant)
Unregister all event handler for the named event. |
static void |
unregisterAll(ActivityInstance registrant)
|
static void |
unregisterAll(ProcessInstance registrant)
unregister all event handlers of a process |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CURRENT_TX
public static final int NEW_TX
Constructor Detail |
---|
public EventManager()
Method Detail |
---|
public static void raiseEvent(Event e)
e
- the eventpublic static long register(java.lang.String name, java.lang.Class<? extends IEventHandler> eh, java.lang.Object context)
name
- the name of the eventeh
- the class of the eventhandler, must be a subclass of EventHandlercontext
- a context object
public static long register(java.lang.String name, java.lang.Class<? extends IEventHandler> eh, java.lang.Object context, ActivityInstance registrant)
name
- the name of the eventeh
- the class of the eventhandler, must be a subclass of EventHandlercontext
- a context objectregistrant
- an activity of te registering process instance, or the process instance itself
public static void unregister(long oid)
public static void unregister(java.lang.String name, ProcessInstance registrant) throws java.lang.Exception
name
- the event nameregistrant
- the process which registered
java.lang.Exception
public static void unregisterAll(ProcessInstance registrant)
public static void unregisterAll(ActivityInstance registrant)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |