|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.appl.forwarding.base.SystemAvailabilityManager
Field Summary | |
static int |
NOT_KNOWN
|
static int |
OFF_LINE
|
static int |
ON_LINE
|
Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
Constructor Summary | |
protected |
SystemAvailabilityManager()
The constructor is used only by instance() method. |
Method Summary | |
Handler |
dispatchEvent(DSEEventObject anEvent)
This method is called when a notifier generates the event anEvent. |
int |
getBranchStatus()
|
int |
getHostStatus()
|
int |
getTellerStatus()
|
void |
handleEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext)
This method calls the EventManager class that will care of registering the handler to the local notifier if it is defined or to add it to its own list of handlers if the notifier is remote. |
void |
handleEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext,
java.lang.String aTID)
This method calls the EventManager class that will care of registering the handler to the local notifier if it is defined or to add it to its own list of handlers if the notifier is remote. |
static SystemAvailabilityManager |
instance()
Returns the only instance of the class. |
static void |
releaseInstance()
Releases the only instance of this class. |
void |
setBranchStatus(int value)
|
void |
setHostStatus(int status)
|
void |
setTellerStatus(int value)
|
void |
stopHandlingEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext)
This method allows the Handler to stop receiving a specific event it was registered for previously. |
void |
stopHandlingEvent(java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext,
java.lang.String aTID)
This method allows the Handler to stop receiving a specific event it was registered for previously. |
int |
verifyOperationMode()
Checks host (including time-out values), branch, teller and session availability indicators to do this. |
Methods inherited from class com.ibm.dse.base.DSENotifier |
addHandler,
getHandlersList,
getName,
removeHandler,
setName,
signalEvent,
signalEvent,
signalEvent,
terminate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static int ON_LINE
public static int OFF_LINE
public static int NOT_KNOWN
Constructor Detail |
protected SystemAvailabilityManager()
Method Detail |
public Handler dispatchEvent(DSEEventObject anEvent)
anEvent will contain relevant data to be used by the event handler held in a Hashtable, the source of the event and the event name. Any handler is responsible for implementing this method, to check if it is interested in the event and/or pass it to the next interested handler in the chain.
If the method returns this, the notifier will pass the event to the following handler in the chain waiting for it. If the method returns null, the event is not propagated.
The default event processing is to pass the event to the following handler.
public int getBranchStatus()
public int getHostStatus()
public int getTellerStatus()
public void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException
This method throws a DSEInvalidArgumentException generated by the EventManager addHandler method.
public void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws DSEInvalidArgumentException
aServerName is used when the application has session with different remote workstations; it can be a TID
This method throws a DSEInvalidArgumentException generated by the EventManager addHandler method.
public static SystemAvailabilityManager instance()
public static void releaseInstance()
public void setBranchStatus(int value)
value
- intpublic void setHostStatus(int status)
status
- java.lang.Integerpublic void setTellerStatus(int value)
value
- intpublic void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
The notifier will remove the handler from its handlers list for that specific event. If the event name is "allEvents" any reference to the handler in the list of handlers for that notifier will be deleted.
The method invoke an EventManeger method that will check whether the notifier is local or remote. In the first case, it will call the notifier to remove the handler from its list of handlers for that specific event; in the second case, the EventManager will itself remove the handler from its list of handlers.
This method throws a DSEInvalidArgumentException and a DSEHandlerNotFoundException generated by the EventManager removeHandler method.
public void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
The notifier will remove the handler from its handlers list for that specific event. If the event name is "allEvents" any reference to the handler in the list of handlers for that notifier will be deleted.
The method invoke an EventManager method that will check whether the notifier is local or remote. In the first case, it will call the notifier to remove the handler from its list of handlers for that specific event; in the second case, the EventManager will itself remove the handler from its list of handlers and will call the remote EventManager to deregister interest in a remote event if no more handlers in that workstation are waiting for the event. From aContext and aTID, the EventManager knows the C/S mechanism instance to use to communicate with the server workstation.
This method throws a DSEInvalidArgumentException and a DSEHandlerNotFoundException generated by the EventManager removeHandler method.
public int verifyOperationMode()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |