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

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


public class InisafePayloadClient extends TcpAdapterClient {
	boolean isBooting = true;

	public InisafePayloadClient(SocketAdapterContext context) throws Exception {
		super(context);

		this.handler = new InisafePayloadClientHandler(this);

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