Class ReactorNettyTLSSyslogSenderImpl.ReactorNettyDestination
java.lang.Object
org.openehealth.ipf.commons.audit.protocol.ReactorNettyTLSSyslogSenderImpl.ReactorNettyDestination
- All Implemented Interfaces:
NioTLSSyslogSenderImpl.Destination<reactor.netty.Connection>
- Enclosing class:
ReactorNettyTLSSyslogSenderImpl
public static final class ReactorNettyTLSSyslogSenderImpl.ReactorNettyDestination
extends Object
implements NioTLSSyslogSenderImpl.Destination<reactor.netty.Connection>
Destination abstraction for Netty
- Since:
- 4.0
- Author:
- Christian Ohr
-
Method Summary
-
Method Details
-
shutdown
public void shutdown()Description copied from interface:NioTLSSyslogSenderImpl.DestinationShut down the destination- Specified by:
shutdownin interfaceNioTLSSyslogSenderImpl.Destination<reactor.netty.Connection>
-
getHandle
public reactor.netty.Connection getHandle()Returns the connection to the Audit Record Repository, and establishes it if there is none or the previous one has been closed.TcpClient.connectNow(Duration)only returns an established connection, including the TLS handshake, within the connect timeout. Synchronized, so that concurrent senders neither open several connections nor see one that is still being set up.- Specified by:
getHandlein interfaceNioTLSSyslogSenderImpl.Destination<reactor.netty.Connection>- Returns:
- 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<reactor.netty.Connection>- Parameters:
bytes- audit record content
-