Binds the specified {@link CompositeServiceEntry}.
12023
protected T service(CompositeServiceEntry<I, O> entry) {
        requireNonNull(entry, "entry");
        services.add(entry);
        return self();
    }
126339
@Override
  protected void configure() {

    bind(DiscoveryService.class).to(BaseDiscoveryService.class);

    bind(OperatingSystemDetectionStrategy.class)
        .to(NameSubstringBasedOperatingSystemDetectionStrategy.class);
  }
311779
@Override
    public ManagedService addingService(ServiceReference<ManagedService> reference) {
        String[] pids = getServicePid(reference);
        if (pids == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "handleRegistration(): Invalid service.pid type: " + reference);
            }
            return null;
        }

        ManagedService ms = context.getService(reference);
        if (ms == null)
            return null;

        synchronized (caFactory.getConfigurationStore()) {
            for (String pid : pids) {
                add(reference, pid, ms);
            }
        }

        return ms;
    }
160327
@Override
  public ServiceRefAmp bind(ServiceRefAmp service, String address)
  {
    if (log.isLoggable(Level.FINEST)) {
      log.finest(L.l("bind {0} for {1} in {2}",
                    address, service.api().getType(), this));
    }

    address = toCanonical(address);
    
    registry().bind(address, service);

    return service;
  }
639250
public void add(ServiceReference<S> declarationBinderRef) throws InvalidFilterException {
        BinderDescriptor binderDescriptor = new BinderDescriptor(declarationBinderRef);
        declarationBinders.put(declarationBinderRef, binderDescriptor);
    }
312669
@Override
	public void registerThrowable(RetryContext context, Throwable throwable) {
		RetryContext[] contexts = ((CompositeRetryContext) context).contexts;
		RetryPolicy[] policies = ((CompositeRetryContext) context).policies;
		for (int i = 0; i < contexts.length; i++) {
			policies[i].registerThrowable(contexts[i], throwable);
		}
		((RetryContextSupport) context).registerThrowable(throwable);
	}
1369426
def bind(self, dependency, svc, svc_ref):
        # type: (Any, Any, ServiceReference) -> None
        
        with self._lock:
            self.__set_binding(dependency, svc, svc_ref)
            self.check_lifecycle()
958781
@Reference(policy = ReferencePolicy.DYNAMIC, target = "(id=unbound)")
    protected void setContextService(ServiceReference<WSContextService> ref) {
        contextSvcRef.setReference(ref);
    }
498174
@Override
    public void registerService(ServiceInstance<T> service) throws Exception
    {
        Entry<T> newEntry = new Entry<T>(service);
        Entry<T> oldEntry = services.putIfAbsent(service.getId(), newEntry);
        Entry<T> useEntry = (oldEntry != null) ? oldEntry : newEntry;
        synchronized(useEntry)
        {
            if ( useEntry == newEntry ) // i.e. is new
            {
                useEntry.cache = makeNodeCache(service);
            }
            internalRegisterService(service);
        }
    }
400991
protected void activate(ComponentContext compcontext) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Activating " + this.getClass().getName());
        }
        this.unauthenticatedSubjectServiceRef.activate(compcontext);
    }
284067
private static void bindService() {
        synchronized (Command.class) {
            if (!IS_BIND) {
                Context context = Cmd.getContext();
                if (context == null) {
                    throw new NullPointerException("Context not should null. Please call Cmd.init(Context)");
                } else {
                    // Cmd service
                    context.bindService(new Intent(context, CommandService.class), I_CONN, Context.BIND_AUTO_CREATE);
                    IS_BIND = true;
                }
            }
        }
    }
626266
protected void setContextProvider(ServiceReference<JCAContextProvider> ref) {
        contextProviders.putReference((String) ref.getProperty(JCAContextProvider.TYPE), ref);
    }
865138
@Reference(name = "contextService", service = WSContextService.class)
    protected void setContextService(ServiceReference<WSContextService> ref) {
        contextServiceRef.setReference(ref);
    }
172663
public void bind(String name, T binding) {
        put(name, binding);

        Map<String, Map<String, NameClassPair>> bindingsByContext = this.contextBindings;
        if (bindingsByContext != null) {
            addContextBinding(bindingsByContext, name, binding);
        }

        Set<String> contexts = this.contexts;
        if (contexts != null) {
            contexts.add(getContextName(name));
        }
    }
1008011
public static <T> T bind (T service, String entryPoint)
    {
        ((ServiceDefTarget)service).setServiceEntryPoint(entryPoint);
        return service;
    }
1160428
public void registerService(ProvidedServiceInstance serviceInstance,
            OperationalStatus status) {

        serviceInstance.setStatus(status);
        registerService(serviceInstance);
    }
550296
public void registerService(ProvidedServiceInstance serviceInstance) {
        getServiceDirectoryClient().registerServiceInstance(serviceInstance);
        getCacheServiceInstances().put(new ServiceInstanceToken(serviceInstance.getServiceName(), serviceInstance.getProviderId()), new InstanceHealthPair(null));
    }