package com.eactive.eai.adapter.socket2.protocol.inisafenatn;

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterServer;
import com.eactive.eai.adapter.socket2.protocol.inisafenatn.codec.InisafeNatnPayloadCodecFactory;
import com.eactive.eai.adapter.socket2.protocol.inisafenatn.handshake.InisafeNatnPayloadServerFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;


public class InisafeNatnPayloadServer extends TcpAdapterServer {
	public InisafeNatnPayloadServer(SocketAdapterContext context) throws Exception {
		super(context);

		this.handler = new InisafeNatnPayloadServerHandler(this);

		config.getFilterChain().addFirst("codec", new ProtocolCodecFilter(new InisafeNatnPayloadCodecFactory(this)));
		config.getFilterChain().addAfter("codec", "inisafe.codec", new InisafeNatnPayloadServerFilter(this));
	}
}
