- java.lang.Object
-
- swim.io.mqtt.AbstractMqttService
-
- All Implemented Interfaces:
FlowContext
,MqttService
public abstract class AbstractMqttService extends Object implements MqttService, FlowContext
-
-
Field Summary
Fields Modifier and Type Field Description protected MqttServiceContext
context
-
Constructor Summary
Constructors Constructor Description AbstractMqttService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract MqttSocket<?,?>
createSocket()
void
didAccept(MqttSocket<?,?> socket)
void
didBind()
void
didFail(Throwable error)
void
didUnbind()
FlowControl
flowControl()
Returns the currentFlowControl
state of the underlying network channel.void
flowControl(FlowControl flowControl)
Enqueues an atomic replacement of the underlying network channel's flow control state with a newflowControl
.FlowControl
flowControl(FlowModifier flowModifier)
Enqueues an atomic modification to the underlying network channel's flow control state by applying aflowModifier
delta.InetSocketAddress
localAddress()
MqttServiceContext
mqttServiceContext()
MqttSettings
mqttSettings()
void
setMqttServiceContext(MqttServiceContext context)
void
unbind()
-
-
-
Field Detail
-
context
protected MqttServiceContext context
-
-
Method Detail
-
mqttServiceContext
public MqttServiceContext mqttServiceContext()
- Specified by:
mqttServiceContext
in interfaceMqttService
-
setMqttServiceContext
public void setMqttServiceContext(MqttServiceContext context)
- Specified by:
setMqttServiceContext
in interfaceMqttService
-
createSocket
public abstract MqttSocket<?,?> createSocket()
- Specified by:
createSocket
in interfaceMqttService
-
didBind
public void didBind()
- Specified by:
didBind
in interfaceMqttService
-
didAccept
public void didAccept(MqttSocket<?,?> socket)
- Specified by:
didAccept
in interfaceMqttService
-
didUnbind
public void didUnbind()
- Specified by:
didUnbind
in interfaceMqttService
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceMqttService
-
flowControl
public FlowControl flowControl()
Description copied from interface:FlowContext
Returns the currentFlowControl
state of the underlying network channel.- Specified by:
flowControl
in interfaceFlowContext
-
flowControl
public void flowControl(FlowControl flowControl)
Description copied from interface:FlowContext
Enqueues an atomic replacement of the underlying network channel's flow control state with a newflowControl
.- Specified by:
flowControl
in interfaceFlowContext
-
flowControl
public FlowControl flowControl(FlowModifier flowModifier)
Description copied from interface:FlowContext
Enqueues an atomic modification to the underlying network channel's flow control state by applying aflowModifier
delta.- Specified by:
flowControl
in interfaceFlowContext
-
mqttSettings
public MqttSettings mqttSettings()
-
localAddress
public InetSocketAddress localAddress()
-
unbind
public void unbind()
-
-