Esempio n. 1
0
 public DefaultNHttpServerConnection createConnection(final IOSession iosession) {
   org.siddhiesb.transport.http.conn.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;
 }