IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.base
Class EventManager

java.lang.Object
  extended bycom.ibm.dse.base.EventManager
All Implemented Interfaces:
CSNotificationListener, java.util.EventListener

public class EventManager
extends java.lang.Object
implements CSNotificationListener

This class manages the flow of events between the notifiers (producers of the events) and the handlers (consumers of the events), both when the event is produced locally or remotelly in a server machine. To make this possible, the server and the client should have only one instance of the EventManager existing at any given moment. To make the EventManager more easily addressable, most of its interface is based on static methods.


Field Summary
static java.lang.String COMPID
          Keeps the component identification that will be used by the traces tool.
protected  Vector exceptionHandlerList
           
protected  Hashtable handlersList
           
protected static boolean isCSNotificationListener
           
protected static Hashtable mirrorNotifiers
           
protected static Vector notifierList
           
protected static Operation operation
           
protected  Hashtable remoteHandlersList
           
protected static EventManager uniqueInstance
           
protected static Hashtable workstationList
           
 
Constructor Summary
EventManager()
           
 
Method Summary
static void addHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext)
          Registers the event Handler to the Notifier, whether the notifier exists on this machine or not.
static void addHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aServerTID)
          Registers the event Handler to the Notifier if the notifier exists on the specified server.
static void addHandler(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aSessionId)
          Registers the client to the Notifier aNotifierName as interested in the specified event for the duration of the session.
static void addHandlerForException(Handler aHandler)
          Registers the specified Handler for exceptions.
static void addHandlerForException(Handler aHandler, java.lang.String aServerTID)
          Registers the specified Handler for exceptions originating from the server identified by aServerTID.
protected static void addHandlerForException(java.lang.String aSessionId)
          Registers a Handler for exceptions originating from a server.
static void addNotifier(Notifier aNotifier)
          Adds a Notifier to the list of Notifiers.
static void addNotifier(Notifier aNotifier, java.lang.String aTID)
          Adds a Notifier to the list of Notifiers.
protected static void addWorkstation(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aWorkstationTID)
          Adds the specified workstation to the workstationList.
static void deregisterInterestInRemoteEvent(java.lang.String anEventName, java.lang.String aNotifierName)
          Deregisters the client as no longer interested in the event anEventName originating from the specified Notifier.
static void deregisterInterestInRemoteEvent(java.lang.String anEventName, java.lang.String aNotifierName, CSClientService aCSClient)
          Deregisters the specified client as no longer interested in an event "anEventName" originating from the specified Notifier.
static void deregisterInterestInRemoteEvent(Vector aList)
          Deregisters the client as no longer interested in certain events.
static void deregisterInterestInRemoteEvent(Vector aList, CSClientService aCSClient)
          Deregisters the specified client as no longer interested in certain events.
static void deregisterInterestInRemoteException()
          Deregisters the client as no longer interested in server-side exceptions.
static void deregisterInterestInRemoteException(CSClientService aCSClient)
          Deregisters the specified client as no longer interested in server-side exceptions.
static void deregisterServerInterestInEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, CSClientService aCSClient)
          Deregisters the server as no longer interested in an event originating from the specified client.
protected static MirrorNotifier getMirrorNotifier(java.lang.String aNotifierName)
          Returns the MirrorNotifier named aNotifierName.
protected static Hashtable getMirrorNotifiers()
          Returns the mirrorNotifiers attribute value.
protected static Notifier getNotifier(java.lang.String aNotifierName)
          Returns the Notifier named aNotifierName.
protected static Vector getNotifierList()
          Returns the notifierList attribute value.
protected static Operation getOperation()
          Returns the operation attribute value.
protected static EventManager getUniqueInstance()
          Returns the unique instance of EventManager running on the application environment.
protected static Hashtable getWorkstationList()
          Returns the workstationList attribute value.
 void handleCSNotificationEvent(CSNotificationEvent event)
          Calls the dispatch methods of the registered Handlers based on the information included in the event CSNotificationEvent.
protected static boolean hasHandlersInterestedIn(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aTID)
          Returns true if the EventManager has a Handler registered for the specified remote event.
static void registerInterestInRemoteEvent(java.lang.String anEventName, java.lang.String aNotifierName)
          Registers the client as interested in the event anEventName originating from the specified Notifier.
static void registerInterestInRemoteEvent(java.lang.String anEventName, java.lang.String aNotifierName, CSClientService aCSClient)
          Registers the specified client as interested in the event anEventName originating from the specified Notifier.
static void registerInterestInRemoteEvent(Vector aList)
          Registers the client as interested in certain events.
static void registerInterestInRemoteEvent(Vector aList, CSClientService aCSClient)
          Registers the specified client as interested in certain events.
static void registerInterestInRemoteException()
          Registers the client as interested in server-side exceptions.
static void registerInterestInRemoteException(CSClientService aCSClient)
          Registers the specified client as interested in server-side exceptions.
static void registerServerInterestInEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, CSClientService aCSClient)
          Registers the server as interested in an event originating from the specified client.
static void removeHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext)
          Deregisters the event Handler from the notifier, whether the Notifier exists on this machine or not.
static void removeHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID)
          Deregisters the event Handler from the notifier if the Notifier exists on the specified server.
static void removeHandler(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aSessionId)
          Deregisters the client to the Notifier "aNotifierName" as interested in the specified event for the duration of the session.
static void removeHandlerForException(Handler aHandler)
          Deregisters the specified Handler for exceptions.
protected static void removeHandlerForException(java.lang.String aSessionId)
          Deregisters the specified Handler for exceptions originating from the server.
static void removesHandlerForException(Handler aHandler, java.lang.String aServerTID)
          Deregisters the specified Handler for exceptions originating from the server identified by aServerTID.
protected static void removeWorkstation(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aClientWorkstation)
          Removes the specifed workstation from the workstationList.
static void reset()
          Initializes this class.
static void sendException(DSEException anException)
          Sends an exception.
protected static void setOperation(Operation anOperation)
          Sets the value of operation.
protected static void setUniqueInstance(EventManager anEventManager)
          Sets the uniqueInstance attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPID

public static final java.lang.String COMPID
Keeps the component identification that will be used by the traces tool.

See Also:
Constant Field Values

handlersList

protected Hashtable handlersList

remoteHandlersList

protected Hashtable remoteHandlersList

exceptionHandlerList

protected Vector exceptionHandlerList

notifierList

protected static Vector notifierList

operation

protected static Operation operation

uniqueInstance

protected static EventManager uniqueInstance

workstationList

protected static Hashtable workstationList

mirrorNotifiers

protected static Hashtable mirrorNotifiers

isCSNotificationListener

protected static boolean isCSNotificationListener
Constructor Detail

EventManager

public EventManager()
Method Detail

addHandler

public static void addHandler(Handler aHandler,
                              java.lang.String anEventName,
                              java.lang.String aNotifierName,
                              Context aContext)
                       throws DSEInvalidArgumentException
Registers the event Handler to the Notifier, whether the notifier exists on this machine or not.

Parameters:
aHandler - com.ibm.dse.base.Handler - The Handler that wants to register for an event
anEventName - java.lang.String - The name of the event the Handler is interested in
aNotifierName - java.lang.String - The name of the Notifier that will signal the event identified as anEventName
aContext - com.ibm.dse.base.Context - The context where the EventManager will look for the notifier aNotifierName
Throws:
DSEInvalidArgumentException

addHandler

public static void addHandler(Handler aHandler,
                              java.lang.String anEventName,
                              java.lang.String aNotifierName,
                              Context aContext,
                              java.lang.String aServerTID)
                       throws DSEInvalidArgumentException
Registers the event Handler to the Notifier if the notifier exists on the specified server.

Parameters:
aHandler - com.ibm.dse.base.Handler - The Handler that wants to register for an event
anEventName - java.lang.String - The name of the event the Handler is interested in
aNotifierName - java.lang.String - The name of the Notifier that will signal the event identified as anEventName
aContext - com.ibm.dse.base.Context
aServerTID - java.lang.String - The TID of the server where the event will be produced
Throws:
DSEInvalidArgumentException

addHandler

public static void addHandler(java.lang.String anEventName,
                              java.lang.String aNotifierName,
                              java.lang.String aSessionId)
                       throws DSEInvalidArgumentException,
                              DSEInvalidRequestException,
                              DSEObjectNotFoundException,
                              DSEHandlerNotFoundException,
                              DSEException
Registers the client to the Notifier aNotifierName as interested in the specified event for the duration of the session. This method is invoked during the execution of the EventManagerServerOperation operation in the server.

Parameters:
anEventName - java.lang.String - The name of the event the client will be interested in
aNotifierName - java.lang.String - The name of the Notifier that will produce the event anEventName
aSessionId - java.lang.String - The identification of the session between client and server
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException
DSEObjectNotFoundException
DSEHandlerNotFoundException
DSEException

addHandlerForException

public static void addHandlerForException(Handler aHandler)
                                   throws DSEInvalidArgumentException
Registers the specified Handler for exceptions.

Parameters:
aHandler - com.ibm.dse.base.Handler
Throws:
DSEInvalidArgumentException

addHandlerForException

public static void addHandlerForException(Handler aHandler,
                                          java.lang.String aServerTID)
                                   throws DSEInvalidArgumentException
Registers the specified Handler for exceptions originating from the server identified by aServerTID.

Parameters:
aHandler - com.ibm.dse.base.Handler
aServerTID - java.lang.String - The TID of the server where the exception will be originated
Throws:
DSEInvalidArgumentException

addHandlerForException

protected static void addHandlerForException(java.lang.String aSessionId)
                                      throws DSEInvalidRequestException,
                                             DSEObjectNotFoundException
Registers a Handler for exceptions originating from a server. This method is invoked during the execution of the EventManagerServerOperation operation in the server.

Parameters:
aSessionId - java.lang.String - The identification of the session between the client that has the Handler and server
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

addNotifier

public static void addNotifier(Notifier aNotifier)
                        throws DSEInvalidArgumentException
Adds a Notifier to the list of Notifiers. Checks if there are handlers already interested in events from this notifier. Each Notifier should run this method in its constructor DSENotifier(String aName).

Parameters:
aNotifier - com.ibm.dse.base.Notifier
Throws:
DSEInvalidArgumentException

addNotifier

public static void addNotifier(Notifier aNotifier,
                               java.lang.String aTID)
                        throws DSEInvalidArgumentException
Adds a Notifier to the list of Notifiers. Checks if there are handlers in the client identified by aTID already interested in events from this notifier. Each Notifier should run this method in its constructor DSENotifier(String aName, String aTID).

Parameters:
aNotifier - com.ibm.dse.base.Notifier
aTID - java.lang.String - The TID of the client, where there may be a Handler interested in an event produced by the notifier "aNotifier."
Throws:
DSEInvalidArgumentException

addWorkstation

protected static void addWorkstation(java.lang.String anEventName,
                                     java.lang.String aNotifierName,
                                     java.lang.String aWorkstationTID)
Adds the specified workstation to the workstationList.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aWorkstationTID - java.lang.String

deregisterInterestInRemoteEvent

public static void deregisterInterestInRemoteEvent(Vector aList)
                                            throws DSEInvalidRequestException,
                                                   java.io.IOException,
                                                   DSECSInvalidRequestException,
                                                   DSECSRemoteOperationException,
                                                   DSECSTimeoutException,
                                                   DSEObjectNotFoundException
Deregisters the client as no longer interested in certain events. This method is executed in the client to launch an operation that passes a list of events to the EventManager in the server. As a result, the listed events are no longer sent to the client.

Parameters:
aList - com.ibm.dse.base.Vector
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

deregisterInterestInRemoteEvent

public static void deregisterInterestInRemoteEvent(Vector aList,
                                                   CSClientService aCSClient)
                                            throws DSEInvalidRequestException,
                                                   java.io.IOException,
                                                   DSECSInvalidRequestException,
                                                   DSECSRemoteOperationException,
                                                   DSECSTimeoutException,
                                                   DSEObjectNotFoundException
Deregisters the specified client as no longer interested in certain events. This method is executed in the client to launch an operation that passes a list of events to the EventManager in the server. As a result, the listed events are no longer sent to the specified client.

Parameters:
aList - com.ibm.dse.base.Vector
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session with a specific server machine
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

deregisterInterestInRemoteEvent

public static void deregisterInterestInRemoteEvent(java.lang.String anEventName,
                                                   java.lang.String aNotifierName)
                                            throws DSEInvalidRequestException,
                                                   java.io.IOException,
                                                   DSECSInvalidRequestException,
                                                   DSECSRemoteOperationException,
                                                   DSECSTimeoutException,
                                                   DSEObjectNotFoundException
Deregisters the client as no longer interested in the event anEventName originating from the specified Notifier. This method is executed in the client to launch an operation that passes the name of the event to the EventManager in the server. As a result, the event is no longer sent to the client.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

deregisterInterestInRemoteEvent

public static void deregisterInterestInRemoteEvent(java.lang.String anEventName,
                                                   java.lang.String aNotifierName,
                                                   CSClientService aCSClient)
                                            throws DSEInvalidRequestException,
                                                   java.io.IOException,
                                                   DSECSInvalidRequestException,
                                                   DSECSRemoteOperationException,
                                                   DSECSTimeoutException,
                                                   DSEObjectNotFoundException
Deregisters the specified client as no longer interested in an event "anEventName" originating from the specified Notifier. This method is executed in the client to launch an operation that passes the name of the event to the EventManager in the server. As a result, the event is no longer sent to the specified client.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService which keeps the session with a specific server machine
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

deregisterInterestInRemoteException

public static void deregisterInterestInRemoteException()
                                                throws DSEInvalidRequestException,
                                                       java.io.IOException,
                                                       DSECSInvalidRequestException,
                                                       DSECSRemoteOperationException,
                                                       DSECSTimeoutException,
                                                       DSEObjectNotFoundException
Deregisters the client as no longer interested in server-side exceptions. This method is executed in the client to launch an operation that removes the client from the list of clients interested in server exceptions. As a result, the server exceptions are no longer sent to the client.

Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

deregisterInterestInRemoteException

public static void deregisterInterestInRemoteException(CSClientService aCSClient)
                                                throws DSEInvalidRequestException,
                                                       java.io.IOException,
                                                       DSECSInvalidRequestException,
                                                       DSECSRemoteOperationException,
                                                       DSECSTimeoutException,
                                                       DSEObjectNotFoundException
Deregisters the specified client as no longer interested in server-side exceptions. This method is executed in the client to launch an operation that removes the client from the list of clients interested in server exceptions. As a result, the server exceptions are no longer sent to the client.

Parameters:
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session with a specific server machine
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

deregisterServerInterestInEvent

public static void deregisterServerInterestInEvent(java.lang.String anEventName,
                                                   java.lang.String aNotifierName,
                                                   Context aContext,
                                                   CSClientService aCSClient)
                                            throws DSEInvalidArgumentException,
                                                   DSEHandlerNotFoundException
Deregisters the server as no longer interested in an event originating from the specified client. As a result, the event is no longer sent to the server.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aContext - com.ibm.dse.base.Context
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session between client and server
Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

getMirrorNotifier

protected static MirrorNotifier getMirrorNotifier(java.lang.String aNotifierName)
Returns the MirrorNotifier named aNotifierName.

Parameters:
aNotifierName - java.lang.String
Returns:
com.ibm.dse.base.MirrorNotifier

getMirrorNotifiers

protected static Hashtable getMirrorNotifiers()
Returns the mirrorNotifiers attribute value.

Returns:
com.ibm.dse.base.Hashtable

getNotifier

protected static Notifier getNotifier(java.lang.String aNotifierName)
Returns the Notifier named aNotifierName.

Parameters:
aNotifierName - java.lang.String
Returns:
com.ibm.dse.base.Notifier

getNotifierList

protected static Vector getNotifierList()
Returns the notifierList attribute value.

Returns:
com.ibm.dse.base.Vector

getOperation

protected static Operation getOperation()
Returns the operation attribute value.

Returns:
com.ibm.dse.base.Operation

getUniqueInstance

protected static EventManager getUniqueInstance()
Returns the unique instance of EventManager running on the application environment.

Returns:
com.ibm.dse.base.EventManager

getWorkstationList

protected static Hashtable getWorkstationList()
Returns the workstationList attribute value.

Returns:
com.ibm.dse.base.Hashtable

handleCSNotificationEvent

public void handleCSNotificationEvent(CSNotificationEvent event)
Calls the dispatch methods of the registered Handlers based on the information included in the event CSNotificationEvent. The information should contain the DSEEventObject signaled in the remote workstation. This method is called when a CSNotificationEvent is signaled by the client/server mechanism.

Specified by:
handleCSNotificationEvent in interface CSNotificationListener
Parameters:
event - com.ibm.dse.clientserver.CSNotificationEvent

hasHandlersInterestedIn

protected static boolean hasHandlersInterestedIn(java.lang.String anEventName,
                                                 java.lang.String aNotifierName,
                                                 java.lang.String aTID)
Returns true if the EventManager has a Handler registered for the specified remote event.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aTID - java.lang.String
Returns:
boolean

registerInterestInRemoteEvent

public static void registerInterestInRemoteEvent(Vector aList)
                                          throws DSEInvalidRequestException,
                                                 java.io.IOException,
                                                 DSECSInvalidRequestException,
                                                 DSECSRemoteOperationException,
                                                 DSECSTimeoutException,
                                                 DSEObjectNotFoundException
Registers the client as interested in certain events. This method is executed in the client to launch an operation that passes a list of events to the EventManager in the server. As a result, the listed events are now sent to the client.

Parameters:
aList - com.ibm.dse.base.Vector
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

registerInterestInRemoteEvent

public static void registerInterestInRemoteEvent(Vector aList,
                                                 CSClientService aCSClient)
                                          throws DSEInvalidRequestException,
                                                 java.io.IOException,
                                                 DSECSInvalidRequestException,
                                                 DSECSRemoteOperationException,
                                                 DSECSTimeoutException,
                                                 DSEObjectNotFoundException
Registers the specified client as interested in certain events. This method is executed in the client to launch an operation that passes a list of events to the EventManager in the server. As a result, the listed events are now sent to the specified client.

Parameters:
aList - com.ibm.dse.base.Vector
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session between client and server
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

registerInterestInRemoteEvent

public static void registerInterestInRemoteEvent(java.lang.String anEventName,
                                                 java.lang.String aNotifierName)
                                          throws DSEInvalidRequestException,
                                                 java.io.IOException,
                                                 DSECSInvalidRequestException,
                                                 DSECSRemoteOperationException,
                                                 DSECSTimeoutException,
                                                 DSEObjectNotFoundException
Registers the client as interested in the event anEventName originating from the specified Notifier. This method is executed in the client to launch an operation that passes the name of the event to the EventManager in the server. As a result, the event is now sent to the client.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

registerInterestInRemoteEvent

public static void registerInterestInRemoteEvent(java.lang.String anEventName,
                                                 java.lang.String aNotifierName,
                                                 CSClientService aCSClient)
                                          throws DSEInvalidRequestException,
                                                 java.io.IOException,
                                                 DSECSInvalidRequestException,
                                                 DSECSRemoteOperationException,
                                                 DSECSTimeoutException,
                                                 DSEObjectNotFoundException
Registers the specified client as interested in the event anEventName originating from the specified Notifier. This method is executed in the client to launch an operation that passes the name of the event to the EventManager in the server. As a result, the event is now sent to the specified client.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session between client and server
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

registerInterestInRemoteException

public static void registerInterestInRemoteException()
                                              throws DSEInvalidRequestException,
                                                     java.io.IOException,
                                                     DSECSInvalidRequestException,
                                                     DSECSRemoteOperationException,
                                                     DSECSTimeoutException,
                                                     DSEObjectNotFoundException
Registers the client as interested in server-side exceptions. This method is executed in the client to launch an operation that adds the client to the list of clients interested in server exceptions. As a result, the server exceptions are now sent to the client.

Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

registerInterestInRemoteException

public static void registerInterestInRemoteException(CSClientService aCSClient)
                                              throws DSEInvalidRequestException,
                                                     java.io.IOException,
                                                     DSECSInvalidRequestException,
                                                     DSECSRemoteOperationException,
                                                     DSECSTimeoutException,
                                                     DSEObjectNotFoundException
Registers the specified client as interested in server-side exceptions. This method is executed in the client to launch an operation that adds the client to the list of clients interested in server exceptions. As a result, the server exceptions are now sent to the client.

Parameters:
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session between client and server
Throws:
DSEInvalidRequestException
java.io.IOException
DSECSInvalidRequestException
DSECSRemoteOperationException
DSECSTimeoutException
DSEObjectNotFoundException

registerServerInterestInEvent

public static void registerServerInterestInEvent(java.lang.String anEventName,
                                                 java.lang.String aNotifierName,
                                                 Context aContext,
                                                 CSClientService aCSClient)
                                          throws DSEInvalidArgumentException
Registers the server as interested in an event originating from the specified client. As a result, the event is now sent to the server.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aContext - com.ibm.dse.base.Context - The context where the EventManager will look for the notifier "aNotifierName"
aCSClient - com.ibm.dse.clientserver.CSClientService - The CSClientService instance which keeps the session between client and server
Throws:
DSEInvalidArgumentException

removeHandler

public static void removeHandler(Handler aHandler,
                                 java.lang.String anEventName,
                                 java.lang.String aNotifierName,
                                 Context aContext)
                          throws DSEInvalidArgumentException,
                                 DSEHandlerNotFoundException
Deregisters the event Handler from the notifier, whether the Notifier exists on this machine or not.

Parameters:
aHandler - com.ibm.dse.base.Handler - The Handler that wants to deregister for an event
anEventName - java.lang.String - The name of the event the Handler is no longer interested in
aNotifierName - java.lang.String - The name of the Notifier that will signal the event identified as "anEventName"
aContext - com.ibm.dse.base.Context - The context where the EventManager will look for the notifier "aNotifierName"
Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

removeHandler

public static void removeHandler(Handler aHandler,
                                 java.lang.String anEventName,
                                 java.lang.String aNotifierName,
                                 Context aContext,
                                 java.lang.String aTID)
                          throws DSEHandlerNotFoundException,
                                 DSEInvalidArgumentException
Deregisters the event Handler from the notifier if the Notifier exists on the specified server.

Parameters:
aHandler - com.ibm.dse.base.Handler - The Handler that wants to deregister for an event
anEventName - java.lang.String - The name of the event the Handler is no more interested in
aNotifierName - java.lang.String - The name of the Notifier that will signal the event identified as anEventName
aContext - com.ibm.dse.base.Context
aTID - java.lang.String - The TID of the server
Throws:
DSEHandlerNotFoundException
DSEInvalidArgumentException

removeHandler

public static void removeHandler(java.lang.String anEventName,
                                 java.lang.String aNotifierName,
                                 java.lang.String aSessionId)
                          throws DSEHandlerNotFoundException,
                                 DSEInvalidArgumentException,
                                 DSEInvalidRequestException,
                                 DSEObjectNotFoundException
Deregisters the client to the Notifier "aNotifierName" as interested in the specified event for the duration of the session. This method is invoked during the execution of the EventManagerServerOperation operation in the server.

Parameters:
anEventName - java.lang.String - The name of the event the client is no longer interested in
aNotifierName - java.lang.String - The name of the Notifier that will produce the event "anEventName"
aSessionId - java.lang.String - The identification of the session between client and server
Throws:
DSEHandlerNotFoundException
DSEInvalidArgumentException
DSEInvalidRequestException
DSEObjectNotFoundException

removeHandlerForException

public static void removeHandlerForException(Handler aHandler)
                                      throws DSEInvalidArgumentException,
                                             DSEHandlerNotFoundException
Deregisters the specified Handler for exceptions.

Parameters:
aHandler - com.ibm.dse.base.Handler
Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

removeHandlerForException

protected static void removeHandlerForException(java.lang.String aSessionId)
                                         throws DSEInvalidRequestException,
                                                DSEObjectNotFoundException
Deregisters the specified Handler for exceptions originating from the server. This method is invoked during the execution of the "EventManagerServerOperation" operation in the server.

Parameters:
aSessionId - java.lang.String - The identification of the session between the client that has the Handler and server
Throws:
DSEInvalidRequestException
DSEObjectNotFoundException

removesHandlerForException

public static void removesHandlerForException(Handler aHandler,
                                              java.lang.String aServerTID)
                                       throws DSEInvalidArgumentException,
                                              DSEHandlerNotFoundException
Deregisters the specified Handler for exceptions originating from the server identified by aServerTID.

Parameters:
aHandler - com.ibm.dse.base.Handler
aServerTID - java.lang.String - The TID of the server where the exception will be originated
Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

removeWorkstation

protected static void removeWorkstation(java.lang.String anEventName,
                                        java.lang.String aNotifierName,
                                        java.lang.String aClientWorkstation)
Removes the specifed workstation from the workstationList.

Parameters:
anEventName - java.lang.String
aNotifierName - java.lang.String
aClientWorkstation - java.lang.String

reset

public static void reset()
Initializes this class.


sendException

public static void sendException(DSEException anException)
Sends an exception.

Parameters:
anException - com.ibm.dse.base.DSEException

setOperation

protected static void setOperation(Operation anOperation)
Sets the value of operation.

Parameters:
anOperation - com.ibm.dse.base.Operation

setUniqueInstance

protected static void setUniqueInstance(EventManager anEventManager)
Sets the uniqueInstance attribute value. This should be the only instance of EventManager in the application environment (either in a client or in a server).

Parameters:
anEventManager - com.ibm.dse.base.EventManager

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005