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

import com.eactive.eai.adapter.socket2.config.SocketAdapterContext;
import com.eactive.eai.adapter.socket2.protocol.TcpAdapterServer;
import com.eactive.eai.adapter.socket2.protocol.object.codec.ObjectSerializationCodecFactory;
import org.apache.mina.filter.codec.ProtocolCodecFilter;


public class ObjectServer extends TcpAdapterServer {
	public ObjectServer(SocketAdapterContext context) throws Exception {
		super(context);		
		this.handler = new ObjectHandler(this);
		
		config.getFilterChain().addFirst("codec", new ProtocolCodecFilter(new ObjectSerializationCodecFactory(this)));
	}
}
