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

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterServer;
import com.eactive.eai.adapter.socket2.protocol.inisafepayload.codec.InisafePayloadCodecFactory;
import com.eactive.eai.adapter.socket2.protocol.inisafepayload.handshake.InisafePayloadServerFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;


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

		this.handler = new InisafePayloadServerHandler(this);

		config.getFilterChain().addFirst("codec", new ProtocolCodecFilter(new InisafePayloadCodecFactory(this)));
		config.getFilterChain().addAfter("codec", "inisafe_kofc.codec", new InisafePayloadServerFilter(this));
	}
}
