org.safs
Interface JavaSocketsListener

All Superinterfaces:
ConnectionListener, NamedListener
All Known Subinterfaces:
LocalControlListener, SoloRemoteControlListener
All Known Implementing Classes:
DJavaHook, JavaSocketsHook, RemoteControlUI, SoloRemoteControl, SoloRemoteControlRunner

public interface JavaSocketsListener
extends ConnectionListener

Interface definition for a local SocketProtocol Runner to receive asynchronous notification of AbstractProtocolRunner events and messages from a remote SocketProtocol Runner.


Field Summary
static java.lang.String DEFAULT_NAME
           
 
Method Summary
 void onReceiveException(java.lang.String message)
          Remote client has thrown/issued an Exception message.
 void onReceiveMessage(java.lang.String message)
          Remote client has sent an arbitrary message.
 void onReceiveReady()
          Remote client has issued the READY event
 void onReceiveResult(int rc, java.lang.String info)
          Remote client has issued the RESULT event and is returning a simple statuscode and statusinfo response.
 void onReceiveResultProperties(java.util.Properties result)
          Remote client has issued the RESULT event and is returning result information in Properties.
 void onReceiveRunning()
          Remote client has issued the RUNNING event--usually resulting from a DISPATCH event.
 
Methods inherited from interface org.safs.sockets.ConnectionListener
onReceiveConnection, onReceiveLocalShutdown, onReceiveRemoteShutdown
 
Methods inherited from interface org.safs.sockets.NamedListener
getListenerName
 

Field Detail

DEFAULT_NAME

static final java.lang.String DEFAULT_NAME
See Also:
Constant Field Values
Method Detail

onReceiveReady

void onReceiveReady()
Remote client has issued the READY event

See Also:
DroidEngine.sendReady(), MessengerService.onEngineReady(), JavaSocketsHook.onReceiveReady()

onReceiveRunning

void onReceiveRunning()
Remote client has issued the RUNNING event--usually resulting from a DISPATCH event.

See Also:
DroidEngine.sendRunning(), MessengerService.onEngineRunning(), JavaSocketsHook.onReceiveRunning()

onReceiveResult

void onReceiveResult(int rc,
                     java.lang.String info)
Remote client has issued the RESULT event and is returning a simple statuscode and statusinfo response.

Parameters:
rc - -- int statuscode
info - -- String statusinfo. Can be null. Can be an empty string.
See Also:
DroidEngine.sendServiceResult(int, String), MessengerService.onEngineResult(int, String), JavaSocketsHook.onReceiveResult(int, String)

onReceiveResultProperties

void onReceiveResultProperties(java.util.Properties result)
Remote client has issued the RESULT event and is returning result information in Properties.

Parameters:
Properties - list containing the results properties.

Minimally, this would include:
status code in String format.

It might also include logging information:

status info.
in String format.
message comment already translated (not to be converted.)
message detail already translated (not to be converted.)

Alternatively, logcomment and/or logdetail might be returned as keys and params for one of our SAFSTextResourceBundles (Generic or Failed):

message to convert comment from SAFSTextResourceBundle.
message to convert comment from failedSAFSTextResourceBundle.
message params to use during convert (arg1,arg2,arg3,etc.)
message to convert comment from SAFSTextResourceBundle.
message to convert comment from failedSAFSTextResourceBundle.
message params to use during convert (arg1,arg2,arg3,etc.)

See Also:
DroidEngine.sendServiceResult(java.util.Properties), MessengerService.onEngineResultProps(char[]), JavaSocketsHook.onReceiveResultProperties(java.util.Properties)

onReceiveException

void onReceiveException(java.lang.String message)
Remote client has thrown/issued an Exception message.

Parameters:
message -
See Also:
DroidEngine.sendException(String), MessengerService.onEngineException(String), JavaSocketsHook.onReceiveException(String)

onReceiveMessage

void onReceiveMessage(java.lang.String message)
Remote client has sent an arbitrary message. This is for custom communication between an engine and a remote client.

Parameters:
message -
See Also:
DroidEngine.sendMessage(String), MessengerService.onEngineMessage(String), JavaSocketsHook.onReceiveMessage(String)