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

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterServer;
import com.eactive.eai.adapter.socket2.protocol.fixedheader.codec.FixedHeaderCodecFactory;
import com.eactive.eai.adapter.socket2.protocol.inicis.handshake.InicisServerFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;

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

		this.handler = new InicisHandler(this);
		
		config.getFilterChain().addFirst("codec", new ProtocolCodecFilter(new FixedHeaderCodecFactory(this)));
		config.getFilterChain().addAfter("codec", "inicis", new InicisServerFilter(this));
	}
	

}
