This method resolves the target address to a callable gateway and starts the
registration after that.
762023
@SuppressWarnings("unchecked")
	public void startRegistration() {
		if (canceled) {
			// we already got canceled
			return;
		}

		try {
			// trigger resolution of the target address to a callable gateway
			final CompletableFuture<G> rpcGatewayFuture;

			if (FencedRpcGateway.class.isAssignableFrom(targetType)) {
				rpcGatewayFuture = (CompletableFuture<G>) rpcService.connect(
					targetAddress,
					fencingToken,
					targetType.asSubclass(FencedRpcGateway.class));
			} else {
				rpcGatewayFuture = rpcService.connect(targetAddress, targetType);
			}

			// upon success, start the registration attempts
			CompletableFuture<Void> rpcGatewayAcceptFuture = rpcGatewayFuture.thenAcceptAsync(
				(G rpcGateway) -> {
					log.info("Resolved {} address, beginning registration", targetName);
					register(rpcGateway, 1, retryingRegistrationConfiguration.getInitialRegistrationTimeoutMillis());
				},
				rpcService.getExecutor());

			// upon failure, retry, unless this is cancelled
			rpcGatewayAcceptFuture.whenCompleteAsync(
				(Void v, Throwable failure) -> {
					if (failure != null && !canceled) {
						final Throwable strippedFailure = ExceptionUtils.stripCompletionException(failure);
						if (log.isDebugEnabled()) {
							log.debug(
								"Could not resolve {} address {}, retrying in {} ms.",
								targetName,
								targetAddress,
								retryingRegistrationConfiguration.getErrorDelayMillis(),
								strippedFailure);
						} else {
							log.info(
								"Could not resolve {} address {}, retrying in {} ms: {}.",
								targetName,
								targetAddress,
								retryingRegistrationConfiguration.getErrorDelayMillis(),
								strippedFailure.getMessage());
						}

						startRegistrationLater(retryingRegistrationConfiguration.getErrorDelayMillis());
					}
				},
				rpcService.getExecutor());
		}
		catch (Throwable t) {
			completionFuture.completeExceptionally(t);
			cancel();
		}
	}
638960
protected void doEmit(Event event, Scope<? super Address> scope) {
		assert scope != null;
		assert event != null;
		final UniqueAddressParticipantRepository<Address> particips = getParticipantInternalDataStructure();
		final SynchronizedCollection<EventListener> listeners = particips.getListeners();
		synchronized (listeners.mutex()) {
			for (final EventListener listener : listeners) {
				final Address adr = getAddress(listener);
				if (scope.matches(adr)) {
					this.executorService.submit(new AsyncRunner(listener, event));
				}
			}
		}
	}
19372
private void registerServant(BusinessRemoteWrapper wrapper, int i)
    {
        // synchronized on the remote Wrapper to set the isRemoteRegistered flag
        synchronized (wrapper)
        {
            if (!ivBusinessRemoteRegistered[i])
            {
                try
                {
                    if (!isZOS)
                    {
                        // Since there may be multiple remote interfaces per bean
                        // type, a unique WrapperId must be formed by combining the
                        // BeanId with specific remote interface information. d419704
                        WrapperId wrapperId = new WrapperId
                                        (wrapper.beanId.getByteArrayBytes(),
                                                        wrapper.bmd.ivBusinessRemoteInterfaceClasses[i].getName(),
                                                        i);

                        // Servant registration must be performed with the application classloader
                        // in force.  This is especially needed for JITDeploy since
                        // the JIT pluggin will be on the application classloader.
                        // Without the JIT pluggin the classloader will not trigger
                        // JITDeploy to create the stub.  //d521388
                        Object originalLoader = ThreadContextAccessor.UNCHANGED;
                        try
                        {
                            if (ivBMD != null) // EJBFactories have no BMD.   d529446
                            {
                                originalLoader = EJBThreadData.svThreadContextAccessor.pushContextClassLoaderForUnprivileged(ivBMD.classLoader); //PK83186

                                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                {
                                    if (originalLoader != ThreadContextAccessor.UNCHANGED)
                                    {
                                        Tr.debug(tc, "registerServant : old ClassLoader = " + originalLoader);
                                        Tr.debug(tc, "registerServant : new ClassLoader = " + ivBMD.classLoader);
                                    }
                                    else
                                    {
                                        Tr.debug(tc, "registerServant : current ClassLoader = " + ivBMD.classLoader);
                                    }
                                }
                            }
                            wrapper.container.getEJBRuntime().registerServant(wrapperId, wrapper);
                        } finally
                        {
                            EJBThreadData.svThreadContextAccessor.popContextClassLoaderForUnprivileged(originalLoader);
                        } // finally

                    } // if( !isZOS )

                    ivBusinessRemoteRegistered[i] = true;
                } catch (Throwable ex)
                {
                    FFDCFilter.processException(ex, CLASS_NAME + ".registerServant", "439", this);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                    {
                        Tr.event(tc, "Failed to register wrapper instance", new Object[] { wrapper, ex });
                    }
                }

            } // if ( ! ivBusinessRemoteRegistered[i] )

        } //synchronized( wrapper )

    }
639239
def register(self, entry_point):
        
        if entry_point in self.registered_converters:
            raise ValueError('Already registered')
        self.registered_converters.insert(0, entry_point)
1095703
public final void resolve(InetAddress value) {
		future.complete(new Tree((Tree) null, null, value));
	}
511064
def register(self, prefix, viewset, base_name=None, router_class=None):
        
        if base_name is None:
            base_name = self.get_default_base_name(viewset)

        if router_class is not None:
            kwargs = {'trailing_slash': bool(self.trailing_slash)}
            single_object_router_classes = (
                AuthenticationRouter, SingleObjectRouter)

            if issubclass(router_class, single_object_router_classes):
                router = router_class(**kwargs)
                router.register(prefix, viewset, base_name=base_name)
                self._single_object_registry.append(router)

        else:
            self.registry.append((prefix, viewset, base_name))
1011126
public function registerAddress()
    {
        $address                   = $this->lanIp . ':' . $this->lanPort;
        $this->_registerConnection = new AsyncTcpConnection("text://{$this->registerAddress}");
        $this->_registerConnection->send('{"event":"gateway_connect", "address":"' . $address . '", "secret_key":"' . $this->secretKey . '"}');
        $this->_registerConnection->onClose = array($this, 'onRegisterConnectionClose');
        $this->_registerConnection->connect();
    }
314639
public void targetAppears( TargetHandler targetItf ) {
		this.defaultTargetHandlerResolver.addTargetHandler( targetItf );

		// When a target is deployed, we may also have to update instance states.
		// Consider as an example when the DM restarts. Targets may be injected
		// before and after the pojo was started by iPojo.

		// See #519 for more details.
		// Notice we restore instances only when the DM was started (the messaging
		// must be ready). If it is not started, do nothing. The "start" method
		// will trigger the restoration.

		// We consider the DM is started if the timer is not null.
		if( this.timer != null )
			restoreInstancesFrom( targetItf );
	}
134650
public void start() throws IOException {
        log.trace("start()");
        if (stopped) {
            throw new IOException("Unable to start connector as already stopped.");
        }

        // If this ConnectorServer has already started just return.
        if (started) {
            return;
        }

        log.trace("Registering service");
        registration = endpoint.registerService(CHANNEL_NAME, new ChannelOpenListener(), OptionMap.EMPTY);
        started = true;
    }
312389
function () {
			BaseController.prototype.onInit.call(this);

			// manually call the handler once at startup as device API won't do this for us
			this._onOrientationChange({
				landscape: Device.orientation.landscape
			});

			this.getRouter().getRoute("tools").attachPatternMatched(this._onMatched, this);
		}
106312
def connection_made(self, address):
        """"""
        self._proxy = PickleProxy(self.loop, self)
        for d in self._proxy_deferreds:
            d.callback(self._proxy)
1249684
def register_route(self, src, dst, gateway):
        
        self._set_aliased('router-route', ' '.join((src, dst, gateway)), multi=True)

        return self
1278895
private Source register(Source source) {
        
        /**
         * As promised, the registrar simply abstracts away internal resolvers
         * by iterating over them during the registration process.
         */
        for (Resolver resolver : resolvers) {
            resolver.register(source);
        }
        
        return source;
    }
818558
private function launchClosure()
    {
        foreach ($this->resolving() as $methodName) {
            $this->getResolver()->method($this, $methodName, [], true);
        }

        $this->launching();
    }
1225595
function startAtRoute( routeName, optionalContext = {} ) {
      return flowController.loadFlow( 'mainz' )
         .then( routerMock.awaitRegisterRoutes )
         .then( () => routerMock.triggerRouteHandler( routeName, optionalContext ) )
         .then( awaitDidNavigate );
   }
1173126
def resolve_path(self, address):
        '''
        
        '''
        match = self.find_one(address)
        if not match:
            return [self]

        # Go further up the tree if possible
        if isinstance(match, ContainerNode):
            return match.resolve_path(address) + [self]

        # This is as far as we go
        return [match, self]
699310
public function afterRegistry()
    {
        parent::afterRegistry();

        if (! $this->model instanceof \Gems_Model_RespondentModel) {
            $this->model = $this->loader->getModels()->getRespondentModel(true);
        }
    }