Class FifoMemorySyslogSender

java.lang.Object
org.projecthusky.communication.atna.FifoMemorySyslogSender
All Implemented Interfaces:
org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol

public class FifoMemorySyslogSender extends Object implements org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol
An implementation of a syslog sender that stores messages in a size-limited FIFO queue.
Author:
Quentin Ligier
  • Field Summary

    Fields inherited from interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol

    HTTPS_CIPHERSUITES, JAVAX_NET_DEBUG, JAVAX_NET_SSL_KEYSTORE, JAVAX_NET_SSL_KEYSTORE_PASSWORD, JAVAX_NET_SSL_KEYSTORE_TYPE, JAVAX_NET_SSL_TRUSTSTORE, JAVAX_NET_SSL_TRUSTSTORE_PASSWORD, JAVAX_NET_SSL_TRUSTSTORE_TYPE, JAVAX_TLS_CLIENT_CIPHERSUITES, JAVAX_TLS_SERVER_CIPHERSUITES, JDK_TLS_CLIENT_PROTOCOLS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    Constructor with explicit buffer size.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns all audit messages in the queue.
     
    void
    send(org.openehealth.ipf.commons.audit.AuditContext auditContext, org.openehealth.ipf.commons.audit.AuditMetadataProvider auditMetadataProvider, String auditMessage)
    Stores the message.
    void
    May be implemented to clean up instances on shut down

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol

    send
  • Constructor Details

    • FifoMemorySyslogSender

      public FifoMemorySyslogSender()
      Default constructor.
    • FifoMemorySyslogSender

      public FifoMemorySyslogSender(int size)
      Constructor with explicit buffer size.
      Parameters:
      size - The FIFO buffer size.
  • Method Details

    • getAuditMessages

      public Collection<String> getAuditMessages()
      Returns all audit messages in the queue.
    • send

      public void send(org.openehealth.ipf.commons.audit.AuditContext auditContext, org.openehealth.ipf.commons.audit.AuditMetadataProvider auditMetadataProvider, String auditMessage) throws Exception
      Stores the message.
      Specified by:
      send in interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol
      Parameters:
      auditContext - audit context that e.g. contains the destination
      auditMetadataProvider - dedicated (message-specific) audit metadata
      auditMessage - audit message strings
      Throws:
      Exception - thrown if sending the messages has failed
    • shutdown

      public void shutdown()
      May be implemented to clean up instances on shut down
      Specified by:
      shutdown in interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol
    • getTransportName

      public String getTransportName()
      Specified by:
      getTransportName in interface org.openehealth.ipf.commons.audit.protocol.AuditTransmissionProtocol
      Returns:
      name of the AuditTransmissionProtocol