Called to initialize the HTTPAdapter when a proxy is used.
168851
def proxy_manager_for(self, proxy, **proxy_kwargs):
        """"""
        try:
            proxy_kwargs['ssl_version'] = ssl.PROTOCOL_TLS
        except AttributeError:
            proxy_kwargs['ssl_version'] = ssl.PROTOCOL_SSLv23
        return super(SSLAdapter, self).proxy_manager_for(proxy, **proxy_kwargs)
1145412
public void init(HttpInboundServiceContext sc) {
        // for requests, we don't care about the validation
        setHeaderValidation(false);
        setOwner(sc);
        setBinaryParseState(HttpInternalConstants.PARSING_BINARY_VERSION);
    }
1334120
private void initializeHTTPClient() {

    if (_config.isHTTPSConfigured()) {
      try {
        KeyStore trustKeystore = getClientTruststore();
        SSLContext sslContext = SSLContexts.custom()
            .loadTrustMaterial(trustKeystore, new TrustSelfSignedStrategy())
            .build();

        SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);

        // Allow both HTTP and HTTPS connections
        Registry<ConnectionSocketFactory> r = RegistryBuilder.<ConnectionSocketFactory> create()
            .register("http", PlainConnectionSocketFactory.INSTANCE)
            .register("https", sslsf)
            .build();

        HttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(r);

        httpClient = HttpClients.custom()
            .setConnectionManager(cm)
            .build();

      } catch (Exception e) {
        LOGGER.error( "Issue creating HTTP client using supplied configuration. Proceeding with default non-SSL client.", e);
        httpClient = HttpClients.createDefault();
      }
    } else {

      httpClient = HttpClients.createDefault();
    }
  }
1207161
@Override
    public void initialize() {

        String ip;
        String localIp;
        int localPort;
        int remotePort;

        if (this.getLocal().getSymmetric() != null) {
            ip = this.getLocal().getIp();
            localIp = this.getLocal().getLocalIp();
            localPort = getFreePort();
            remotePort = this.getLocal().getSymmetric().getPort();

            LOGGER.fine(this.getLocal().getConnection() + " " + ip + ": " + localPort + "->" + remotePort);

        }
        else {
            ip = this.getRemote().getIp();
            localIp = this.getLocal().getLocalIp();
            localPort = this.getLocal().getPort();
            remotePort = this.getRemote().getPort();
        }

        try {
            mediaSession = createSession(localIp, localPort, ip, remotePort, this, 2, false, true);
        }
        catch (NoProcessorException e) {
            LOGGER.log(Level.WARNING, "exception", e);
        }
        catch (UnsupportedFormatException e) {
            LOGGER.log(Level.WARNING, "exception", e);
        }
        catch (IOException e) {
            LOGGER.log(Level.WARNING, "exception", e);
        }
        catch (GeneralSecurityException e) {
            LOGGER.log(Level.WARNING, "exception", e);
        }
    }
1243313
private void initialize(Handler callbackHandler, int threadPoolSize) {
		mDownloadDispatchers = new DownloadDispatcher[threadPoolSize];
		mDelivery = new CallBackDelivery(callbackHandler);
	}
178201
private static void initMapDefinedHandler(Map<String, Object> handler) {
		// If the handler is a map, the keys are the class name, values are the
		// parameters.
		for (Map.Entry<String, Object> entry : handler.entrySet()) {
			Tuple<String, Class> namedClass = splitClassAndName(entry.getKey());

			// If the values in the config are a map, construct the object using named
			// parameters.
			if (entry.getValue() instanceof Map) {
				HttpHandler httpHandler;
				try {
					httpHandler = (HttpHandler) ServiceUtil.constructByNamedParams(namedClass.second,
							(Map) entry.getValue());
				} catch (Exception e) {
					throw new RuntimeException(
							"Could not construct a handler with values provided as a map: " + namedClass.second);
				}
				registerMiddlewareHandler(httpHandler);
				handlers.put(namedClass.first, httpHandler);
				handlerListById.put(namedClass.first, Collections.singletonList(httpHandler));
			} else if (entry.getValue() instanceof List) {

				// If the values in the config are a list, call the constructor of the handler
				// with those fields.
				HttpHandler httpHandler;
				try {
					httpHandler = (HttpHandler) ServiceUtil.constructByParameterizedConstructor(namedClass.second,
							(List) entry.getValue());
				} catch (Exception e) {
					throw new RuntimeException(
							"Could not construct a handler with values provided as a list: " + namedClass.second);
				}
				registerMiddlewareHandler(httpHandler);
				handlers.put(namedClass.first, httpHandler);
				handlerListById.put(namedClass.first, Collections.singletonList(httpHandler));
			}
		}
	}
900283
public void initialize(HttpContext context)
    {
        if (_context==null)
            _context=context;
        else if (_context!=context)
            throw new IllegalStateException("Can't initialize handler for different context");
    }
460333
function(httpAdapter, options) {
  if (!this.constructor.name) {
    throw new Error('The Constructor must be named');
  }

  this.name = formatGeocoderName(this.constructor.name);

  if (!httpAdapter || httpAdapter == 'undefined') {
    throw new Error(this.constructor.name + ' need an httpAdapter');
  }
  this.httpAdapter = httpAdapter;

  if (!options || options == 'undefined') {
    options = {};
  }

  if (this.options) {
    this.options.forEach(function(option) {
      if (!options[option] || options[option] == 'undefined') {
        options[option] = null;
      }
    });
  }

  this.options = options;
}
381006
public void setResourceAdaptorContext(ResourceAdaptorContext arg0) {
        resourceAdaptorContext = arg0;
        tracer = resourceAdaptorContext.getTracer(HttpClientResourceAdaptor.class.getSimpleName());
        try {
            fireableEventType = resourceAdaptorContext.getEventLookupFacility().getFireableEventType(
                    new EventTypeID("net.java.client.slee.resource.http.event.ResponseEvent", "net.java.client.slee",
                            "4.0"));
        } catch (Throwable e) {
            throw new RuntimeException(e.getMessage(), e);
        }
        sbbInterface = new HttpClientResourceAdaptorSbbInterfaceImpl(this);
    }
560411
private final void init() throws ServletException
	{
		ServletConfig conf;
		ServletContext ctx;

		logger.debug("servlet={}", servlet);

		// If the api user doesn't init a HttpServlet right
		// the conf may be null. Let's double check it all with
		// useful exception messages.
		if(servlet == null)
			throw new IllegalStateException("Servlet was null in. Initialization issue?");
		if((conf = servlet.getServletConfig()) == null)
			throw new IllegalStateException("ServletConfig was null in. Initialization issue?");
		if((ctx = conf.getServletContext()) == null)
			throw new IllegalStateException("ServletContext was null in. Initialization issue?");

		// get the actual dispatcher
		if(isName)
			dispatcher = ctx.getNamedDispatcher(nameOrPath);
		else
			dispatcher = ctx.getRequestDispatcher(nameOrPath);
		if(dispatcher == null)
			throw new ServletException("Unable to get dispatcher for \"" + nameOrPath + "\".");
	}
779329
void initialise(@NonNull final Application application, CallbackAdapter adapter, Callback<ComapiClient> callback) {
        this.adapter = adapter;
        adapter.adapt(super.initialise(application, this, adapter), callback);
    }
670349
@Override
    protected void initializeImpl()
    {
        String value=this.getConfigurationValue(FaxClientSpiConfigurationConstants.HTTP_CLIENT_CLASS_NAME_PROPERTY_KEY);
        if(value==null)
        {
            value=ApacheHTTPClient.class.getName();
        }

        //create HTTP client
        this.httpClient=(HTTPClient)ReflectionHelper.createInstance(value);
        
        //create configuration
        this.httpClientConfiguration=this.createHTTPClientConfiguration();

        //create fax job to HTTP request converter
        this.faxJob2HTTPRequestConverter=this.createFaxJob2HTTPRequestConverter();

        //create HTTP response handler
        this.httpResponseHandler=this.createHTTPResponseHandler();

        //get resources
        Map<FaxActionType,String> map=this.initializeFaxActionType2ResourceMap();
        this.faxActionType2ResourceMap=new HashMap<FaxActionType,String>(map);
        
        //get URL parameters
        this.urlParameters=this.initializeURLParameters();
    }
1297681
def init_widget(self):
        
        super(AndroidAutoCompleteTextView, self).init_widget()
        self.widget.setAdapter(self.adapter)
483591
private void sendInitialConnectionWindow() throws Http2Exception {
    if (ctx.channel().isActive() && initialConnectionWindow > 0) {
      Http2Stream connectionStream = connection().connectionStream();
      int currentSize = connection().local().flowController().windowSize(connectionStream);
      int delta = initialConnectionWindow - currentSize;
      decoder().flowController().incrementWindowSize(connectionStream, delta);
      initialConnectionWindow = -1;
      ctx.flush();
    }
  }
1063123
public void init() throws Exception {
    // configure the SSLContext with a TrustManager
    SSLContext ctx = SSLContext.getInstance("TLS");
    if (ignoreCertificates) {
      ctx.init(new KeyManager[0],
          new TrustManager[] { new DefaultTrustManager() }, new SecureRandom());
      SSLContext.setDefault(ctx);
    }
    HostnameVerifier hv = new IgnoreHostName();
    HttpsURLConnection.setDefaultHostnameVerifier(hv);
  }
29537
protected function initHandlerAdapters()
    {
        $this->logger->debug('Initializing HandlerAdapters.');
        $this->handlerAdapters = array();
        if ($this->detectAllHandlerAdapters) {
            $this->logger->debug('Scanning beans for HandlerAdapters.');
            $beans = BeanUtils::beansOfType($this->applicationContext, "Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter");
            if (!empty($beans)) {
                $this->handlerAdapters = array_values($beans);
            }
        } else {
            $this->logger->debug('Looking up HandlerAdapter bean by name.');
            $handlerAdapter = $this->initialContext->lookup(self::HANDLER_ADAPTER_BEAN_NAME);
            if ($handlerAdapter != null && $handlerAdapter instanceof HandlerAdapter) {
                $this->handlerAdapters = array($handlerAdapter);
            }
        }
        if (empty($this->handlerAdapters)) {
            $this->logger->warning('Could not find any bean of type HandlerAdapter, falling back to default strategy.');
            $this->viewResolvers = $this->getDefaultStrategies("Ocelot\\Mvc\\Web\\Servlet\\HandlerAdapter");
        }
    }
325368
@Override
	public void initialize() {
		final List<IResourceProvider> providers = new ArrayList<IResourceProvider>();
		providers.add(new SomeResourceProvider());
		setResourceProviders(providers);


		registerInterceptor(new ResponseHighlighterInterceptor());

	}