public class SoloRemoteControlRunner extends AbstractProtocolRunner implements SocketProtocolListener
Modifier and Type | Field and Description |
---|---|
DroidSocketProtocol |
droidprotocolserver
a convenient wrapper to
AbstractProtocolRunner.protocolserver
we should use this field instead of AbstractProtocolRunner.protocolserver |
_debugEnabled, protocolserver, runnerlisteners
DEFAULT_NAME
Constructor and Description |
---|
SoloRemoteControlRunner(SocketProtocolListener listener) |
Modifier and Type | Method and Description |
---|---|
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 props)
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 |
processProtocolMessage(java.lang.String message)
Concrete implementations must insert the parsing and processing of the messages
received from the underlying SocketProtocol.
|
boolean |
sendDispatchFile(java.lang.String filepath)
Send the remote client a dispatch file message with the filepath to a file that
should be readable by the remote client.
|
boolean |
sendDispatchProps(java.util.Properties trd)
Send the remote client a dispatch Properties message containing a Serialized
Properties object containing all the data needed for
the execution of the Dispatch.
|
boolean |
sendMessage(java.lang.String message)
Send the remote client and arbitrary MESSAGE content.
|
boolean |
sendShutdown()
Send a shutdown command to the remote client.
|
addListener, debug, getListenerName, onReceiveConnection, onReceiveDebug, onReceiveLocalShutdown, onReceiveRemoteShutdown, removeListener, run, sendProtocolMessage, setListenerName, shutdownThread
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onReceiveConnection, onReceiveLocalShutdown, onReceiveRemoteShutdown
getListenerName
public DroidSocketProtocol droidprotocolserver
AbstractProtocolRunner.protocolserver
we should use this field instead of AbstractProtocolRunner.protocolserver
public SoloRemoteControlRunner(SocketProtocolListener listener)
public void processProtocolMessage(java.lang.String message)
AbstractProtocolRunner
processProtocolMessage
in class AbstractProtocolRunner
public void onReceiveReady()
SocketProtocolListener
onReceiveReady
in interface SocketProtocolListener
public void onReceiveRunning()
SocketProtocolListener
onReceiveRunning
in interface SocketProtocolListener
public void onReceiveResult(int rc, java.lang.String info)
SocketProtocolListener
onReceiveResult
in interface SocketProtocolListener
rc
- -- int statuscodeinfo
- -- String statusinfo. Can be null. Can be an empty string.public void onReceiveResultProperties(java.util.Properties props)
SocketProtocolListener
onReceiveResultProperties
in interface SocketProtocolListener
public void onReceiveMessage(java.lang.String message)
SocketProtocolListener
onReceiveMessage
in interface SocketProtocolListener
public void onReceiveException(java.lang.String message)
SocketProtocolListener
onReceiveException
in interface SocketProtocolListener
public boolean sendShutdown()
AbstractProtocolRunner
A remote client Protocol Runner would implement this as a do-nothing method.
sendShutdown
in class AbstractProtocolRunner
public boolean sendDispatchProps(java.util.Properties trd)
AbstractProtocolRunner
A remote client Protocol Runner would implement this as a do-nothing method.
sendDispatchProps
in class AbstractProtocolRunner
public boolean sendDispatchFile(java.lang.String filepath)
AbstractProtocolRunner
A remote client Protocol Runner would implement this as a do-nothing method.
sendDispatchFile
in class AbstractProtocolRunner
filepath
- path to a remote client readable file.public boolean sendMessage(java.lang.String message)
The remote client is expected to forward the message to the test app with the "message:" prefix stripped off. These messages are NOT part of the standard protocol and it is up to the local and remote code to know what to do with them.
message
- Copyright © SAS Institute. All Rights Reserved.