public class DefaultOperationTcpChannel extends Object implements KaaDataChannel
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
DefaultOperationTcpChannel(KaaClientState state,
KaaChannelManager channelManager) |
Modifier and Type | Method and Description |
---|---|
protected ScheduledExecutorService |
createExecutor() |
protected Socket |
createSocket(String host,
int port) |
String |
getId()
Retrieves the channel's id.
|
ServerType |
getServerType()
Retrieves the channel's server type (i.e.
|
Map<org.kaaproject.kaa.common.TransportType,ChannelDirection> |
getSupportedTransportTypes()
Retrieves the map of transport types and their directions supported by this channel.
|
org.kaaproject.kaa.common.bootstrap.gen.ChannelType |
getType()
Retrieves the channel's type (i.e.
|
void |
pause()
Pauses the channel's workflow.
|
void |
resume()
Resumes the channel's workflow.
|
void |
setConnectivityChecker(ConnectivityChecker checker)
Sets connectivity checker to the current channel.
|
void |
setDemultiplexer(KaaDataDemultiplexer demultiplexer)
Sets the response demultiplexer for this channel.
|
void |
setMultiplexer(KaaDataMultiplexer multiplexer)
Sets the request multiplexer for this channel.
|
void |
setServer(ServerInfo server)
Sets the server's parameters for the current channel.
|
void |
shutdown()
Shuts down the channel instance.
|
void |
sync(org.kaaproject.kaa.common.TransportType type)
Updates the channel's state of the specific service.
|
void |
syncAck(org.kaaproject.kaa.common.TransportType type)
Notifies channel about successful acknowledgment of the sync only in case of smth change.
|
void |
syncAll()
Updates the channel's state of all supported services.
|
public DefaultOperationTcpChannel(KaaClientState state, KaaChannelManager channelManager)
protected Socket createSocket(String host, int port) throws UnknownHostException, IOException
UnknownHostException
IOException
protected ScheduledExecutorService createExecutor()
public void sync(org.kaaproject.kaa.common.TransportType type)
KaaDataChannel
sync
in interface KaaDataChannel
type
- transport type of the service.TransportType
public void syncAll()
KaaDataChannel
syncAll
in interface KaaDataChannel
public void syncAck(org.kaaproject.kaa.common.TransportType type)
KaaDataChannel
syncAck
in interface KaaDataChannel
type
- transport type of the service.TransportType
public void setDemultiplexer(KaaDataDemultiplexer demultiplexer)
KaaDataChannel
setDemultiplexer
in interface KaaDataChannel
demultiplexer
- demultiplexer instance to be set.KaaDataDemultiplexer
public void setMultiplexer(KaaDataMultiplexer multiplexer)
KaaDataChannel
setMultiplexer
in interface KaaDataChannel
multiplexer
- multiplexer instance to be set.KaaDataMultiplexer
public void setServer(ServerInfo server)
KaaDataChannel
setServer
in interface KaaDataChannel
server
- server's parameters.ServerInfo
public void setConnectivityChecker(ConnectivityChecker checker)
KaaDataChannel
setConnectivityChecker
in interface KaaDataChannel
checker
- platform-dependent connectivity checker.ConnectivityChecker
public void shutdown()
KaaDataChannel
shutdown
in interface KaaDataChannel
public void pause()
KaaDataChannel
pause
in interface KaaDataChannel
public void resume()
KaaDataChannel
resume
in interface KaaDataChannel
public String getId()
KaaDataChannel
getId
in interface KaaDataChannel
public org.kaaproject.kaa.common.bootstrap.gen.ChannelType getType()
KaaDataChannel
getType
in interface KaaDataChannel
ChannelType
public ServerType getServerType()
KaaDataChannel
getServerType
in interface KaaDataChannel
ServerType
public Map<org.kaaproject.kaa.common.TransportType,ChannelDirection> getSupportedTransportTypes()
KaaDataChannel
getSupportedTransportTypes
in interface KaaDataChannel
TransportType
,
ChannelDirection
Copyright © 2014. All rights reserved.