public abstract class AbstractHttpChannel extends Object implements KaaDataChannel
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
AbstractHttpChannel(AbstractKaaClient client,
KaaClientState state) |
Modifier and Type | Method and Description |
---|---|
protected void |
connectionFailed(boolean failed) |
protected abstract Runnable |
createChannelRunnable(Map<org.kaaproject.kaa.common.TransportType,ChannelDirection> typeMap) |
protected ExecutorService |
createExecutor() |
protected KaaDataDemultiplexer |
getDemultiplexer() |
protected AbstractHttpClient |
getHttpClient() |
protected KaaDataMultiplexer |
getMultiplexer() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getServerType, getSupportedTransportTypes, getType
public AbstractHttpChannel(AbstractKaaClient client, KaaClientState state)
protected ExecutorService 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
protected void connectionFailed(boolean failed)
protected KaaDataMultiplexer getMultiplexer()
protected KaaDataDemultiplexer getDemultiplexer()
protected AbstractHttpClient getHttpClient()
protected abstract Runnable createChannelRunnable(Map<org.kaaproject.kaa.common.TransportType,ChannelDirection> typeMap)
Copyright © 2014. All rights reserved.