use of com.pancm.test.minatest.demo.MinaClientHandler in project pancm_project by xuwujing.
the class ClientTestServer method creatClient.
/**
* Creat client io connector.
*
* @return the io connector
*/
public IoConnector creatClient() {
IoConnector connector = new NioSocketConnector();
connector.setConnectTimeoutMillis(30000);
connector.getFilterChain().addLast("codec", new ProtocolCodecFilter(new ObjectSerializationCodecFactory()));
connector.setHandler(new MinaClientHandler());
return connector;
}
Aggregations