|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.services.notification.notificationserver.NotificationServerBean
The Bean class for NotificationServerBean Session
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 |
public NotificationServerBean()
Method Detail |
public java.util.Vector unregisterUser(java.lang.String targetId, java.lang.String targetIp, java.lang.String targetPort) throws ProcessingErrorException
unregisterUser
in interface NotificationServer
targetId
- StringtargetIp
- StringtargetPort
- String
ProcessingErrorException
- thrown when processing failspublic java.util.Vector unregisterUser(java.lang.String targetId) throws ProcessingErrorException
unregisterUser
in interface NotificationServer
targetId
- String
ProcessingErrorException
- thrown when processing failspublic java.util.Vector registerUser(java.lang.String targetId, java.lang.String targetIp, java.lang.String targetPort) throws ProcessingErrorException
registerUser
in interface NotificationServer
targetId
- StringtargetIp
- StringtargetPort
- String
ProcessingErrorException
- thrown when processing failspublic 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
payloadLogFile
setting in BankframeResource.properties
notifyUser
in interface NotificationServer
sourceId
- Stringtarget
- Stringaction
- Stringdate
- Stringpayload
- Object
ProcessingErrorException
- This exception is thrown if processing failspublic 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
notifyUser
in interface NotificationServer
sourceNode
- NodetargetNode
- Nodeaction
- Stringdate
- Stringpayload
- Objectdirection
- String
ProcessingErrorException
public java.util.Vector broadCast(Node sourceNode, java.lang.String action, java.lang.String date, java.lang.Object payload) throws ProcessingErrorException
broadCast
in interface NotificationServer
sourceNode
- Nodeaction
- Stringdate
- Stringpayload
- Object
ProcessingErrorException
public boolean isIDRegistered(java.lang.String targetId) throws ProcessingErrorException, java.rmi.RemoteException
isIDRegistered
in interface NotificationServer
targetId
- String
ProcessingErrorException
java.rmi.RemoteException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |