com.bankframe.services.notification.notificationserver
Class NotificationServerBean

java.lang.Object
  extended bycom.bankframe.services.notification.notificationserver.NotificationServerBean
All Implemented Interfaces:
NotificationServer, java.io.Serializable
Direct Known Subclasses:
NotificationServerBean

public abstract class NotificationServerBean
extends java.lang.Object
implements NotificationServer, java.io.Serializable

The Bean class for NotificationServerBean Session

See Also:
Serialized Form

Constructor Summary
NotificationServerBean()
           
 
Method Summary
 java.util.Vector broadCast(Node sourceNode, java.lang.String action, java.lang.String date, java.lang.Object payload)
          This method sends a Notification message to all the RegisteredUsers.
 boolean isIDRegistered(java.lang.String targetId)
          This method determines whether an ID has been registered already
 java.util.Vector notifyUser(Node sourceNode, Node targetNode, java.lang.String action, java.lang.String date, java.lang.Object payload, java.lang.String direction)
          The direction parameter can have one of 2 values :[Request | Response] If the value is Request, a Source Node is sending a Notification to a Target Node If the value is Response, a Target Node is sending a Response to a Notification back to the Source Node where the Notification originated from In this method we determine what targetIP and targetPort to use based on the following logic: if direction == Request if targetNode.ID != null Retrieve RegisteredAddress using targetNode.ID else Read targetNode.IP and targetPort.PORT from TargetSelectionFactory.getTargetIPForSource() else if direction == Response Read the targetNode.IP Read the targetNode.PORT connectToServer(targetIP,targetPort,sourceNode,action,date,payload)
 java.util.Vector notifyUser(java.lang.String sourceId, java.lang.String target, java.lang.String action, java.lang.String date, java.lang.Object payload)
          Deprecated.  
 java.util.Vector registerUser(java.lang.String targetId, java.lang.String targetIp, java.lang.String targetPort)
          This method registers a user
 java.util.Vector unregisterUser(java.lang.String targetId)
          This method unregisters a user
 java.util.Vector unregisterUser(java.lang.String targetId, java.lang.String targetIp, java.lang.String targetPort)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationServerBean

public NotificationServerBean()
Method Detail

unregisterUser

public java.util.Vector unregisterUser(java.lang.String targetId,
                                       java.lang.String targetIp,
                                       java.lang.String targetPort)
                                throws ProcessingErrorException
Deprecated.  

This method unregisters a user

Specified by:
unregisterUser in interface NotificationServer
Parameters:
targetId - String
targetIp - String
targetPort - String
Returns:
Vector containing the result
Throws:
ProcessingErrorException - thrown when processing fails

unregisterUser

public java.util.Vector unregisterUser(java.lang.String targetId)
                                throws ProcessingErrorException
This method unregisters a user

Specified by:
unregisterUser in interface NotificationServer
Parameters:
targetId - String
Returns:
Vector containing the result
Throws:
ProcessingErrorException - thrown when processing fails

registerUser

public java.util.Vector registerUser(java.lang.String targetId,
                                     java.lang.String targetIp,
                                     java.lang.String targetPort)
                              throws ProcessingErrorException
This method registers a user

Specified by:
registerUser in interface NotificationServer
Parameters:
targetId - String
targetIp - String
targetPort - String
Returns:
Vector containing the result
Throws:
ProcessingErrorException - thrown when processing fails

notifyUser

public java.util.Vector notifyUser(java.lang.String sourceId,
                                   java.lang.String target,
                                   java.lang.String action,
                                   java.lang.String date,
                                   java.lang.Object payload)
                            throws ProcessingErrorException
Deprecated.  

In this method we need to get the IP address for the target ID passed in if no target ID passed in then need to select an appropriate Target ID for the Source ID given (select appropriate supervisor for teller). The appropriate Target ID is selected using the specific algorithm in the TargetSelectionFactory. The payload is also written out to a log file. The path to this file is specified by the payloadLogFile setting in BankframeResource.properties

Specified by:
notifyUser in interface NotificationServer
Parameters:
sourceId - String
target - String
action - String
date - String
payload - Object
Returns:
Vector containing the Targets response
Throws:
ProcessingErrorException - This exception is thrown if processing fails

notifyUser

public java.util.Vector notifyUser(Node sourceNode,
                                   Node targetNode,
                                   java.lang.String action,
                                   java.lang.String date,
                                   java.lang.Object payload,
                                   java.lang.String direction)
                            throws ProcessingErrorException
The direction parameter can have one of 2 values :[Request | Response] If the value is Request, a Source Node is sending a Notification to a Target Node If the value is Response, a Target Node is sending a Response to a Notification back to the Source Node where the Notification originated from In this method we determine what targetIP and targetPort to use based on the following logic: if direction == Request if targetNode.ID != null Retrieve RegisteredAddress using targetNode.ID else Read targetNode.IP and targetPort.PORT from TargetSelectionFactory.getTargetIPForSource() else if direction == Response Read the targetNode.IP Read the targetNode.PORT connectToServer(targetIP,targetPort,sourceNode,action,date,payload)

Specified by:
notifyUser in interface NotificationServer
Parameters:
sourceNode - Node
targetNode - Node
action - String
date - String
payload - Object
direction - String
Returns:
Vector containing the Targets response
Throws:
ProcessingErrorException

broadCast

public java.util.Vector broadCast(Node sourceNode,
                                  java.lang.String action,
                                  java.lang.String date,
                                  java.lang.Object payload)
                           throws ProcessingErrorException
This method sends a Notification message to all the RegisteredUsers.

Specified by:
broadCast in interface NotificationServer
Parameters:
sourceNode - Node
action - String
date - String
payload - Object
Returns:
Vector containing the Targets response
Throws:
ProcessingErrorException

isIDRegistered

public boolean isIDRegistered(java.lang.String targetId)
                       throws ProcessingErrorException,
                              java.rmi.RemoteException
This method determines whether an ID has been registered already

Specified by:
isIDRegistered in interface NotificationServer
Parameters:
targetId - String
Returns:
boolean
Throws:
ProcessingErrorException
java.rmi.RemoteException


Copyright 2004 Siebel Systems, Inc. All rights reserved.