org.safs.android
Interface SocketServerListener

All Superinterfaces:
ConnectionListener, NamedListener
All Known Implementing Classes:
DJavaHook, JavaSocketsHook, SocketServerUI

public interface SocketServerListener
extends ConnectionListener

Interface definition for a "local" SAFS Droid Automation Engine "controller" (DJavaHook) to receive asynchronous notification of SocketServer events and messages from a remote SAFS Droid Automation Engine running on an Android device or emulator.

See Also:
DJavaHook

Field Summary
static java.lang.String DEFAULT_NAME
           
 
Method Summary
 void onReceiveComment(java.lang.String message)
          Remote client has sent a loggable status comment message.
 void onReceiveDetail(java.lang.String message)
          Remote client has sent a loggable status detail message.
 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.
 void onReceiveSPCMap(java.lang.String message)
          Remote client has sent Process Container App Map Info to log to the App Map output file.
 void onReceiveSPCOut(java.lang.String message)
          Remote client has sent Process Container Object Info to log to the object output file.
 
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

onReceiveSPCOut

void onReceiveSPCOut(java.lang.String message)
Remote client has sent Process Container Object Info to log to the object output file.

Parameters:
message -
See Also:
DroidEngine.sendSPCOut(String), MessengerService.onEngineSPCOUT(String), JavaSocketsHook.onReceiveSPCOut(String)

onReceiveSPCMap

void onReceiveSPCMap(java.lang.String message)
Remote client has sent Process Container App Map Info to log to the App Map output file.

Parameters:
message -
See Also:
DroidEngine.sendSPCMap(String), MessengerService.onEngineSPCMAP(String), JavaSocketsHook.onReceiveSPCMap(String)

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)

onReceiveComment

void onReceiveComment(java.lang.String message)
Remote client has sent a loggable status comment message.

Parameters:
message -
See Also:
DroidEngine.sendComment(String), MessengerService.onEngineComment(String), JavaSocketsHook.onReceiveComment(String)

onReceiveDetail

void onReceiveDetail(java.lang.String message)
Remote client has sent a loggable status detail message.

Parameters:
message -
See Also:
DroidEngine.sendDetail(String), MessengerService.onEngineDetail(String), JavaSocketsHook.onReceiveDetail(String)

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)