Interface CapabilityServiceBuilder<T>

    • Method Detail

      • addCapabilityRequirement

        @Deprecated
        <I> CapabilityServiceBuilder<T> addCapabilityRequirement​(String capabilityName,
                                                                 Class<I> type,
                                                                 org.jboss.msc.inject.Injector<I> target,
                                                                 String... referenceNames)
        Deprecated.
        Use requiresCapability(String, Class, String...) instead. This method will be removed in a future release.
        Adds capability requirement with injection to service which we are building
        Type Parameters:
        I - the type of the value of the dependency
        Parameters:
        capabilityName - name of capability requirement
        type - the class of the value of the dependency
        target - the injector into which the dependency should be stored
        referenceNames - dynamic part(s) of capability name, only useful when using dynamic named capabilities
        Returns:
        this builder
      • addCapabilityRequirement

        @Deprecated
        <I> CapabilityServiceBuilder<T> addCapabilityRequirement​(String capabilityName,
                                                                 Class<I> type,
                                                                 org.jboss.msc.inject.Injector<I> target)
        Deprecated.
        Use requiresCapability(String, Class, String...) instead. This method will be removed in a future release.
        Adds capability requirement with injection to capability which we are building
        Type Parameters:
        I - the type of the value of the dependency
        Parameters:
        capabilityName - name of capability requirement
        type - the class of the value of the dependency
        target - the injector into which the dependency should be stored
        Returns:
        this builder
      • setInitialMode

        CapabilityServiceBuilder<T> setInitialMode​(org.jboss.msc.service.ServiceController.Mode mode)
        Specified by:
        setInitialMode in interface org.jboss.msc.service.ServiceBuilder<T>
        Returns:
        this builder
      • setInstance

        CapabilityServiceBuilder<T> setInstance​(org.jboss.msc.Service service)
        Specified by:
        setInstance in interface org.jboss.msc.service.ServiceBuilder<T>
        Returns:
        this builder
      • provides

        <V> Consumer<V> provides​(RuntimeCapability<?>... capabilities)
        Provide value under given capabilities.
        Type Parameters:
        V - consumed value type
        Parameters:
        capabilities - capabilities provided value represent
        Returns:
        consumer providing value
      • provides

        <V> Consumer<V> provides​(RuntimeCapability<?> capability,
                                 org.jboss.msc.service.ServiceName alias,
                                 org.jboss.msc.service.ServiceName... aliases)
        Provide value under given capability and aliases.
        Type Parameters:
        V - consumed value type
        Parameters:
        capability - name of capability provided value represent
        alias - alias name of provided value
        aliases - other aliases of provided value
        Returns:
        consumer providing value
      • provides

        <V> Consumer<V> provides​(RuntimeCapability<?>[] capabilities,
                                 org.jboss.msc.service.ServiceName[] aliases)
        Provide value under given capabilities and alias names.
        Type Parameters:
        V - consumed value type
        Parameters:
        capabilities - capabilities provided value represent
        aliases - alias names of provided value
        Returns:
        consumer providing value
      • requiresCapability

        <V> Supplier<V> requiresCapability​(String capabilityName,
                                           Class<V> dependencyType,
                                           String... referenceNames)
        Capability requirement.
        Type Parameters:
        V - the type of the value of the dependency
        Parameters:
        capabilityName - name of capability requirement
        dependencyType - the class of the value of the dependency
        referenceNames - dynamic part(s) of capability name, only useful when using dynamic named capabilities
        Returns:
        readonly dependency reference