protected void onConnect() throws IOException {
for (final IHttpConnectionHandler connectionHandler : connectionHandlers) {
HttpConnectionHandlerInfo connectionHandlerInfo = HttpUtils.getHttpConnectionHandlerInfo(connectionHandler);
if (connectionHandlerInfo.isConnectHandler()) {
Runnable task = new Runnable() {
public void run() {
try {
((IHttpConnectHandler) connectionHandler).onConnect(AbstractHttpConnection.this);
} catch (IOException ioe) {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("[" + getId() + "] error occured by performing onConnect on " + connectionHandler + " reason: " + ioe.toString());
}
destroy();
}
}
};
if (connectionHandlerInfo.isConnectHandlerMultithreaded()) {
multimodeExcutor.processMultithreaded(task);
} else {
multimodeExcutor.processNonthreaded(task);
}
}