Class NettyTLSSyslogSenderImpl.NettyDestination
java.lang.Object
org.openehealth.ipf.commons.audit.protocol.NettyTLSSyslogSenderImpl.NettyDestination
- All Implemented Interfaces:
NioTLSSyslogSenderImpl.Destination<io.netty.channel.ChannelFuture>
- Enclosing class:
NettyTLSSyslogSenderImpl
public static final class NettyTLSSyslogSenderImpl.NettyDestination
extends Object
implements NioTLSSyslogSenderImpl.Destination<io.netty.channel.ChannelFuture>
Destination abstraction for Netty
- Since:
- 3.7
- Author:
- Christian Ohr
-
Method Summary
Modifier and TypeMethodDescriptionio.netty.bootstrap.Bootstrapio.netty.channel.ChannelFutureReturns the connection to the Audit Record Repository, and establishes it if there is none or the previous one has been closed.voidshutdown()Shut down the destinationvoidwrite(byte[] bytes) Write the audit record to the destination
-
Method Details
-
shutdown
public void shutdown()Description copied from interface:NioTLSSyslogSenderImpl.DestinationShut down the destination- Specified by:
shutdownin interfaceNioTLSSyslogSenderImpl.Destination<io.netty.channel.ChannelFuture>
-
getHandle
public io.netty.channel.ChannelFuture getHandle()Returns the connection to the Audit Record Repository, and establishes it if there is none or the previous one has been closed. A connection is only handed out once it is fully established, i.e. including the TLS handshake. Synchronized, so that concurrent senders neither open several connections nor see one that is still being set up.- Specified by:
getHandlein interfaceNioTLSSyslogSenderImpl.Destination<io.netty.channel.ChannelFuture>- Returns:
- the future of the established connection
- Throws:
AuditException- if the connection cannot be established
-
write
public void write(byte[] bytes) Description copied from interface:NioTLSSyslogSenderImpl.DestinationWrite the audit record to the destination- Specified by:
writein interfaceNioTLSSyslogSenderImpl.Destination<io.netty.channel.ChannelFuture>- Parameters:
bytes- audit record content
-
getBootstrap
public io.netty.bootstrap.Bootstrap getBootstrap()
-