

package gov.va.med.cds.socket.server.handler;


import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;


public class MinaMllpCodecFactory
    implements
        ProtocolCodecFactory
{

    private MinaMllpProtocolDecoder minaMllpProtocolDecoder;

    private MinaMllpProtocolEncoder minaMllpProtocolEncoder;


    public MinaMllpCodecFactory( )
    {
        minaMllpProtocolDecoder = new MinaMllpProtocolDecoder();

        minaMllpProtocolEncoder = new MinaMllpProtocolEncoder();
    }


    public ProtocolEncoder getEncoder( IoSession session )
        throws Exception
    {
        return minaMllpProtocolEncoder;
    }


    public ProtocolDecoder getDecoder( IoSession session )
        throws Exception
    {
        return minaMllpProtocolDecoder;
    }

}
