static CCUrl initialisation
337172
public static function _init() 
	{
		static::$path_offset = ClanCats::$config->get( 'url.path', '/' );

		if ( empty( static::$path_offset ) )
		{
			static::$path_offset = '/';
		}

		if ( substr( static::$path_offset, -1 ) != '/' )
		{
			static::$path_offset .= '/';
		}

		// register the default parameter providers
		static::$parameter_provider = array(

			// Adds a session fingerprint to the parameter list
			'fingerprint' => function()
			{
				return array( ClanCats::$config->get( 'session.default_fingerprint_parameter' ) => fingerprint() );
			},

			// Adds the next redirect uri to redirect back on request
			'back' => function()
			{
				$params = CCIn::$_instance->GET; unset( $params['next'] );
				return array( 'next' => CCUrl::current( $params ) );
			},
		);
	}
1330877
function init(pluginInterface) {
    const pi = pluginInterface;

    // Static contents call
    pi.http.endpoint('get', '*', (req, res, next) => {
        let path = req.path;
        if (path.charAt(path.length-1)=='/') path += 'index.html';

        const pt = pathm.join(pathm.dirname(__filename), 'htdocs', path);
        fs.readFile(pt, (err, data)=>{
            if (err) {
                res.status(404).send('No such resource');
                return;
            }
            if (path==='/js/customize.js') {
                data = data.toString();
                data = data.split('__%%RSA_PUB_KEY%%__')
                    .join('"'+pi.crypt.getPubKey()+'"');
            }
            res.set('Content-Type', mime.getType(path)); // 'text/html; charset=UTF-8'
            res.status(200);

            res.send(data);
        });
    });
}
3657
private void init(SSLContextImpl ctx) {
        if (debug != null && Debug.isOn("ssl")) {
            System.out.println("Using SSLEngineImpl.");
        }

        sslContext = ctx;
        sess = SSLSessionImpl.nullSession;
        handshakeSession = null;

        /*
         * State is cs_START until we initialize the handshaker.
         *
         * Apps using SSLEngine are probably going to be server.
         * Somewhat arbitrary choice.
         */
        roleIsServer = true;
        connectionState = cs_START;
        receivedCCS = false;

        /*
         * default read and write side cipher and MAC support
         *
         * Note:  compression support would go here too
         */
        readCipher = CipherBox.NULL;
        readMAC = MAC.NULL;
        writeCipher = CipherBox.NULL;
        writeMAC = MAC.NULL;

        // default security parameters for secure renegotiation
        secureRenegotiation = false;
        clientVerifyData = new byte[0];
        serverVerifyData = new byte[0];

        enabledCipherSuites =
                sslContext.getDefaultCipherSuiteList(roleIsServer);
        enabledProtocols =
                sslContext.getDefaultProtocolList(roleIsServer);

        wrapLock = new Object();
        unwrapLock = new Object();
        writeLock = new Object();

        /*
         * Save the Access Control Context.  This will be used later
         * for a couple of things, including providing a context to
         * run tasks in, and for determining which credentials
         * to use for Subject based (JAAS) decisions
         */
        acc = AccessController.getContext();

        /*
         * All outbound application data goes through this OutputRecord,
         * other data goes through their respective records created
         * elsewhere.  All inbound data goes through this one
         * input record.
         */
        outputRecord =
            new EngineOutputRecord(Record.ct_application_data, this);
        inputRecord = new EngineInputRecord(this);
        inputRecord.enableFormatChecks();

        writer = new EngineWriter();
    }
429205
public void init(TCPConnectionContext tsc, ConnectionLink link, VirtualConnection vc, HttpChannelConfig hcc) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Initializing ISC: " + this);
        }
        super.init(tsc, hcc);
        setBodyRC(HttpISCBodyReadCallback.getRef());
        this.myLink = (HttpInboundLink) link;
        if (link instanceof H2HttpInboundLinkWrap) {
            super.setH2Connection(true);
            super.setPushPromise(((H2HttpInboundLinkWrap) link).isPushPromise());
        }
        setVC(vc);
        vc.getStateMap().put(CallbackIDs.CALLBACK_HTTPISC, this);
        // during discrimination, this is skipped so do it now
        getRequestImpl().initScheme();
    }
1013783
public function init()
	{
		$this->_cache=Yii::app()->getComponent($this->cacheID);
		if(!($this->_cache instanceof ICache))
			throw new CException(Yii::t('yii','CCacheHttpSession.cacheID is invalid. Please make sure "{id}" refers to a valid cache application component.',
				array('{id}'=>$this->cacheID)));
		parent::init();
	}
272232
def static_url(redis, path):
    """"""
    file_hash = get_cache_buster(redis, path)
    return "%s/%s?v=%s" % (oz.settings["static_host"], path, file_hash)
1248117
def init (self, base_ref, base_url, parent_url, recursion_level,
              aggregate, line, column, page, name, url_encoding, extern):
        
        self.base_ref = base_ref
        if self.base_ref is not None:
            assert isinstance(self.base_ref, unicode), repr(self.base_ref)
        self.base_url = base_url.strip() if base_url else base_url
        if self.base_url is not None:
            assert isinstance(self.base_url, unicode), repr(self.base_url)
        self.parent_url = parent_url
        if self.parent_url is not None:
            assert isinstance(self.parent_url, unicode), repr(self.parent_url)
        self.recursion_level = recursion_level
        self.aggregate = aggregate
        self.line = line
        self.column = column
        self.page = page
        self.name = name
        assert isinstance(self.name, unicode), repr(self.name)
        self.encoding = url_encoding
        self.charset = None
        self.extern = extern
        if self.base_ref:
            assert not urlutil.url_needs_quoting(self.base_ref), \
                   "unquoted base reference URL %r" % self.base_ref
        if self.parent_url:
            assert not urlutil.url_needs_quoting(self.parent_url), \
                   "unquoted parent URL %r" % self.parent_url
        url = absolute_url(self.base_url, base_ref, parent_url)
        # assume file link if no scheme is found
        self.scheme = url.split(":", 1)[0].lower() or "file"
        if self.base_url != base_url:
            self.add_warning(_("Leading or trailing whitespace in URL `%(url)s'.") %
                               {"url": base_url}, tag=WARN_URL_WHITESPACE)
495441
static function __static()
    {
        if (extension_loaded(self::BACKING_OPENSSL)) {
            self::useOpenSslBacking();
        } elseif (extension_loaded(self::BACKING_MCRYPT)) {
            self::useMcryptBacking();
        } else {
            self::usePlaintextBacking();
        }
    }
153413
def dynamic_start(self, access_token, instance_url=None, **kw):
        
        self.dynamic = {'access_token': str(access_token), 'instance_url': str(instance_url)}
        self.dynamic.update(kw)
1051743
def _initURL(self, serverUrl=None):
        
        self._serverUrl = serverUrl

        parsed_url = urlparse(self._serverUrl)
        self._parsed_org_url = urlunparse((parsed_url[0],parsed_url[1],"","","",""))
        self._referer = parsed_url.netloc
65852
private void processConfigUrl(URL url) throws Exception {
        final String methodName = "processConfigUrl()";
        if (tc.isEntryEnabled())
            Tr.entry(tc, methodName + " configUrl=" + url);

        processedUrls.add(url);
        Properties props = new Properties();
        InputStream is = url.openStream();
        try {
            props.load(is);
        } finally {
            is.close();
        }

        int i = 0;
        VariableRegistry vr = variableRegistryRef.get();
        boolean found = false;
        do {
            // Look for instance name ( JNDI name == cacheName )
            String instancekey = "cache.instance." + i;
            String instanceName = props.getProperty(instancekey);

            // Remove leading forward slash
            if (instanceName != null && instanceName.charAt(0) == '/')
                instanceName = instanceName.substring(1);

            // Do we have an instance name?
            if (instanceName != null) {
                instanceName = instanceName.trim();
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName + " Adding new cache instance. instanceName=" + instanceName);
                found = true;

                // Build a vMap converted properties object
                Iterator<Object> it = props.keySet().iterator();
                Properties ccProps = new Properties();
                ccProps.put(CacheConfig.CACHE_NAME, instanceName);
                while (it.hasNext()) {
                    String s = (String) it.next();
                    if (s.startsWith(instancekey + ".")) {
                        String value = vr.resolveString(props.getProperty(s)).trim();
                        if (tc.isDebugEnabled())
                            Tr.debug(tc, methodName + " Adding property: " + s + " value:" + value);
                        ccProps.put("com.ibm.ws.cache.CacheConfig" + s.substring(instancekey.length()), value);
                        // for external cache provider access
                        String unmodifiedKey = s.substring(instancekey.length() + 1);
                        if (tc.isDebugEnabled()) {
                            Tr.debug(tc, methodName + " Adding property: " + unmodifiedKey + " value:" + value);
                        }
                        ccProps.put(unmodifiedKey, value);
                    }
                }
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName + " Final props=" + ccProps);

                // ------------------------------------------------------------
                // Bind to JNDI if the cache & the config do not exist
                // ------------------------------------------------------------
                DCache c = ServerCache.getCache(instanceName);

                CacheService cs = getCacheService();
                CacheConfig cacheConfig = cs.getCacheInstanceConfig(instanceName);
                if (c == null && cacheConfig == null) {
                    cacheConfig = cs.addCacheInstanceConfig(ccProps);
                    if (cacheConfig.isCreateCacheAtServerStartup()) {
                        if (tc.isDebugEnabled()) {
                            Tr.debug(tc, "Create cache instance \"" + instanceName + "\" during startup because the cache is configured to.");
                        }
                        ServerCache.createCache(cacheConfig.getCacheName(), cacheConfig);
                    }
                } else {
                    // In this case, the instanceName already exists, so output
                    // a
                    // warning message for the user
                    // DYNA1057W=DYNA1057W: Cache instance \"{0}\" defined in
                    // the \"{1}\" is not added because a cache with this name
                    // already exists.
                    // DYNA1057W.explanation=The cache instance is not added
                    // because a cache with this name already exists.
                    // DYNA1057W.useraction=Ensure that the cache instance does
                    // not define more than once in the properties file.
                    Tr.warning(tc, "DYNA1057W", new Object[] { instanceName, url.toString() });
                }
            } else {
                found = false;
            }
            i++;
        } while (found);

        if (tc.isEntryEnabled())
            Tr.exit(tc, methodName + " configUrl=" + url);
    }
237192
def _initURL(self,
                 org_url,
                 referer_url):
        
        if org_url is not None and org_url != '':
            if not org_url.startswith('http://') and not org_url.startswith('https://'):
                org_url = 'https://' + org_url
            self._org_url = org_url

            if self._org_url.lower().find('/sharing/rest') > -1:
                self._url = self._org_url
            else:
                self._url = self._org_url + "/sharing/rest"

            if self._url.startswith('http://'):
                self._surl = self._url.replace('http://', 'https://')
            else:
                self._surl = self._url

            parsed_url = urlparse(self._org_url)
            self._parsed_org_url = urlunparse((parsed_url[0],parsed_url[1],"","","",""))

        if referer_url is None:
            parsed_org = urlparse(self._org_url)
            self._referer_url = parsed_org.netloc

            url = '{}/portals/self'.format( self._url)

        parameters = {
            'f': 'json'
        }
        portal_info = self._post(url=url,
                                 param_dict=parameters,
                                 securityHandler=self,
                                 proxy_port=self._proxy_port,
                                 proxy_url=self._proxy_url)
        if 'user' in portal_info:
            if 'username' in portal_info['user']:
                self._username = portal_info['user']['username']
1230913
public void init(VirtualConnection inVC, HttpInboundChannel channel) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Init on link: " + this + " " + inVC);
        }
        super.init(inVC);
        this.myChannel = channel;
        if (null != getHTTPContext()) {
            getHTTPContext().setHttpConfig(channel.getHttpConfig());
        }

        getVirtualConnection().getStateMap().put(CallbackIDs.CALLBACK_HTTPICL, this);
        this.bIsActive = true;
    }
618643
def _add_url(self, chunk):
        
        if 'url' in chunk:
            return chunk
        public_path = chunk.get('publicPath')
        if public_path:
            chunk['url'] = public_path
        else:
            fullpath = posixpath.join(self.state.static_view_path,
                                      chunk['name'])
            chunk['url'] = self._request.static_url(fullpath)
        return chunk
1057325
public void init( String baseUrl, XRPCBatchRequestSender callback )
	{
		this.url = baseUrl + "&locale=" + LocaleInfo.getCurrentLocale().getLocaleName();
		this.callback = callback;
	}
294431
private void init(String svcUrl) {
		try {
			serviceUrl = new URL(svcUrl);
		} catch (MalformedURLException e) {
			throw new RuntimeException("It looks like the URL for remote NCBI BLAST service ("
									   + svcUrl + ") is wrong. Cause: " + e.getMessage(), e);
		}
	}
310608
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$backend = (string)$baseClass->Session->Backend;
            static::$savePath = $baseClass->parsePath($baseClass->Session->SavePath);
            static::$savePath = \trim(\session_save_path()) != '' ? \session_save_path() : static::$savePath;

            Directory::create(static::$savePath);
        }
    }