Class NettyTcpConnection
java.lang.Object
org.serviceconnector.net.req.netty.NettyConnectionAdpater
org.serviceconnector.net.req.netty.tcp.NettyTcpConnection
- All Implemented Interfaces:
IConnection
The Class NettyTcpConnection. Concrete connection implementation with JBoss Netty for Tcp.
-
Field Summary
Fields inherited from class org.serviceconnector.net.req.netty.NettyConnectionAdpater
baseConf, bootstrap, channel, connectionContext, encoderDecoder, host, idleTimeout, operationListener, port, remotSocketAddress, workerGroup -
Constructor Summary
ConstructorsConstructorDescriptionNettyTcpConnection(io.netty.channel.EventLoopGroup workerGroup) Instantiates a new NettyTcpConnection. -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()Connect.voidsend(SCMPMessage scmp, ISCMPMessageCallback callback) Send and receive asynchronous operation.voidSets the quiet disconnect.Methods inherited from class org.serviceconnector.net.req.netty.NettyConnectionAdpater
destroy, disconnect, getContext, getHost, getNrOfIdlesInSequence, getPort, incrementNrOfIdles, isConnected, resetNrOfIdles, setContext, setHost, setIdleTimeoutSeconds, setPort
-
Constructor Details
-
NettyTcpConnection
public NettyTcpConnection(io.netty.channel.EventLoopGroup workerGroup) Instantiates a new NettyTcpConnection.- Parameters:
workerGroup- the channel factory
-
-
Method Details
-
connect
Connect.- Specified by:
connectin interfaceIConnection- Specified by:
connectin classNettyConnectionAdpater- Throws:
Exception- the exception
-
send
Send and receive asynchronous operation.- Specified by:
sendin interfaceIConnection- Specified by:
sendin classNettyConnectionAdpater- Parameters:
scmp- the scmpcallback- the callback- Throws:
Exception- the exception
-
setQuietDisconnect
Description copied from interface:IConnectionSets the quiet disconnect. Disconnect is not logged or does not reply any answer to higher layer.- Throws:
Exception- the exception
-