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

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterClient;
import com.eactive.eai.adapter.socket2.protocol.login.codec.BindCodecFactory;
import com.eactive.eai.adapter.socket2.protocol.login.handshake.LoginClientFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;


public class LoginClient extends TcpAdapterClient {
	boolean isBooting = true;
	
	public LoginClient(SocketAdapterContext context) throws Exception {
		super(context);
		this.handler = new LoginHandler(this);
		config.getFilterChain().addFirst("codec", new ProtocolCodecFilter(new BindCodecFactory(this)));
		config.getFilterChain().addAfter("codec", "login.codec", new LoginClientFilter(this));
	}
}
