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

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterServer;
import com.eactive.eai.adapter.socket2.protocol.cert.codec.CertCodecFactory;
import com.eactive.eai.adapter.socket2.protocol.cert.handshake.CertServerFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;


public class CertServer extends TcpAdapterServer {
	public CertServer(SocketAdapterContext context) throws Exception {
		super(context);
		this.handler = new CertHandler(this);		
		config.getFilterChain().addFirst("codec", new ProtocolCodecFilter(new CertCodecFactory(this)));
		config.getFilterChain().addAfter("codec", "cert", new CertServerFilter(this));
	}
}
