use of org.apache.mina.filter.codec.ProtocolCodecFilter in project camel by apache.
the class Mina2Producer method addCodecFactory.
private void addCodecFactory(IoService service, ProtocolCodecFactory codecFactory) {
LOG.debug("addCodecFactory name: {}", codecFactory.getClass().getName());
service.getFilterChain().addLast("codec", new ProtocolCodecFilter(codecFactory));
}
use of org.apache.mina.filter.codec.ProtocolCodecFilter in project opennms by OpenNMS.
the class HttpDetector method contructDefaults.
private void contructDefaults() {
setProtocolCodecFilter(new ProtocolCodecFilter(new HttpProtocolCodecFactory()));
setUrl(DEFAULT_URL);
setMaxRetCode(DEFAULT_MAX_RET_CODE);
}
use of org.apache.mina.filter.codec.ProtocolCodecFilter in project bigbluebutton by bigbluebutton.
the class DeskShareServer method start.
public void start() {
acceptor = new NioSocketAcceptor();
acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter(new ScreenCaptureProtocolCodecFactory()));
acceptor.setHandler(screenCaptureHandler);
acceptor.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, 10);
acceptor.setReuseAddress(true);
try {
acceptor.bind(new InetSocketAddress(port));
} catch (IOException e) {
log.error("IOException while binding to port {}", port);
}
}
use of org.apache.mina.filter.codec.ProtocolCodecFilter in project bigbluebutton by bigbluebutton.
the class DeskShareServer method start.
public void start() {
acceptor = new NioSocketAcceptor();
acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter(new ScreenCaptureProtocolCodecFactory()));
acceptor.setHandler(screenCaptureHandler);
acceptor.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, 10);
acceptor.setReuseAddress(true);
try {
acceptor.bind(new InetSocketAddress(port));
} catch (IOException e) {
log.error("IOException while binding to port {}", port);
}
}
use of org.apache.mina.filter.codec.ProtocolCodecFilter in project pancm_project by xuwujing.
the class ClientTestServer method creatClient.
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