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

    Modifier and Type
    Method
    Description
    reactor.netty.Connection
    Returns the connection to the Audit Record Repository, and establishes it if there is none or the previous one has been closed.
    void
    Shut down the destination
    void
    write(byte[] bytes)
    Write the audit record to the destination

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • shutdown

      public void shutdown()
      Description copied from interface: NioTLSSyslogSenderImpl.Destination
      Shut down the destination
      Specified by:
      shutdown in interface NioTLSSyslogSenderImpl.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:
      getHandle in interface NioTLSSyslogSenderImpl.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.Destination
      Write the audit record to the destination
      Specified by:
      write in interface NioTLSSyslogSenderImpl.Destination<reactor.netty.Connection>
      Parameters:
      bytes - audit record content