

package gov.va.med.cds.mediator;

import gov.va.med.mediator.client.messagemediator.MessageMediatorInterface;




public class MessageMediator
    implements
        MessageMediatorInterface
{
    private MessageProcessorInterface messageProcessor;


    public boolean isAlive( )
    {
        return true;
    }


    /*
     * (non-Javadoc)
     * @see gov.va.med.cds.client.messagemediator.MessageMediatorInterface#processMessage(java.lang.String)
     */
    public String processMessage( String hl7MessageRequest )
    {

        return processMessage( hl7MessageRequest, false );
    }
    
    
    /*
     * (non-Javadoc)
     * @see gov.va.med.cds.client.messagemediator.MessageMediatorInterface#processMessage(java.lang.String, java.lang.Boolean)
     */
    public String processMessage( String hl7MessageRequest, Boolean persistOriginalMessage )
    {
        return messageProcessor.processMessage( hl7MessageRequest, persistOriginalMessage );
    }


    public void setMessageProcessor( MessageProcessorInterface messageProcessor )
    {
        this.messageProcessor = messageProcessor;
    }
}
