// Path: auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/AuditEventMessage.java
// public interface AuditEventMessage 
// {
// 	/**
// 	 * Gets the model instance of the RFC 3881 audit message payload
// 	 * @return Message payload instance
// 	 */
// 	AuditMessage getAuditMessage();
// 	
// 	/**
// 	 * Gets the date and time that this message was generated
// 	 * 
// 	 * @return Message generation date and time
// 	 */
// 	Date getDateTime();
// 	
// 	/**
// 	 * Get a byte-serialized representation of this messsage, 
// 	 * for sending over the wire.
// 	 * @param useSpacing Whether to use line spacing or identation (if supported)
// 	 * @return The serialized byte representation of this message
// 	 */
// 	byte[] getSerializedMessage(boolean useSpacing);
// 	
// 	/**
// 	 * Set the destination URI object for this audit message.  
// 	 * Throws an exception the provided URI is not a well-formed
// 	 * URI (example: syslog://example.com:512)or the hostname cannot 
// 	 * be resolved to an IP address.
// 	 * 
// 	 * @param uri The destination
// 	 * @throws Exception
// 	 */
// 	void setDestinationUri(URI uri);
// 	
// 	/**
// 	 * Gets the destination address for this message
// 	 * @return The destination address
// 	 */
// 	InetAddress getDestinationAddress();
// 	
// 	/**
// 	 * Sets the destination address for this message
// 	 * @param destination The destination address
// 	 */
// 	void setDestinationAddress(InetAddress destination);
// 	
// 	/**
// 	 * Gets the destination port for this message
// 	 * @return The destination port
// 	 */
// 	int getDestinationPort();
// 	
// 	/**
// 	 * Sets the destination port for this message
// 	 * @param port The destination port
// 	 */
// 	void setDestinationPort(int port);
// 
// }


import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
import org.openhealthtools.ihe.atna.auditor.events.AuditEventMessage;
package org.openhealthtools.ihe.atna.auditor.sender;



/**
 * For testing only: an audit message sender that just keeps a list of audit message
 * strings in memory instead of sending them to some repository.
 *
 * @author arnouten
 */
public class AuditStringSenderImpl implements AuditMessageSender {

    private List<String> messages = new ArrayList<>();

    public void sendAuditEvent(AuditEventMessage[] msg) throws Exception {
        add(msg);
    }

    public void sendAuditEvent(AuditEventMessage[] msg, InetAddress destination, int port) throws Exception {
        add(msg);
    }

    /**
     * Clears the message received so far
     */
// Path: auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/AuditEventMessage.java
// public interface AuditEventMessage 
// {
// 	/**
// 	 * Gets the model instance of the RFC 3881 audit message payload
// 	 * @return Message payload instance
// 	 */
// 	AuditMessage getAuditMessage();
// 	
// 	/**
// 	 * Gets the date and time that this message was generated
// 	 * 
// 	 * @return Message generation date and time
// 	 */
// 	Date getDateTime();
// 	
// 	/**
// 	 * Get a byte-serialized representation of this messsage, 
// 	 * for sending over the wire.
// 	 * @param useSpacing Whether to use line spacing or identation (if supported)
// 	 * @return The serialized byte representation of this message
// 	 */
// 	byte[] getSerializedMessage(boolean useSpacing);
// 	
// 	/**
// 	 * Set the destination URI object for this audit message.  
// 	 * Throws an exception the provided URI is not a well-formed
// 	 * URI (example: syslog://example.com:512)or the hostname cannot 
// 	 * be resolved to an IP address.
// 	 * 
// 	 * @param uri The destination
// 	 * @throws Exception
// 	 */
// 	void setDestinationUri(URI uri);
// 	
// 	/**
// 	 * Gets the destination address for this message
// 	 * @return The destination address
// 	 */
// 	InetAddress getDestinationAddress();
// 	
// 	/**
// 	 * Sets the destination address for this message
// 	 * @param destination The destination address
// 	 */
// 	void setDestinationAddress(InetAddress destination);
// 	
// 	/**
// 	 * Gets the destination port for this message
// 	 * @return The destination port
// 	 */
// 	int getDestinationPort();
// 	
// 	/**
// 	 * Sets the destination port for this message
// 	 * @param port The destination port
// 	 */
// 	void setDestinationPort(int port);
// 
// }


// Path: auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/sender/AuditStringSenderImpl.java
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
import org.openhealthtools.ihe.atna.auditor.events.AuditEventMessage;

package org.openhealthtools.ihe.atna.auditor.sender;



/**
 * For testing only: an audit message sender that just keeps a list of audit message
 * strings in memory instead of sending them to some repository.
 *
 * @author arnouten
 */
public class AuditStringSenderImpl implements AuditMessageSender {

    private List<String> messages = new ArrayList<>();

    public void sendAuditEvent(AuditEventMessage[] msg) throws Exception {
        add(msg);
    }

    public void sendAuditEvent(AuditEventMessage[] msg, InetAddress destination, int port) throws Exception {
        add(msg);
    }

    /**
     * Clears the message received so far
     */
    public void clear() {