kaos.core.csi.observe
Class RemoteKAoSObserverImpl
java.lang.Object
kaos.core.csi.observe.RemoteKAoSObserverImpl
- All Implemented Interfaces:
- java.io.Serializable, KAoSObserver, RemoteKAoSObserver, CallbackTransportInfo
- Direct Known Subclasses:
- ObserverManagerImpl.MyRemoteKAoSObserver
public class RemoteKAoSObserverImpl
- extends java.lang.Object
- implements RemoteKAoSObserver
RemoteKAoSObserverImpl is used to forward updates from the observable to the ObserverManager,
which in turn, forwards the update to the correct observer.
- See Also:
- Serialized Form
Constructor Summary |
RemoteKAoSObserverImpl(Locator receiverLocator,
java.lang.String receiverName,
java.lang.String observerID)
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getID()
Return the unique identifier of this observer. |
CallbackTransportInfo |
getTransportCallback()
|
int |
hashCode()
|
protected void |
logMessage(java.lang.String msg)
|
protected void |
logMessage(java.lang.String msg,
java.lang.Exception e)
|
protected void |
sendMessageObj(Msg msg)
|
void |
setTransportInfo(MessageTransportService msgTransportService,
Locator senderLocator,
java.lang.String senderName)
Set the transport parameters of the observable, so this remote observer object will be able to
send messages back to the ObserverManager. |
java.lang.String |
toString()
|
void |
update(java.lang.String observableID,
java.lang.String updateType,
java.lang.Object updateCondition,
java.lang.Object update)
Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
_observerID
protected java.lang.String _observerID
_logger
protected static Logger _logger
RemoteKAoSObserverImpl
public RemoteKAoSObserverImpl(Locator receiverLocator,
java.lang.String receiverName,
java.lang.String observerID)
update
public void update(java.lang.String observableID,
java.lang.String updateType,
java.lang.Object updateCondition,
java.lang.Object update)
throws NotificationException
- Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.
- Specified by:
update
in interface KAoSObserver
- Parameters:
observableID
- String identifying the KAoSObservable sending the update.updateType
- String indicating type of update.update
- Object containing the update.
- Throws:
NotificationException
getID
public java.lang.String getID()
- Return the unique identifier of this observer.
- Specified by:
getID
in interface KAoSObserver
- Returns:
- String containing the unique ID of this observer.
setTransportInfo
public void setTransportInfo(MessageTransportService msgTransportService,
Locator senderLocator,
java.lang.String senderName)
- Set the transport parameters of the observable, so this remote observer object will be able to
send messages back to the ObserverManager.
- Specified by:
setTransportInfo
in interface CallbackTransportInfo
- Parameters:
msgTransportService
- MessageTransportService that can be used to send messages out.senderLocator
- Locator of the sender to include in all outgoing TransportMessages.senderName
- String containing the sender name to include in all outgoing TransportMessages.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getTransportCallback
public CallbackTransportInfo getTransportCallback()
- Specified by:
getTransportCallback
in interface RemoteKAoSObserver
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
sendMessageObj
protected void sendMessageObj(Msg msg)
throws TransportFailure,
NotLocatableException
- Throws:
TransportFailure
NotLocatableException
logMessage
protected void logMessage(java.lang.String msg)
logMessage
protected void logMessage(java.lang.String msg,
java.lang.Exception e)