java.lang.Object
swim.io.mqtt.MqttSocketService
- All Implemented Interfaces:
FlowContext
,IpService
,MqttServiceContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IpServiceContext
protected final MqttSettings
protected final MqttService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a newIpSocket
binding to handle an incoming network connection.void
Lifecycle callback invoked by the service context after the underlying network listener has accepted a newsocket
connection.void
didBind()
Lifecycle callback invoked by the service context after the underlying network listener has bound to a port.void
Lifecycle callback invoked by the service context when the underlying network listener fails by throwing anerror
.void
Lifecycle callback invoked by the service context after the underlying network listener has been unbound.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
(FlowModifier flowModifier) Enqueues an atomic modification to the underlying network channel's flow control state by applying aflowModifier
delta.Returns the network listener context to which thisIpService
is bound; returnsnull
if thisIpService
is unbound.void
setIpServiceContext
(IpServiceContext context) Sets the network listener context to which thisIpService
is bound.void
unbind()
-
Field Details
-
service
-
mqttSettings
-
context
-
-
Constructor Details
-
MqttSocketService
-
-
Method Details
-
ipServiceContext
Description copied from interface:IpService
Returns the network listener context to which thisIpService
is bound; returnsnull
if thisIpService
is unbound.- Specified by:
ipServiceContext
in interfaceIpService
-
setIpServiceContext
Description copied from interface:IpService
Sets the network listener context to which thisIpService
is bound.- Specified by:
setIpServiceContext
in interfaceIpService
-
createSocket
Description copied from interface:IpService
Returns a newIpSocket
binding to handle an incoming network connection.- Specified by:
createSocket
in interfaceIpService
-
didBind
public void didBind()Description copied from interface:IpService
Lifecycle callback invoked by the service context after the underlying network listener has bound to a port. -
didAccept
Description copied from interface:IpService
Lifecycle callback invoked by the service context after the underlying network listener has accepted a newsocket
connection. -
didUnbind
public void didUnbind()Description copied from interface:IpService
Lifecycle callback invoked by the service context after the underlying network listener has been unbound. -
didFail
Description copied from interface:IpService
Lifecycle callback invoked by the service context when the underlying network listener fails by throwing anerror
. The listener will automatically be closed. -
flowControl
Description copied from interface:FlowContext
Returns the currentFlowControl
state of the underlying network channel.- Specified by:
flowControl
in interfaceFlowContext
-
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
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
- Specified by:
mqttSettings
in interfaceMqttServiceContext
-
localAddress
- Specified by:
localAddress
in interfaceMqttServiceContext
-
unbind
public void unbind()- Specified by:
unbind
in interfaceMqttServiceContext
-