Initializes the connection with its channel. Must be called with a
{@link PresentsConnectionManager} as <code>cmgr</code>.
19291
@Override
    public void init (ConnectionManager cmgr, SocketChannel channel, long createStamp)
        throws IOException
    {
        super.init(cmgr, channel, createStamp);
        _pcmgr = (PresentsConnectionManager)cmgr;
    }
1338235
protected void initMembers() {

        synchronized (LOCK) {
            m_resourceInitHandlers = new ArrayList<I_CmsResourceInit>();
            m_requestHandlers = new HashMap<String, I_CmsRequestHandler>();
            m_systemInfo = new CmsSystemInfo();
            m_exportPoints = Collections.emptySet();
            m_defaultUsers = new CmsDefaultUsers();
            m_localeManager = new CmsLocaleManager(Locale.ENGLISH);
            m_sessionManager = new CmsSessionManager();
            m_runtimeProperties = new Hashtable<Object, Object>();
            // the default event manager must be available because the configuration already registers events
            m_eventManager = new CmsEventManager();
            // default link manager is required for test cases
            m_linkManager = new CmsLinkManager(new CmsDefaultLinkSubstitutionHandler());
        }
    }
563971
protected void initMessageObject() {

        Object o = null;

        try {
            // this is not the initial call, get the message info object from session
            o = getDialogObject();
            m_msgInfo = (CmsMessageInfo)o;
            // test
            m_msgInfo.getTo();
        } catch (Exception e) {
            // create a new message info object
            m_msgInfo = new CmsMessageInfo();
        }
        m_msgInfo.setFrom(getCms().getRequestContext().getCurrentUser().getFullName());
        m_msgInfo.setTo(getToNames());
    }
879562
public Channel initialize() throws InvalidArgumentException, TransactionException {

        logger.debug(format("Channel %s initialize shutdown %b", name, shutdown));

        if (isInitialized()) {
            return this;
        }

        if (shutdown) {
            throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
        }

        if (isNullOrEmpty(name)) {

            throw new InvalidArgumentException("Can not initialize channel without a valid name.");

        }
        if (client == null) {
            throw new InvalidArgumentException("Can not initialize channel without a client object.");
        }

        userContextCheck(client.getUserContext());

        if (null == sdOrdererAddition) {

            setSDOrdererAddition(new SDOrdererDefaultAddition(getServiceDiscoveryProperties()));
        }

        if (null == sdPeerAddition) {

            setSDPeerAddition(new SDOPeerDefaultAddition(getServiceDiscoveryProperties()));

        }

        try {
            loadCACertificates(false);  // put all MSP certs into cryptoSuite if this fails here we'll try again later.
        } catch (Exception e) {
            logger.warn(format("Channel %s could not load peer CA certificates from any peers.", name));
        }
        Collection<Peer> serviceDiscoveryPeers = getServiceDiscoveryPeers();
        if (!serviceDiscoveryPeers.isEmpty()) {

            logger.trace("Starting service discovery.");

            this.serviceDiscovery = new ServiceDiscovery(this, serviceDiscoveryPeers, getTransactionContext());
            serviceDiscovery.fullNetworkDiscovery(true);
            serviceDiscovery.run();
            logger.trace("Completed. service discovery.");
        }

        try {

            logger.debug(format("Eventque started %s", "" + eventQueueThread));

            for (Peer peer : getEventingPeers()) {
                peer.initiateEventing(getTransactionContext(), getPeersOptions(peer));
            }

            transactionListenerProcessorHandle = registerTransactionListenerProcessor(); //Manage transactions.
            logger.debug(format("Channel %s registerTransactionListenerProcessor completed", name));

            if (serviceDiscovery != null) {
                chaincodeEventUpgradeListenerHandle = registerChaincodeEventListener(Pattern.compile("^lscc$"), Pattern.compile("^upgrade$"), (handle, blockEvent, chaincodeEvent) -> {
                    logger.debug(format("Channel %s got upgrade chaincode event", name));
                    if (!isShutdown() && isChaincodeUpgradeEvent(blockEvent.getBlockNumber())) {
                        getExecutorService().execute(() -> serviceDiscovery.fullNetworkDiscovery(true));
                    }
                });
            }

            startEventQue(); //Run the event for event messages from event hubs.
            logger.info(format("Channel %s eventThread started shutdown: %b  thread: %s ", toString(), shutdown, eventQueueThread == null ? "null" : eventQueueThread.getName()));

            this.initialized = true;

            logger.debug(format("Channel %s initialized", name));

            return this;

        } catch (Exception e) {
            TransactionException exp = new TransactionException(e);
            logger.error(exp.getMessage(), exp);
            throw exp;
        }

    }
107344
private void init(FileChannel channel, FileChannel.MapMode mapMode)
    throws IOException {
        
        this.channel = channel;
        this.mappedByteBuffer = channel.map(mapMode, 0L, channel.size());
        mappedByteBuffer.load();
    }
1362851
public void init() throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "UDP Channel: " + getConfig().getExternalName() + " listening port: " + String.valueOf(getConfig().getPort()));
        }
    }
340606
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc,
      org.ironjacamar.common.api.metadata.resourceadapter.ConnectionDefinition cd)
   {
      if (cd.getJndiName() != null)
         cmc.setJndiName(cd.getJndiName());

      if (cd.isSharable() != null)
         cmc.setSharable(cd.isSharable());

      if (cd.isEnlistment() != null)
         cmc.setEnlistment(cd.isEnlistment());

      if (cd.isConnectable() != null)
         cmc.setConnectable(cd.isConnectable());

      if (cd.isTracking() != null)
         cmc.setTracking(cd.isTracking());
   }
221606
public static void initialize(CmsObject cms) throws CmsException {

        OpenCms.getRoleManager().checkRole(cms, CmsRole.ADMINISTRATOR);
        try {
            // store the Admin cms to index Cms resources
            m_adminCms = OpenCms.initCmsObject(cms);
            m_adminCms.getRequestContext().setSiteRoot("");
        } catch (CmsException e) {
            // this should never happen
        }
    }
378696
public void init(Configuration c)
	{
		final DatapointModel m = c.getDatapointModel();
		if (m != null)
			createReferences(m);
	}
178971
@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();
        }

        audioChannel = new AudioChannel(new MediaLocator(this.getMediaLocator()), localIp, ip, localPort, remotePort, AudioFormatUtils.getAudioFormat(this.getPayloadType()),this);
    }
1097125
@Override
    protected void initializeImpl()
    {
        //setup connection factory
        String className=this.getConfigurationValue(FaxClientSpiConfigurationConstants.CONNECTION_FACTORY_CLASS_NAME_PROPERTY_KEY);
        if(className==null)
        {
            className=HylaFAXClientConnectionFactoryImpl.class.getName();
        }
        this.connectionFactory=this.createHylaFAXClientConnectionFactory(className);
        if(this.connectionFactory==null)
        {
            throw new FaxException("HylaFAX connection factory is not available.");
        }
    }
1291356
public void initConfiguration() throws CmsConfigurationException {

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_LOADER_CONFIG_FINISHED_0));
        }

        m_resourceTypesFromXml = Collections.unmodifiableList(m_resourceTypesFromXml);
        m_loaderList = Collections.unmodifiableList(m_loaderList);
        Collections.sort(m_configuredMimeTypes);
        m_configuredMimeTypes = Collections.unmodifiableList(m_configuredMimeTypes);
        m_configuredRelationTypes = Collections.unmodifiableList(m_configuredRelationTypes);

        // initialize the HTML converters
        initHtmlConverters();
        m_configuredHtmlConverters = Collections.unmodifiableList(m_configuredHtmlConverters);

        // initialize the resource types
        initResourceTypes();
        // initialize the MIME types
        initMimeTypes();
    }
1023882
public void init() throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "init");
        }
        super.init();

        if (!getConfig().isInbound()) {
            try {
                this.asyncChannelGroup = findOrCreateACG();
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Created completion port for outbound connections, completionPort = " + this.asyncChannelGroup.getCompletionPort());
                }
            } catch (AsyncException ae) {
                ChannelException ce = new ChannelException("Error creating async channel group ");
                ce.initCause(ae);
                throw ce;
            }
        }
        // create AIO CompletionListeners
        aioReadCompletionListener = new AioReadCompletionListener();
        aioWriteCompletionListener = new AioWriteCompletionListener();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "init");
        }
    }
1346333
public void init(BaseMessageReceiver messageReceiver, AbstractTableModel model)
    {
        super.init(messageReceiver, null);
        m_model = model;
    }
1328904
private void init(){
	
		if(!Annotation.isInheritedMapped(configuredClass))
			Error.classNotMapped(configuredClass);
		
		for (Class<?> classe :getClasses()){
			relationalManyToOneMapper.put(classe.getName(), new JMapper(configuredClass, classe,ChooseConfig.DESTINATION));
			relationalOneToManyMapper.put(classe.getName(), new JMapper(classe, configuredClass,ChooseConfig.SOURCE));
		}
	}
872307
private void initializeDRProducer() {
        try {
            if (m_producerDRGateway != null) {
                m_producerDRGateway.startAndWaitForGlobalAgreement();

                for (Initiator iv2init : m_iv2Initiators.values()) {
                    iv2init.initDRGateway(m_config.m_startAction,
                                          m_producerDRGateway,
                                          isLowestSiteId(iv2init));
                }

                m_producerDRGateway.completeInitialization();
            }
        } catch (Exception ex) {
            CoreUtils.printPortsInUse(hostLog);
            VoltDB.crashLocalVoltDB("Failed to initialize DR producer", false, ex);
        }
    }
52243
private function initializeDoctrine()
    {
        if ($this->cm !== null) {
            return;
        }

        if (! self::$entityManager) {
            throw new RuntimeException('No runtime entity manager set. Call PersistentObject#setEntityManager().');
        }

        $this->cm = self::$entityManager->getClassMetadata(static::class);
    }