kaos.robots.util
Class RemoteActionStatusCallbackImpl

java.lang.Object
  extended by kaos.robots.util.RemoteActionStatusCallbackImpl
All Implemented Interfaces:
java.io.Serializable, ActionStatusCallback, InfoStatusCallback, RemoteActionStatusCallback, CallbackTransportInfo

public class RemoteActionStatusCallbackImpl
extends java.lang.Object
implements RemoteActionStatusCallback

See Also:
Serialized Form

Field Summary
static java.lang.String EXCEPTION_INFO
           
 
Constructor Summary
RemoteActionStatusCallbackImpl(java.lang.String requestID, Locator receiverLocator, java.lang.String receiverName)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 CallbackTransportInfo getTransportCallback()
           
protected  void logMessage(java.lang.String msg)
           
protected  void logMessage(java.lang.String msg, java.lang.Exception e)
           
 void onAborted(java.util.Calendar time, java.lang.Object reason)
          This method is invoked when the requested action is aborted.
 void onAccepted(java.util.Calendar time, java.lang.Object additionalInfo)
          This method is invoked when the request is accepted by the receiver.
 void onCompleted(java.util.Calendar time, java.lang.Object result)
          This method is invoked upon completion of the request.
 void onRefused(java.util.Calendar time, java.lang.Object reason)
          This method is invoked when the request is refused by the receiver.
 void onStarted(java.util.Calendar time, java.lang.Object startInfo)
          This method is invoked when the requested action is aborted.
 void reset()
          Reset callback settings.
 void sendRequestToUser(MethodCallRequestMsg request)
           
 void setSenderID(java.lang.String senderID)
           
 void setTransportInfo(MessageTransportService msgTransportService, Locator senderLocator, java.lang.String senderName)
          Set the transport parameters of the sender, so the callback object will be able to send messages back.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXCEPTION_INFO

public static final java.lang.String EXCEPTION_INFO
See Also:
Constant Field Values
Constructor Detail

RemoteActionStatusCallbackImpl

public RemoteActionStatusCallbackImpl(java.lang.String requestID,
                                      Locator receiverLocator,
                                      java.lang.String receiverName)
Method Detail

onAccepted

public void onAccepted(java.util.Calendar time,
                       java.lang.Object additionalInfo)
This method is invoked when the request is accepted by the receiver.

Specified by:
onAccepted in interface InfoStatusCallback
Parameters:
time - Calendar time of acceptance.
additionalInfo - Object containing additional (optional) info about the acceptance.

onRefused

public void onRefused(java.util.Calendar time,
                      java.lang.Object reason)
This method is invoked when the request is refused by the receiver.

Specified by:
onRefused in interface InfoStatusCallback
Parameters:
time - Calendar time of refusal.
reason - Object containing the reason for refusing the request.

onStarted

public void onStarted(java.util.Calendar time,
                      java.lang.Object startInfo)
This method is invoked when the requested action is aborted.

Specified by:
onStarted in interface ActionStatusCallback
Parameters:
time - Calendar time of aborting an action.
reason - Object containing the reason for aborting an action.

onCompleted

public void onCompleted(java.util.Calendar time,
                        java.lang.Object result)
This method is invoked upon completion of the request.

Specified by:
onCompleted in interface InfoStatusCallback
Parameters:
time - Calendar time of information/action completion.
result - Object containing the result of the requested action.

onAborted

public void onAborted(java.util.Calendar time,
                      java.lang.Object reason)
This method is invoked when the requested action is aborted.

Specified by:
onAborted in interface ActionStatusCallback
Parameters:
time - Calendar time of aborting an action.
reason - Object containing the reason for aborting an action.

reset

public void reset()
Reset callback settings.

Specified by:
reset in interface InfoStatusCallback

setTransportInfo

public void setTransportInfo(MessageTransportService msgTransportService,
                             Locator senderLocator,
                             java.lang.String senderName)
Set the transport parameters of the sender, so the callback object will be able to send messages back.

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 - TString 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

getTransportCallback

public CallbackTransportInfo getTransportCallback()
Specified by:
getTransportCallback in interface RemoteActionStatusCallback

sendRequestToUser

public void sendRequestToUser(MethodCallRequestMsg request)

setSenderID

public void setSenderID(java.lang.String senderID)
Parameters:
senderID - String containing the unique id of the robot sending updates.

logMessage

protected void logMessage(java.lang.String msg)

logMessage

protected void logMessage(java.lang.String msg,
                          java.lang.Exception e)