if (args.length == 2 || args.length == 6) {
proxy = args[1];
}
final ProxySelector ps = getProxySelector(proxy);
DefaultHttpRequestHandler drh = new DefaultHttpRequestHandler() {
@Override
protected HttpClient createClient() {
HttpClient client = super.createClient();
client.setProxySelector(ps);
client.setSoTimeout(90000);
return client;
}
};
ServerGroup sg = new ServerGroup();
sg.addServer(mainListener);
drh.setServerGroup(sg);
HttpRequestHandler rh = drh;
rh = new LoggingHttpRequestHandler(rh);
BufferedMessageInterceptor bmi = setInterseptor();