public class InboundConnectionHandler extends GridNioServerListenerAdapter<Message>
| Constructor and Description |
|---|
InboundConnectionHandler(IgniteLogger log,
TcpCommunicationConfiguration cfg,
Function<UUID,ClusterNode> nodeGetter,
Supplier<ClusterNode> locNodeSupplier,
ClusterStateProvider stateProvider,
ConnectionClientPool clientPool,
CommunicationWorker commWorker,
ConnectGateway connectGate,
Supplier<FailureProcessor> failureProcessorSupplier,
AttributeNames attributeNames,
TcpCommunicationMetricsListener metricsLsnr,
GridNioServerWrapper nioSrvWrapper,
CountDownLatch ctxInitLatch,
boolean client,
Supplier<Ignite> igniteExSupplier,
CommunicationListener<Message> lsnr) |
| Modifier and Type | Method and Description |
|---|---|
void |
communicationWorker(CommunicationWorker commWorker) |
void |
metricsListener(@Nullable TcpCommunicationMetricsListener metricsLsnr) |
void |
onConnected(GridNioSession ses)
This method is called whenever a new client is connected and session is created.
|
void |
onDisconnected(GridNioSession ses,
@Nullable Exception e)
This method is called whenever client is disconnected due to correct connection close
or due to
IOException during network operations. |
void |
onFailure(FailureType failureType,
Throwable failure)
Called when critical failure occurs in server implementation.
|
void |
onMessage(GridNioSession ses,
Message msg)
This method is called whenever a
GridNioParser returns non-null value. |
void |
onMessageSent(GridNioSession ses,
Message msg)
Handle message sent.
|
void |
onSessionWriteTimeout(GridNioSession ses)
Called when session has non-empty write queue and server did not send any data
within timeout interval.
|
void |
setClientPool(ConnectionClientPool pool) |
void |
setNioSrvWrapper(GridNioServerWrapper nioSrvWrapper) |
void |
stop()
Disable processing of incoming messages.
|
onSessionIdleTimeoutpublic InboundConnectionHandler(IgniteLogger log, TcpCommunicationConfiguration cfg, Function<UUID,ClusterNode> nodeGetter, Supplier<ClusterNode> locNodeSupplier, ClusterStateProvider stateProvider, ConnectionClientPool clientPool, CommunicationWorker commWorker, ConnectGateway connectGate, Supplier<FailureProcessor> failureProcessorSupplier, AttributeNames attributeNames, TcpCommunicationMetricsListener metricsLsnr, GridNioServerWrapper nioSrvWrapper, CountDownLatch ctxInitLatch, boolean client, Supplier<Ignite> igniteExSupplier, CommunicationListener<Message> lsnr)
log - Logger.cfg - Config.nodeGetter - Node getter.locNodeSupplier - Local node supplier.stateProvider - State provider.clientPool - Client pool.commWorker - Communication worker.connectGate - Connect gate.failureProcessorSupplier - Failure processor supplier.attributeNames - Attribute names.metricsLsnr - Metrics listener.nioSrvWrapper - Nio server wrapper.ctxInitLatch - Context initialize latch.client - Client.igniteExSupplier - Returns already exists instance from spi.lsnr - Message listenerpublic void setNioSrvWrapper(GridNioServerWrapper nioSrvWrapper)
nioSrvWrapper - Nio server wrapper.public void setClientPool(ConnectionClientPool pool)
pool - Pool.public void onSessionWriteTimeout(GridNioSession ses)
onSessionWriteTimeout in interface GridNioServerListener<Message>onSessionWriteTimeout in class GridNioServerListenerAdapter<Message>ses - Session that has timed out writes.public void onConnected(GridNioSession ses)
ses - Newly created session for remote client.public void onMessageSent(GridNioSession ses, Message msg)
onMessageSent in interface GridNioServerListener<Message>onMessageSent in class GridNioServerListenerAdapter<Message>ses - Session.msg - Message.public void onMessage(GridNioSession ses, Message msg)
GridNioParser returns non-null value.ses - Session on which message was received.msg - Parsed message.public void onFailure(FailureType failureType, Throwable failure)
onFailure in interface GridNioServerListener<Message>onFailure in class GridNioServerListenerAdapter<Message>public void onDisconnected(GridNioSession ses, @Nullable @Nullable Exception e)
IOException during network operations.ses - Closed session.e - Exception occurred, if any.public void stop()
public void communicationWorker(CommunicationWorker commWorker)
commWorker - New communication worker.public void metricsListener(@Nullable
@Nullable TcpCommunicationMetricsListener metricsLsnr)
metricsLsnr - New metrics listener.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023