Data channel base properties/methods. More...
Public Member Functions | |
void | addOnStateChange (fm.liveswitch.IAction1< TDataChannel > value) |
Adds a handler that is raised when the data channel state changes. More... | |
long | getBytesReceived () |
Gets the number of bytes received. More... | |
long | getBytesSent () |
Gets the number of bytes sent. More... | |
String | getConnectionId () |
Gets the connection identifier. More... | |
String | getId () |
Gets the identifier. More... | |
fm.liveswitch.DataChannelInfo | getInfo () |
Gets the data channel info. More... | |
boolean | getIsInternal () |
Gets a value indicating if this is an internal data channel. More... | |
boolean | getIsTerminated () |
Gets a value indicating whether the data channel is currently closed or failed. More... | |
boolean | getIsTerminating () |
Gets a value indicating whether the data channel is currently closing. More... | |
boolean | getIsTerminatingOrTerminated () |
Gets a value indicating whether the data channel is currently closing, closed, or failed. More... | |
String | getLabel () |
Gets the label. More... | |
long | getMessagesReceived () |
Gets the number of messages received. More... | |
long | getMessagesSent () |
Gets the number of messages sent. More... | |
fm.liveswitch.IAction1< fm.liveswitch.DataChannelReceiveArgs > | getOnReceive () |
Gets a callback invoked when a message is received. More... | |
boolean | getOrdered () |
Gets a value indicating whether messages will be delivered in the order they are sent. More... | |
fm.liveswitch.DataChannelState | getState () |
Gets the state. More... | |
String | getStreamId () |
Gets the stream identifier. More... | |
String | getSubprotocol () |
Gets the subprotocol. More... | |
void | removeOnStateChange (fm.liveswitch.IAction1< TDataChannel > value) |
Removes a handler that is raised when the data channel state changes. More... | |
abstract fm.liveswitch.Future< Object > | sendDataBytes (fm.liveswitch.DataBuffer dataBytes) |
Sends some bytes. More... | |
abstract fm.liveswitch.Future< Object > | sendDataString (String dataString) |
Sends a string. More... | |
void | setOnReceive (fm.liveswitch.IAction1< fm.liveswitch.DataChannelReceiveArgs > value) |
Sets a callback invoked when a message is received. More... | |
Public Member Functions inherited from fm.liveswitch.Dynamic | |
java.util.HashMap< String, Object > | getDynamicProperties () |
Gets all dynamic properties on this instance. More... | |
Object | getDynamicValue (String key) |
Gets a property value from the local cache. More... | |
void | setDynamicValue (String key, Object value) |
Sets a property value in the local cache. More... | |
boolean | unsetDynamicValue (String key) |
Removes a property value from the local cache. More... | |
Protected Member Functions | |
DataChannelBase (String label, boolean ordered, String subprotocol) | |
Initializes a new instance of the fm.liveswitch.DataChannelBase class. More... | |
DataChannelBase (String label, boolean ordered, String subprotocol, boolean internalChannel) | |
Initializes a new instance of the fm.liveswitch.DataChannelBase class. More... | |
abstract TDataChannel | getInstance () |
Gets the current instance. More... | |
void | processStateChange () |
Processes a state change. More... | |
void | processStateLockChange () |
Processes a state lock change. More... | |
void | raiseDataBytes (fm.liveswitch.DataBuffer dataBytes) |
Raises the OnReceive callback with data bytes. More... | |
void | raiseDataString (String dataString) |
Raises the OnReceive callback with a data string. More... | |
void | registerDataReceived (int dataLength) |
Registers that a data has been sent. More... | |
void | registerDataSent (int dataLength) |
Registers that a data has been sent. More... | |
Protected Member Functions inherited from fm.liveswitch.Dynamic | |
Dynamic () | |
Protected Member Functions inherited from fm.liveswitch.Serializable | |
boolean | getIsDirty () |
Gets a value indicating whether this instance is dirty. More... | |
Serializable () | |
Initializes a new instance of the fm.liveswitch.Serializable class. More... | |
void | setIsDirty (boolean value) |
Sets a value indicating whether this instance is dirty. More... | |
Data channel base properties/methods.
|
protected |
Initializes a new instance of the fm.liveswitch.DataChannelBase class.
label | The label. |
ordered | Whether messages will be delivered in the order they are sent. |
subprotocol | The subprotocol. |
|
protected |
Initializes a new instance of the fm.liveswitch.DataChannelBase class.
label | The label. |
ordered | Whether messages will be delivered in the order they are sent. |
subprotocol | The subprotocol. |
internalChannel | Indicates whether this is an internal channel. |
void fm.liveswitch.DataChannelBase< TDataChannel >.addOnStateChange | ( | fm.liveswitch.IAction1< TDataChannel > | value | ) |
Adds a handler that is raised when the data channel state changes.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
long fm.liveswitch.DataChannelBase< TDataChannel >.getBytesReceived | ( | ) |
Gets the number of bytes received.
long fm.liveswitch.DataChannelBase< TDataChannel >.getBytesSent | ( | ) |
Gets the number of bytes sent.
String fm.liveswitch.DataChannelBase< TDataChannel >.getConnectionId | ( | ) |
Gets the connection identifier.
String fm.liveswitch.DataChannelBase< TDataChannel >.getId | ( | ) |
Gets the identifier.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
fm.liveswitch.DataChannelInfo fm.liveswitch.DataChannelBase< TDataChannel >.getInfo | ( | ) |
Gets the data channel info.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
|
abstractprotected |
Gets the current instance.
boolean fm.liveswitch.DataChannelBase< TDataChannel >.getIsInternal | ( | ) |
Gets a value indicating if this is an internal data channel.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
boolean fm.liveswitch.DataChannelBase< TDataChannel >.getIsTerminated | ( | ) |
Gets a value indicating whether the data channel is currently closed or failed.
boolean fm.liveswitch.DataChannelBase< TDataChannel >.getIsTerminating | ( | ) |
Gets a value indicating whether the data channel is currently closing.
boolean fm.liveswitch.DataChannelBase< TDataChannel >.getIsTerminatingOrTerminated | ( | ) |
Gets a value indicating whether the data channel is currently closing, closed, or failed.
String fm.liveswitch.DataChannelBase< TDataChannel >.getLabel | ( | ) |
Gets the label.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
long fm.liveswitch.DataChannelBase< TDataChannel >.getMessagesReceived | ( | ) |
Gets the number of messages received.
long fm.liveswitch.DataChannelBase< TDataChannel >.getMessagesSent | ( | ) |
Gets the number of messages sent.
fm.liveswitch.IAction1<fm.liveswitch.DataChannelReceiveArgs> fm.liveswitch.DataChannelBase< TDataChannel >.getOnReceive | ( | ) |
Gets a callback invoked when a message is received.
Example:
Implements fm.liveswitch.IDataChannel< TDataChannel >.
boolean fm.liveswitch.DataChannelBase< TDataChannel >.getOrdered | ( | ) |
Gets a value indicating whether messages will be delivered in the order they are sent.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
fm.liveswitch.DataChannelState fm.liveswitch.DataChannelBase< TDataChannel >.getState | ( | ) |
Gets the state.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
String fm.liveswitch.DataChannelBase< TDataChannel >.getStreamId | ( | ) |
Gets the stream identifier.
String fm.liveswitch.DataChannelBase< TDataChannel >.getSubprotocol | ( | ) |
Gets the subprotocol.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
|
protected |
Processes a state change.
|
protected |
Processes a state lock change.
|
protected |
Raises the OnReceive callback with data bytes.
dataBytes | The data bytes. |
|
protected |
Raises the OnReceive callback with a data string.
dataString | The data string. |
|
protected |
Registers that a data has been sent.
dataLength | The data length. |
|
protected |
Registers that a data has been sent.
dataLength | The data length. |
void fm.liveswitch.DataChannelBase< TDataChannel >.removeOnStateChange | ( | fm.liveswitch.IAction1< TDataChannel > | value | ) |
Removes a handler that is raised when the data channel state changes.
Implements fm.liveswitch.IDataChannel< TDataChannel >.
|
abstract |
Sends some bytes.
dataBytes | The data bytes. |
Implements fm.liveswitch.IDataChannel< TDataChannel >.
|
abstract |
Sends a string.
dataString | The data string. |
Implements fm.liveswitch.IDataChannel< TDataChannel >.
void fm.liveswitch.DataChannelBase< TDataChannel >.setOnReceive | ( | fm.liveswitch.IAction1< fm.liveswitch.DataChannelReceiveArgs > | value | ) |
Sets a callback invoked when a message is received.
Example:
Implements fm.liveswitch.IDataChannel< TDataChannel >.