Registers the link with WLM
@throws SIResourceException
967368
public void registerLink() throws SIResourceException
  { 
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "registerLink");
    // Tell TRM that the link exists 
    try
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(tc, "Register MQLink: " + getUuid() + ", with mqLinkManager");       
      _mqLinkManager.define(getUuid());
    }
    catch (LinkException e)
    {
      //Error during create of the link.  Trace an FFST and exit
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.MQLinkHandler.registerLink",
        "1:804:1.71",
        this);
  
      SibTr.exception(tc, e);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
        SibTr.exit(tc, "registerLink", e);
      throw new SIResourceException(e);
    }

    //Register the link with TRM
    registerDestination();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "registerLink");
  }
1307125
private void handleNewStreamID(ControlMessage cMsg) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "handleNewStreamID", new Object[] { cMsg });

    handleNewStreamID(cMsg, null);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "handleNewStreamID");
  }
1364931
public static ExternalLink newExternalLink(final String linkId, final String url,
		final String labelId, final ResourceBundleKey resourceBundleKey, final Component component)
	{
		final ExternalLink externalLink = new ExternalLink(linkId, Model.of(url));
		externalLink.add(new Label(labelId,
			ResourceModelFactory.newResourceModel(resourceBundleKey, component)));
		return externalLink;
	}
1060836
@Override
    public T addAsWebResource(String resourceName, String target) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName should be specified");
        Validate.notNull(target, "Target should be specified");

        return addAsWebResource(new ClassLoaderAsset(resourceName), target);
    }
332292
void registerDestination()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "registerDestination");

    //Only register the destination once its been defined to WLM
    if (_mqLinkManager.isDefined(getUuid()))
    {
      if ((hasLocal()) && (!_registeredInWLM))
      {
        try
        {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "Register MQLink: " + getUuid() + ", with linkManager");           
          _linkManager.register(getUuid());
          _registeredInWLM = true;
        }
        catch (LinkException e)
        {
          //Error during create of the link.  Trace an FFST.  If we cant 
          //advertise the link, other ME's wont be able to send to it
          FFDCFilter.processException(
            e,
            "com.ibm.ws.sib.processor.impl.MQLinkHandler.registerDestination",
            "1:724:1.71",
            this);
    
          SibTr.exception(tc, e);
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
            SibTr.exit(tc, "registerDestination", e);
        }
      }
    }
        
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "registerDestination");  
      
    return;
  }
605903
public void createMQLinkLocalization(
                                         MQLinkDefinition mqld,
                                         LocalizationDefinition linkLocalizationDefinition,
                                         VirtualLinkDefinition virtualLinkDefinition,
                                         Set<String> linkLocalizingMEs)
                    throws SIIncorrectCallException, SIResourceException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "createMQLinkLocalization",
                        new Object[] { mqld, linkLocalizationDefinition, virtualLinkDefinition, linkLocalizingMEs });

        boolean linkCreated = false;
        boolean engineResourcesRequired = false;
        MQLinkHandler mqLinkHandler = null;
        // Create a local UOW
        LocalTransaction transaction = txManager.createLocalTransaction(false);

        // Try to create the local destination.
        try
        {
            DestinationHandler dh = linkIndex.findByName(virtualLinkDefinition.getName(), null);

            if (dh == null)
            {
                // Create a new LinkHandler, which is created locked
                mqLinkHandler = createMQLinkHandler(mqld, virtualLinkDefinition, transaction);
                linkCreated = true;
            }
            else
            {
                mqLinkHandler = (MQLinkHandler) dh;
            }

            synchronized (mqLinkHandler)
            {
                // If the link is corrupt, do not attempt any update.
                if (!mqLinkHandler.isCorruptOrIndoubt())
                {
                    engineResourcesRequired = createMQLinkMPResources(mqLinkHandler,
                                                                      mqld,
                                                                      linkLocalizationDefinition,
                                                                      virtualLinkDefinition,
                                                                      linkLocalizingMEs,
                                                                      transaction,
                                                                      linkCreated);
                }

                // If everything was successful then commit the unit of work
                transaction.commit();

                // Now we tell the MQLink component to go ahead and create
                // the MQLink infrastructure, if appropriate
                if (!mqLinkHandler.isCorruptOrIndoubt())
                {
                    if (engineResourcesRequired)
                        createMQLinkEngineResources(mqld, mqLinkHandler);

                    //Whether we are reusing the Handler or not, we are now ready to
                    // register the link with WLM
                    mqLinkHandler.registerLink();
                }
            } // eof synchronized on MQLinkHandle
        } catch (RuntimeException e)
        {
            // FFDC
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.DestinationManager.createMQLinkLocalization",
                                        "1:6885:1.508.1.7",
                                        this);

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            {
                SibTr.exception(tc, e);
                SibTr.exit(tc, "createMQLinkLocalization", e);
            }

            handleRollback(transaction);

            // PK69423 Put the link in-doubt, so we do not delete it when we reconcile
            putLinkIntoIndoubtState(virtualLinkDefinition.getName());

            throw e;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createMQLinkLocalization");
    }
1210714
protected function addLink(Request $request, Link $link)
    {
        if (!class_exists(AddLinkHeaderListener::class)) {
            throw new \LogicException('You can not use the "addLink" method if the WebLink component is not available. Try running "composer require symfony/web-link".');
        }

        if (null === $linkProvider = $request->attributes->get('_links')) {
            $request->attributes->set('_links', new GenericLinkProvider([$link]));

            return;
        }

        $request->attributes->set('_links', $linkProvider->withLink($link));
    }
321842
private void registerModelAdapter() {
        Dictionary<String, Object> properties = createResourceToModelAdapterProperties();
        String serviceClassName = AdapterFactory.class.getName();
        this.resourceToModelAdapterRegistration = this.context.registerService(serviceClassName, this.adapter, properties);
    }
755774
public function registerLink(
            string $elmId, 
            string $uriPattern, 
            array  $uriParams, 
            string $event    = self::EVENT_CLIC, 
            string $targetId = null)
    {
        $selector = '$("#' . $elmId . '").';
        $replaces = [];
        foreach ($uriParams as $key => $value) {
            $replaces[] = "replace('" . $key . "', " . $selector . $value . ')';
        }
        $target = $targetId ? ", '" . $targetId . "'" : '';
        $callOptions = "'" . $uriPattern . "'." . implode('.', $replaces) . $target;
        $script  = $selector . $event;
        $script .= '(function(e){e.preventDefault();$.ajaxCall(' . $callOptions . ')});';
        return $this->registerScript($script);
    }
855828
protected function registerBindings(): void
    {
        $this->app->bind('algolia.connection', function (Container $app) {
            $manager = $app['algolia'];

            return $manager->connection();
        });

        $this->app->alias('algolia.connection', SearchClient::class);
    }
1059083
public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, TypeElement typeElement, Content contentTree) {
        addPreQualifiedClassLink(context, typeElement, false, contentTree);
    }
97073
public void registerLink(Mtp2 mtp2) {
        try {
            mtp2.getLayer1().register(selector);
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
1096193
private void register( final Bundle bundle )
    {
        LOG.debug( "Scanning bundle [" + bundle.getSymbolicName() + "]" );
        final List<T> resources = m_scanner.scan( bundle );
        m_mappings.put( bundle, resources );
        if( resources != null && resources.size() > 0 )
        {
            LOG.debug( "Found resources " + resources );
		            for( final BundleObserver<T> observer : m_observers )
		            {
		                try
		                {
		                	//here the executor service completes the job in an extra thread. 
		                	executorService.submit(new Runnable() {
		                		public void run() {
		                		    try 
		                		    {
		                		        observer.addingEntries( bundle, Collections.unmodifiableList( resources ) );
		                		    }
		                		    catch (Throwable t)
		                		    {
		                		        LOG.error( "Exception in executor thread", t );
		                		    }
		                		}
		                	});
		                }
		                catch( Throwable ignore )
		                {
		                    LOG.error( "Ignored exception during register", ignore );
		                }
		            }
        }
    }
206211
@Override
    public T addAsWebInfResource(final Asset resource, final String target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource should be specified");
        Validate.notNullOrEmpty(target, "Target should be specified");

        return addAsWebInfResource(resource, ArchivePaths.create(target));
    }
1186789
public static function register()
    {
        if ( self::$hasBeenRegistered === true ) {
            return;
        }

        if ( stream_filter_register(self::getFilterName(), __CLASS__) === false ) {
            throw new RuntimeException('Failed to register stream filter: '.self::getFilterName());
        }

        self::$hasBeenRegistered = true;
    }
1356471
protected function registerRpcEvent()
    {
        $swooleListeners = SwooleListenerCollector::getCollector();

        if (!isset($swooleListeners[SwooleEvent::TYPE_PORT][0]) || empty($swooleListeners[SwooleEvent::TYPE_PORT][0])) {
            throw new RuntimeException("Please use swoft/rpc-server, run 'composer require swoft/rpc-server'");
        }

        $this->listen = $this->server->listen($this->tcpSetting['host'], $this->tcpSetting['port'], $this->tcpSetting['type']);
        $tcpSetting = $this->getListenTcpSetting();
        $this->listen->set($tcpSetting);

        $swooleRpcPortEvents = $swooleListeners[SwooleEvent::TYPE_PORT][0];
        $this->registerSwooleEvents($this->listen, $swooleRpcPortEvents);
    }
1179731
private void handleNewStreamID(MessageItem msgItem) throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "handleNewStreamID", new Object[] { msgItem });

    JsMessage jsMsg = msgItem.getMessage();

    handleNewStreamID(jsMsg, msgItem);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "handleNewStreamID");
  }