com.groiss.event
Class EventManager

java.lang.Object
  extended by com.groiss.event.EventManager

public class EventManager
extends java.lang.Object

The event-manager allows registrating for events, unregistrating, and raising events.


Field Summary
static int CURRENT_TX
           
static int NEW_TX
           
 
Constructor Summary
EventManager()
           
 
Method Summary
static void raiseEvent(Event e, int txtype)
          Raises an event.
static long register(java.lang.String name, java.lang.Class eh, java.lang.Object context)
          Register an event handler
static long register(java.lang.String name, java.lang.Class 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 an event handler
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

CURRENT_TX

public static final int CURRENT_TX
See Also:
Constant Field Values

NEW_TX

public static final int NEW_TX
See Also:
Constant Field Values
Constructor Detail

EventManager

public EventManager()
Method Detail

raiseEvent

public static void raiseEvent(Event e,
                              int txtype)
                       throws java.lang.Exception
Raises an event.

Parameters:
e - the event
txtype - for future use, ignored
Throws:
java.lang.Exception

register

public static long register(java.lang.String name,
                            java.lang.Class eh,
                            java.lang.Object context)
                     throws java.lang.Exception
Register an event handler

Parameters:
name - the name of the event
eh - the class of the eventhandler, must be a subclass of EventHandler
context - a context object
Returns:
the unique oid of this registration (use for unregister)
Throws:
java.lang.Exception

register

public static long register(java.lang.String name,
                            java.lang.Class eh,
                            java.lang.Object context,
                            ActivityInstance registrant)
                     throws java.lang.Exception
Register an event handler

Parameters:
name - the name of the event
eh - the class of the eventhandler, must be a subclass of EventHandler
context - a context object
registrant - an activity of te registering process instance, or the process instance itself
Returns:
the unique oid of this registration (use for unregister)
Throws:
java.lang.Exception

unregister

public static void unregister(long oid)
                       throws java.lang.Exception
unregister an event handler

Throws:
java.lang.Exception

unregister

public static void unregister(java.lang.String name,
                              ProcessInstance registrant)
                       throws java.lang.Exception
unregister an event handler

Parameters:
name - the event name
registrant - the process which registered (may be null)
Throws:
java.lang.Exception

unregisterAll

public static void unregisterAll(ProcessInstance registrant)
                          throws java.lang.Exception
unregister all event handlers of a process

Throws:
java.lang.Exception


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.