org.safs.sockets
Interface SocketServerListener

All Known Implementing Classes:
DJavaHook, JavaSocketsHook, SocketServerUI

public interface SocketServerListener


Field Summary
static java.lang.String DEFAULT_NAME
           
static java.lang.String KEY_LOGCOMMENT
           
static java.lang.String KEY_LOGCOMMENT_FAILED
           
static java.lang.String KEY_LOGCOMMENT_GENERIC
           
static java.lang.String KEY_LOGCOMMENT_PARAMS
           
static java.lang.String KEY_LOGDETAIL
           
static java.lang.String KEY_LOGDETAIL_FAILED
           
static java.lang.String KEY_LOGDETAIL_GENERIC
           
static java.lang.String KEY_LOGDETAIL_PARAMS
           
static java.lang.String KEY_LOGTYPE
           
static java.lang.String KEY_STATUSCODE
           
static java.lang.String KEY_STATUSINFO
           
 
Method Summary
 java.lang.String getListenerName()
           
 void onReceiveComment(java.lang.String message)
          Remote client has sent a loggable status comment message.
 void onReceiveConnection()
          Remote client has successfully connected.
 void onReceiveDebug(java.lang.String message)
          Remote client has sent a SAFS Debug Log message to be logged.
 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 onReceiveShutdown()
          Remote client has issued the SHUTDOWN event and should be considered no longer available.
 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.
 void onSocketServerShutdown(int cause)
          The SocketServer to which we are listening has shutdown its processing Thread.
 

Field Detail

DEFAULT_NAME

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

KEY_STATUSINFO

static final java.lang.String KEY_STATUSINFO
See Also:
Constant Field Values

KEY_STATUSCODE

static final java.lang.String KEY_STATUSCODE
See Also:
Constant Field Values

KEY_LOGTYPE

static final java.lang.String KEY_LOGTYPE
See Also:
Constant Field Values

KEY_LOGCOMMENT

static final java.lang.String KEY_LOGCOMMENT
See Also:
Constant Field Values

KEY_LOGDETAIL

static final java.lang.String KEY_LOGDETAIL
See Also:
Constant Field Values

KEY_LOGCOMMENT_GENERIC

static final java.lang.String KEY_LOGCOMMENT_GENERIC
See Also:
Constant Field Values

KEY_LOGCOMMENT_FAILED

static final java.lang.String KEY_LOGCOMMENT_FAILED
See Also:
Constant Field Values

KEY_LOGCOMMENT_PARAMS

static final java.lang.String KEY_LOGCOMMENT_PARAMS
See Also:
Constant Field Values

KEY_LOGDETAIL_GENERIC

static final java.lang.String KEY_LOGDETAIL_GENERIC
See Also:
Constant Field Values

KEY_LOGDETAIL_FAILED

static final java.lang.String KEY_LOGDETAIL_FAILED
See Also:
Constant Field Values

KEY_LOGDETAIL_PARAMS

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

getListenerName

java.lang.String getListenerName()
Returns:
String unique/printable/loggable name of the listener

onReceiveConnection

void onReceiveConnection()
Remote client has successfully connected.


onReceiveDebug

void onReceiveDebug(java.lang.String message)
Remote client has sent a SAFS Debug Log message to be logged.

Parameters:
message -

onReceiveSPCOut

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

Parameters:
message -

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 -

onReceiveReady

void onReceiveReady()
Remote client has issued the READY event


onReceiveRunning

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


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.

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:
KEY_STATUSCODE SAFS int return code in String format.

It often also includes logging information:
KEY_STATUSINFO SAFS statusInfo.
KEY_LOGTYPE SAFS log type (GENERIC, TEST_FAILURE, etc.) int in String format.
KEY_LOGCOMMENT SAFS log message comment already translated (not to be converted.)
KEY_LOGDETAIL SAFS log 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"):
KEY_LOGCOMMENT_GENERIC Convert comment from SAFSTextResourceBundle KEY_LOGCOMMENT_FAILED Convert comment from failedSAFSTextResourceBundle KEY_LOGCOMMENT_PARAMS colon-separated params used to convert message (arg1:arg2:arg3:etc.) KEY_LOGDETAIL_GENERIC Convert detail from SAFSTextResourceBundle KEY_LOGDETAIL_FAILED Convert detail from failedSAFSTextResourceBundle KEY_LOGDETAIL_PARAMS colon-separated params used to convert message (arg1:arg2:arg3:etc.)


onReceiveShutdown

void onReceiveShutdown()
Remote client has issued the SHUTDOWN event and should be considered no longer available.


onReceiveComment

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

Parameters:
message -

onReceiveDetail

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

Parameters:
message -

onReceiveException

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

Parameters:
message -

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 -

onSocketServerShutdown

void onSocketServerShutdown(int cause)
The SocketServer to which we are listening has shutdown its processing Thread. This might be the result of exhausting all possible connection or communication scenarios--or other shutdown activities both normal or unexpected.

Parameters:
int - status indicating the cause of the shutdown.