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

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterServer;
import com.eactive.eai.adapter.socket2.protocol.inisafe2020.codec.InisafeCodecFactory;
import com.eactive.eai.adapter.socket2.protocol.inisafe2020.handshake.InisafeServerFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;


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

		this.handler = new InisafeServerHandler(this);

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