Initialize the MP I/O component.

@param CEL TRM's implementation of the CommsErrorListener interface.
@param RM TRM's implementation of the RoutingManager interface.
322387
public void init(CommsErrorListener CEL,
                   RoutingManager RM)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "init", new Object[] { CEL, RM});

    // Lock exclusively for start operations
    mpioLockManager.lockExclusive();
    _commsErrorListener = CEL;
    _routingManager = RM;
    
    synchronized(_mpConnectionsByMEConnection)
    {
      _mpConnectionsByMEUuid.clear();
      _mpConnectionsByMEConnection.clear();
    }
    
    // Create a new RemoteMessageReceiver if we don't already have one
    // or re-initialise the existing one to refresh any cached data
    // (used when an ME is re-started without the Server being re-started) 
    if(_remoteMessageReciever == null)
      _remoteMessageReciever = new RemoteMessageReceiver(_messageProcessor, this);
    else
      _remoteMessageReciever.init();
    
    started = true;    
    mpioLockManager.unlockExclusive();
          
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "init");
  }
1121294
@Override
	protected final void remoteInit() throws JMSException
    {
        CreateDurableSubscriberQuery query = new CreateDurableSubscriberQuery();
        query.setSessionId(session.getId());
        query.setConsumerId(id);
        query.setTopic((Topic)destination);
        query.setMessageSelector(messageSelector);
        query.setNoLocal(noLocal);
        query.setName(subscriptionName);
        transportEndpoint.blockingRequest(query);
    }
226133
protected void remoteInit() throws JMSException
    {
        CreateConsumerQuery query = new CreateConsumerQuery();
        query.setConsumerId(id);
        query.setSessionId(session.getId());
        query.setDestination(destination);
        query.setMessageSelector(messageSelector);
        query.setNoLocal(noLocal);
        transportEndpoint.blockingRequest(query);        
    }
405117
public void initialize(MessageStoreImpl ms, XidManager xidManager, Configuration configuration)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "initialize", new Object[]{"MS="+ms, "XidManager="+xidManager, "Config="+configuration});

        _ms            = ms;
        _configuration = configuration;

       

        // Defect 496893
        _timeouts = new MEStartupTimeouts(_ms);

        

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "initialize");
    }
869515
protected void configureAndInitializeSingleMetadataResolver(final AbstractMetadataResolver metadataProvider,
                                                                final SamlRegisteredService service) throws Exception {
        configureAndInitializeSingleMetadataResolver(metadataProvider, service, new ArrayList<>());
    }
730094
protected void remoteInit() throws JMSException
    {
        CreateBrowserQuery query = new CreateBrowserQuery();
        query.setBrowserId(id);
        query.setSessionId(session.getId());
        query.setQueue(queue);
        query.setMessageSelector(messageSelector);
        transportEndpoint.blockingRequest(query);
    }
1082443
@Override
	public synchronized void initialize(Manager manager) {
		if (this.manager != null) {
			throw new IllegalStateException("Callback was already initialized");
		}
		this.manager = manager;
		for (Callback callback : callbacks) {
			try {
				callback.initialize(manager);
			} catch (Exception e) {
				onManagerWarning("Callback initialization error", e);
			}
		}
	}
19291
@Override
    public void init (ConnectionManager cmgr, SocketChannel channel, long createStamp)
        throws IOException
    {
        super.init(cmgr, channel, createStamp);
        _pcmgr = (PresentsConnectionManager)cmgr;
    }
1238750
public void init(BaseMessageManager manager, String strQueueName, String strQueueType)
    {
        m_manager = manager;
        m_strQueueName = strQueueName;
        m_strQueueType = strQueueType;
        
        if (m_manager != null)
            m_manager.addMessageQueue(this);
    }
34054
public TrmRouteData createTrmRouteData() throws MessageCreateFailedException {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createTrmRouteData");
    TrmRouteData msg = null;
    try {
      msg = new TrmRouteDataImpl(MfpConstants.CONSTRUCTOR_NO_OP);
    }
    catch (MessageDecodeFailedException e) {
      /* No need to FFDC this as JsMsgObject will already have done so */
      // No FFDC code needed
      throw new MessageCreateFailedException(e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createTrmRouteData");
    return msg;
  }
94908
public void initialiseNonPersistent(MessageProcessor messageProcessor,
                                      SIMPTransactionManager txManager)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "initialiseNonPersistent", messageProcessor);

    //Release 1 has no Link Bundle IDs for this Neighbour

    // Cache the reference to the message processor
    _messageProcessor = messageProcessor;

    // Create the ObjectPool that will be used to store the 
    // subscriptionMessages.  Creating with an intial length of
    // 2, but this could be made a settable parameter for performance
    _subscriptionMessagePool = new ObjectPool("SubscriptionMessages", NUM_MESSAGES);

    // Create a new object to contain all the Neighbours
    _neighbours = new Neighbours(this, _messageProcessor.getMessagingEngineBus());

    // Create a new LockManager instance
    _lockManager = new LockManager();
    
    // Assign the transaction manager
    _transactionManager = txManager;
            
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initialiseNonPersistent");
  }
107344
private void init(FileChannel channel, FileChannel.MapMode mapMode)
    throws IOException {
        
        this.channel = channel;
        this.mappedByteBuffer = channel.map(mapMode, 0L, channel.size());
        mappedByteBuffer.load();
    }
809770
private void startInternal(int startMode) throws MessageStoreException {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "startInternal", new Integer(startMode));

        /**
         * The following code has been moved from initialize under defect 233412
         * as the PMI stats config needs to be refreshed in start() following a
         * failover restart.
         */

        // lohith liberty change

        // Removing PMI related classses

        /*
         * // register SIB.processor component's StatsTemplateLookup class
         * try {
         * Class lookupClass = Class
         * .forName("com.ibm.ws.pmi.preprocess.sib_processor_impl_StatsTemplateLookup");
         * 
         * 
         * 
         * StatsFactory .registerStatsTemplateLookup((StatsTemplateLookup)
         * lookupClass .newInstance());
         * 
         * } catch (Exception e) {
         * // FFDC
         * FFDCFilter
         * .processException(
         * e,
         * "com.ibm.ws.sib.processor.impl.MessageProcessor.startInternal",
         * "1:1470:1.445", this);
         * 
         * SIErrorException finalE = new SIErrorException(
         * nls
         * .getFormattedMessage(
         * "INTERNAL_MESSAGING_ERROR_CWSIP0002",
         * new Object[] {
         * "com.ibm.ws.sib.processor.impl.MessageProcessor",
         * "1:1477:1.445", e }, null), e);
         * 
         * SibTr.exception(tc, finalE);
         * SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] {
         * "com.ibm.ws.sib.processor.impl.MessageProcessor",
         * "1:1483:1.445", SIMPUtils.getStackTrace(e) });
         * 
         * if (TraceComponent.isAnyTracingEnabled()
         * && tc.isEntryEnabled())
         * SibTr.exit(tc, "startInternal", finalE);
         * 
         * throw finalE;
         * }
         */

        /*
         * The following code has been moved from initialise under defect
         * 170161.1 as a change to the startup order means we cannot use the
         * message store until it has been driven through its start() method.
         */

        _msgStore = (MessageStore) _engine.getMessageStore();
        _txManager = new SIMPTransactionManager(this, _msgStore);

        _mpAlarmManager = new MPAlarmManager(this,
                        SIMPConstants.MPAM_PERCENT_LATE,
                        SIMPConstants.MPAM_ALARM_POOL_SIZE);

        // create the batch handlers
        _publicationBatchHandler = new BatchHandler(
                        SIMPConstants.PUBLICATION_BATCH_SIZE,
                        SIMPConstants.PUBLICATION_BATCH_TIMEOUT, _txManager,
                        _mpAlarmManager);
        _sourceBatchHandler = new BatchHandler(_customProperties
                        .get_source_batch_size(), _customProperties
                        .get_source_batch_timeout(), _txManager, _mpAlarmManager);
        _targetBatchHandler = new BatchHandler(_customProperties
                        .get_target_batch_size(), _customProperties
                        .get_target_batch_timeout(), _txManager, _mpAlarmManager);

        // Create the access checker for destination authorization
        String theBus = _engine.getBusName();

        // Create the MP access checker
        _accessChecker = new AccessChecker(this);

        // Security Code changes for Liberty: Sharath Start
        _authentication = runtimeSecurityService.getAuthenticationInstance();
        _authorization = runtimeSecurityService.getAuthorizationInstance();
        // Security Code changes for Liberty: Sharath End

        // Set the security enablement flag
        _isBusSecure = _authorisationUtils.isBusSecure(getMessagingEngineBus());

        // Create a new Object Pool for the search results objects.
        _searchResultsPool = new SearchResultsObjectPool(
                        "MatchingSearchResults", _customProperties
                                        .get_searchResultsPoolSize());

        // Set up selection criteria factory
        _selectionCriteriaFactory = (SelectionCriteriaFactory) getSingletonInstance(SIMPConstants.JS_SELECTION_CRITERIA_FACTORY);

        _connections = new HashMap<SICoreConnection, SICoreConnection>();

        /*
         * Recover persistent state information or create structure if
         * necessary. Feature 174199.2.1
         */
        boolean warmStarted = reconstitute(startMode);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isDebugEnabled())
            SibTr.debug(tc, "Warm start state : " + warmStarted);

        if (!warmStarted) {
            //Venu mock mock
            //Create ME uuid
            this._engine.setMEUUID(new SIBUuid8());

            coldStart();
        } else {

            //Venu  mock mock
            this._engine.setMEUUID(getMessagingEngineUuid());

            // alert the destinationManager.that we are in the reconcile
            // phase of startup. This allows the manager to build lists of
            // destinations that will
            // need to be deleted.
            _destinationManager.prepareToReconcile();
        }

        if (_linkManager == null) {
            // Venu liberty change.
            // For this verion of Liberty profile. no TrmMeMain. Hence removing the code
            // and making linkManager as NULL
            // try again to get the link manager
            _linkManager = null;
        }
        if (_linkManager != null)
            _linkManager.setChangeListener(_linkChangeListener);
        else {
            if (TraceComponent.isAnyTracingEnabled()
                && tc.isDebugEnabled())
                SibTr.debug(tc, "Link Manager is null");
        }

        //Venu Liberty change:
        // Now Admin wil not be having List of localisation to a destination
        //For this version of Liberty profile, it is this ME.
        _localistySet.add(_engine.getUuid().toString());

        // Load Admin/WCCM defined destinations
        _engine.loadLocalizations();

        /*
         * Tick generator has to be initialised after
         * 
         * 1. Any previously persistently stored tick is available. 2 An
         * initially cold started persistent store is added to the msgstore.
         * This is because the tick generator immediately persists its tick
         * value when it is created.
         * 
         * Outside of these restrictions, we can initialise independently of
         * other objects in the start sequence.
         * 
         * Feature 174199.2.11
         */
        initializeTickGenerator();

        // create the temporary destination receiver
        try {
            _tdReceiverAddr = SIMPUtils.createJsSystemDestinationAddress(
                                                                         SIMPConstants.TDRECEIVER_SYSTEM_DESTINATION_PREFIX,
                                                                         getMessagingEngineUuid());
            _tdReceiverAddr.setBusName(getMessagingEngineBus());
            if (!_destinationManager.destinationExists(_tdReceiverAddr)) {
                _tdReceiverAddr = _destinationManager
                                .createSystemDestination(SIMPConstants.TDRECEIVER_SYSTEM_DESTINATION_PREFIX);
            }
        } catch (SIException e) {
            FFDCFilter
                            .processException(
                                              e,
                                              "com.ibm.ws.sib.processor.impl.MessageProcessor.startInternal",
                                              "1:1615:1.445", this);

            // SIException will occur if there's some problem creating the
            // temporary destination receiver.
            SIErrorException finalE = new SIErrorException(
                            nls
                                            .getFormattedMessage(
                                                                 "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                                 new Object[] {
                                                                               "com.ibm.ws.sib.processor.impl.MessageProcessor",
                                                                               "1:1626:1.445", e }, null), e);

            SibTr.exception(tc, finalE);

            SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] {
                                                                                "com.ibm.ws.sib.processor.impl.MessageProcessor",
                                                                                "1:1636:1.445", SIMPUtils.getStackTrace(e) });

            if (TraceComponent.isAnyTracingEnabled()
                && tc.isEntryEnabled())
                SibTr.exit(tc, "startInternal", finalE);

            throw finalE;
        }

        // Create the dynamic config manager
        createDynamicConfigManager();

        if (warmStarted) {
            // Write to console that reconciliation has started
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "Messaging engine " + getMessagingEngineName() + " is starting to reconcile the destination.");

            // First check that it is safe to delete unreconciled destinations
            _destinationManager.validateUnreconciled();
            // Reconcile WCCM and MP.reconstituted data for local destinations
            _destinationManager.reconcileLocal();

            // Venu mock mock .. no reconcileMQLinks, no reconcileLocalLinks, no reconcileMQLinkPubSubBridgeQs
            // no reconcileRemote, no reconcileRemoteTemporary, no  reconcileRemoteLinks
            // for this version of Liberty profile
            /*
             * // Reconcile WCCM and MP.reconstituted data for mqlinks
             * _destinationManager.reconcileMQLinks();
             * 
             * // Reconcile WCCM and MP.reconstituted data for local links
             * _destinationManager.reconcileLocalLinks();
             * 
             * // Reconcile any system destinations and topicspaces no longer
             * // required by
             * // the MQ pubsub bridge
             * _destinationManager.reconcileMQLinkPubSubBridgeQs();
             * 
             * // Reconcile WCCM and MP.reconstituted data for remote destinations
             * _destinationManager.reconcileRemote();
             * 
             * // Reconcile WCCM and MP.reconstituted data for remote temporary
             * // destinations
             * _destinationManager.reconcileRemoteTemporary();
             * 
             * // Reconcile WCCM and MP.reconstituted data for remote links
             * _destinationManager.reconcileRemoteLinks();
             */

            // Write to console that reconciliation has completed
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "Messaging engine " + getMessagingEngineName() + " has finished reconciling the destination.");

            // Spin off an asynchronous deletion thread to clean up
            _destinationManager.start();
        }

        // Venu mock mock ...
        // For now dont call _multiMEProxyHandler.initalised();

        /*
         * // Indicate that this has now started.
         * try {
         * _multiMEProxyHandler.initalised();
         * } catch (SIResourceException e1) {
         * // No FFDC code needed
         * if (TraceComponent.isAnyTracingEnabled()
         * && tc.isEntryEnabled())
         * SibTr.exit(tc, "startInternal", "SIErrorException");
         * throw new SIErrorException(e1);
         * }
         */

        // Start the expirer as the very last startup action so that we can be
        // sure
        // we have everything required to process an expiration set up.
        _msgStore.expirerStart();

        _msgStore.deliveryDelayManagerStart();

        synchronized (_mpStartStopLock) {
            _started = true;
        }

        // They will wait until WAS has also started before continuing into the
        // started or stopped state.
        _destinationManager.announceMPStarted(startMode);

        // If security is enabled then we'll load discriminator ACLs
        if (_isBusSecure) {
            _accessChecker.listTopicAuthorisations();
        }

        // Create the MulticastProperties object if multicast is enabled
        if (_customProperties.get_multicastEnabled())
            _multicastProperties = new MulticastPropertiesImpl(
                            _customProperties.get_multicastInterfaceAddress(),
                            _customProperties.get_multicastPort(), _customProperties
                                            .get_multicastPacketSize(), _customProperties
                                            .get_multicastTTL(), _customProperties
                                            .get_multicastGroupAddress(), _customProperties
                                            .get_multicastUseReliableRMM());

        // If the WAS started event occured before MP was started, then call it
        // now
        synchronized (_mpStartStopLock) {
            if (isWASOpenForEBusiness())
                serverStarted();
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "startInternal");
    }
307101
protected void initialize(CmsEventManager base) {

        m_eventListeners = new HashMap<Integer, List<I_CmsEventListener>>(base.getEventListeners());

    }
1242931
protected void initializeComponents(Collection<String> modules) {

        Iterator<CmsSetupComponent> itGroups = new ArrayList<CmsSetupComponent>(
            CmsCollectionsGenericWrapper.<CmsSetupComponent> list(m_components.elementList())).iterator();
        while (itGroups.hasNext()) {
            CmsSetupComponent component = itGroups.next();
            String errMsg = "";
            String warnMsg = "";
            // check name
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(component.getName())) {
                errMsg += Messages.get().container(Messages.ERR_COMPONENT_NAME_EMPTY_1, component.getId()).key();
                errMsg += "\n";
            }
            // check description
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(component.getName())) {
                warnMsg += Messages.get().container(Messages.LOG_WARN_COMPONENT_DESC_EMPTY_1, component.getId()).key();
                warnMsg += "\n";
            }
            // check position
            if (component.getPosition() == DEFAULT_POSITION) {
                warnMsg += Messages.get().container(Messages.LOG_WARN_COMPONENT_POS_EMPTY_1, component.getId()).key();
                warnMsg += "\n";
            }
            // check dependencies
            Iterator<String> itDeps = component.getDependencies().iterator();
            while (itDeps.hasNext()) {
                String dependency = itDeps.next();
                if (m_components.getObject(dependency) == null) {
                    errMsg += Messages.get().container(
                        Messages.LOG_WARN_COMPONENT_DEPENDENCY_BROKEN_2,
                        component.getId(),
                        dependency).key();
                    errMsg += "\n";
                }
            }
            // check modules match
            boolean match = false;
            Iterator<String> itModules = modules.iterator();
            while (itModules.hasNext()) {
                String module = itModules.next();
                if (component.match(module)) {
                    match = true;
                    itModules.remove();
                }
            }
            if (!match) {
                errMsg += Messages.get().container(Messages.ERR_COMPONENT_MODULES_EMPTY_1, component.getId()).key();
                errMsg += "\n";
            }

            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(errMsg)) {
                m_components.removeObject(component.getId());
                if (LOG.isErrorEnabled()) {
                    LOG.error(errMsg);
                }
            }
            if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(warnMsg)) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn(warnMsg);
                }
            }
        }
        if (!modules.isEmpty()) {
            if (LOG.isWarnEnabled()) {
                LOG.warn(Messages.get().container(Messages.LOG_WARN_MODULES_LEFT_1, modules.toString()));
            }
        }
    }
480541
private void triggerResolveInit() {
        Iterator<TransportResolverListener> iter = getListenersList().iterator();
        while (iter.hasNext()) {
            TransportResolverListener trl = iter.next();
            if (trl instanceof TransportResolverListener.Resolver) {
                TransportResolverListener.Resolver li = (TransportResolverListener.Resolver) trl;
                li.init();
            }
        }
    }
1093716
void initializeListeners(NavigationViewOptions navigationViewOptions, NavigationViewModel navigationViewModel) {
    assignFeedbackListener(navigationViewOptions.feedbackListener());
    assignNavigationListener(navigationViewOptions.navigationListener(), navigationViewModel);
    assignRouteListener(navigationViewOptions.routeListener());
    assignBottomSheetCallback(navigationViewOptions.bottomSheetCallback());
    MapboxNavigation navigation = navigationViewModel.retrieveNavigation();
    assignProgressChangeListener(navigationViewOptions, navigation);
    assignMilestoneEventListener(navigationViewOptions, navigation);
    assignInstructionListListener(navigationViewOptions.instructionListListener());
    assignSpeechAnnouncementListener(navigationViewOptions.speechAnnouncementListener());
    assignBannerInstructionsListener(navigationViewOptions.bannerInstructionsListener());
  }