use of org.apache.http.nio.reactor.ssl.SSLIOSession in project wso2-synapse by wso2.
the class ServerConnFactory method createConnection.
public DefaultNHttpServerConnection createConnection(final IOSession iosession) {
SSLContextDetails customSSL = null;
if (sslByIPMap != null) {
customSSL = sslByIPMap.get(iosession.getLocalAddress());
}
if (customSSL == null) {
customSSL = ssl;
}
IOSession customSession;
if (customSSL != null) {
customSession = new SSLIOSession(iosession, SSLMode.SERVER, customSSL.getContext(), customSSL.getHandler());
iosession.setAttribute(SSLIOSession.SESSION_KEY, customSession);
} else {
customSession = iosession;
}
DefaultNHttpServerConnection conn = LoggingUtils.createServerConnection(customSession, requestFactory, allocator, params);
int timeout = HttpConnectionParams.getSoTimeout(params);
conn.setSocketTimeout(timeout);
return conn;
}
Aggregations