Base class that defines methods for transferring content over the WebSocket protocol. More...
Public Member Functions | |
int | getHandshakeTimeout () |
Gets the timeout for the initial handshake (in ms). More... | |
fm.liveswitch.IAction1< fm.liveswitch.WebSocketOpenFailureArgs > | getOnOpenFailure () |
Gets the callback to invoke if the handshake fails. More... | |
fm.liveswitch.IAction1< fm.liveswitch.WebSocketOpenSuccessArgs > | getOnOpenSuccess () |
Gets the callback to invoke if the handshake succeeds. More... | |
fm.liveswitch.IAction1< fm.liveswitch.HttpRequestCreatedArgs > | getOnRequestCreated () |
Gets the callback to invoke when the handshake request is created. More... | |
fm.liveswitch.IAction1< fm.liveswitch.HttpResponseReceivedArgs > | getOnResponseReceived () |
Gets the callback to invoke when the handshake response is received. More... | |
fm.liveswitch.IAction1< fm.liveswitch.WebSocketStreamFailureArgs > | getOnStreamFailure () |
Gets the callback to invoke if the stream errors out. More... | |
Object | getSender () |
Gets the sender of the messages. More... | |
int | getStreamTimeout () |
Gets the timeout for the stream (in ms). More... | |
String | getUrl () |
Gets the URL. More... | |
abstract void | open (java.util.HashMap< String, String > headers) |
Opens the socket. More... | |
abstract fm.liveswitch.HttpResponseArgs | send (fm.liveswitch.HttpRequestArgs requestArgs) |
Sends a request synchronously. More... | |
abstract void | sendAsync (fm.liveswitch.HttpRequestArgs requestArgs, fm.liveswitch.IAction1< fm.liveswitch.HttpResponseArgs > callback) |
Sends a request asynchronously. More... | |
void | setHandshakeTimeout (int value) |
Sets the timeout for the initial handshake (in ms). More... | |
void | setOnOpenFailure (fm.liveswitch.IAction1< fm.liveswitch.WebSocketOpenFailureArgs > value) |
Sets the callback to invoke if the handshake fails. More... | |
void | setOnOpenSuccess (fm.liveswitch.IAction1< fm.liveswitch.WebSocketOpenSuccessArgs > value) |
Sets the callback to invoke if the handshake succeeds. More... | |
void | setOnRequestCreated (fm.liveswitch.IAction1< fm.liveswitch.HttpRequestCreatedArgs > value) |
Sets the callback to invoke when the handshake request is created. More... | |
void | setOnResponseReceived (fm.liveswitch.IAction1< fm.liveswitch.HttpResponseReceivedArgs > value) |
Sets the callback to invoke when the handshake response is received. More... | |
void | setOnStreamFailure (fm.liveswitch.IAction1< fm.liveswitch.WebSocketStreamFailureArgs > value) |
Sets the callback to invoke if the stream errors out. More... | |
void | setSender (Object value) |
Sets the sender of the messages. More... | |
void | setStreamTimeout (int value) |
Sets the timeout for the stream (in ms). More... | |
void | setUrl (String value) |
Sets the URL. More... | |
abstract void | shutdown () |
Releases any resources and shuts down. More... | |
WebSocketTransfer (String url) | |
Initializes a new instance of the fm.liveswitch.WebSocketTransfer class. More... | |
Base class that defines methods for transferring content over the WebSocket protocol.
fm.liveswitch.WebSocketTransfer.WebSocketTransfer | ( | String | url | ) |
Initializes a new instance of the fm.liveswitch.WebSocketTransfer class.
url | The URL. |
int fm.liveswitch.WebSocketTransfer.getHandshakeTimeout | ( | ) |
Gets the timeout for the initial handshake (in ms).
fm.liveswitch.IAction1<fm.liveswitch.WebSocketOpenFailureArgs> fm.liveswitch.WebSocketTransfer.getOnOpenFailure | ( | ) |
Gets the callback to invoke if the handshake fails.
fm.liveswitch.IAction1<fm.liveswitch.WebSocketOpenSuccessArgs> fm.liveswitch.WebSocketTransfer.getOnOpenSuccess | ( | ) |
Gets the callback to invoke if the handshake succeeds.
fm.liveswitch.IAction1<fm.liveswitch.HttpRequestCreatedArgs> fm.liveswitch.WebSocketTransfer.getOnRequestCreated | ( | ) |
Gets the callback to invoke when the handshake request is created.
fm.liveswitch.IAction1<fm.liveswitch.HttpResponseReceivedArgs> fm.liveswitch.WebSocketTransfer.getOnResponseReceived | ( | ) |
Gets the callback to invoke when the handshake response is received.
fm.liveswitch.IAction1<fm.liveswitch.WebSocketStreamFailureArgs> fm.liveswitch.WebSocketTransfer.getOnStreamFailure | ( | ) |
Gets the callback to invoke if the stream errors out.
Object fm.liveswitch.WebSocketTransfer.getSender | ( | ) |
Gets the sender of the messages.
int fm.liveswitch.WebSocketTransfer.getStreamTimeout | ( | ) |
Gets the timeout for the stream (in ms).
String fm.liveswitch.WebSocketTransfer.getUrl | ( | ) |
Gets the URL.
|
abstract |
Opens the socket.
headers | The headers to pass in with the initial handshake. |
Reimplemented in fm.liveswitch.WebSocketWebRequestTransfer.
|
abstract |
Sends a request synchronously.
requestArgs | The request parameters. |
Reimplemented in fm.liveswitch.WebSocketWebRequestTransfer.
|
abstract |
Sends a request asynchronously.
requestArgs | The request parameters. |
callback | The callback to execute with the resulting response. |
Reimplemented in fm.liveswitch.WebSocketWebRequestTransfer.
void fm.liveswitch.WebSocketTransfer.setHandshakeTimeout | ( | int | value | ) |
Sets the timeout for the initial handshake (in ms).
void fm.liveswitch.WebSocketTransfer.setOnOpenFailure | ( | fm.liveswitch.IAction1< fm.liveswitch.WebSocketOpenFailureArgs > | value | ) |
Sets the callback to invoke if the handshake fails.
void fm.liveswitch.WebSocketTransfer.setOnOpenSuccess | ( | fm.liveswitch.IAction1< fm.liveswitch.WebSocketOpenSuccessArgs > | value | ) |
Sets the callback to invoke if the handshake succeeds.
void fm.liveswitch.WebSocketTransfer.setOnRequestCreated | ( | fm.liveswitch.IAction1< fm.liveswitch.HttpRequestCreatedArgs > | value | ) |
Sets the callback to invoke when the handshake request is created.
void fm.liveswitch.WebSocketTransfer.setOnResponseReceived | ( | fm.liveswitch.IAction1< fm.liveswitch.HttpResponseReceivedArgs > | value | ) |
Sets the callback to invoke when the handshake response is received.
void fm.liveswitch.WebSocketTransfer.setOnStreamFailure | ( | fm.liveswitch.IAction1< fm.liveswitch.WebSocketStreamFailureArgs > | value | ) |
Sets the callback to invoke if the stream errors out.
void fm.liveswitch.WebSocketTransfer.setSender | ( | Object | value | ) |
Sets the sender of the messages.
void fm.liveswitch.WebSocketTransfer.setStreamTimeout | ( | int | value | ) |
Sets the timeout for the stream (in ms).
void fm.liveswitch.WebSocketTransfer.setUrl | ( | String | value | ) |
Sets the URL.
|
abstract |
Releases any resources and shuts down.
Reimplemented in fm.liveswitch.WebSocketWebRequestTransfer.