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
  • 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