Interface RequirementServiceBuilder<T>

  • Type Parameters:
    T - an ignored service value type
    All Superinterfaces:
    org.jboss.msc.service.ServiceBuilder<T>
    All Known Subinterfaces:
    CapabilityServiceBuilder<T>

    public interface RequirementServiceBuilder<T>
    extends org.jboss.msc.service.ServiceBuilder<T>
    A ServiceBuilder that supports capability requirements.
    Author:
    Paul Ferraro
    • Method Detail

      • setInitialMode

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

        RequirementServiceBuilder<T> setInstance​(org.jboss.msc.Service service)
        Specified by:
        setInstance in interface org.jboss.msc.service.ServiceBuilder<T>
      • addListener

        RequirementServiceBuilder<T> addListener​(org.jboss.msc.service.LifecycleListener listener)
        Specified by:
        addListener in interface org.jboss.msc.service.ServiceBuilder<T>
      • requiresCapability

        <V> Supplier<V> requiresCapability​(String capabilityName,
                                           Class<V> dependencyType,
                                           String... referenceNames)
        Establishes a requirement on the specified capability.
        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:
        a reference to the required dependency
      • requires

        default <V> Supplier<V> requires​(NullaryServiceDescriptor<V> descriptor)
        Establishes a requirement on the service provided by the capability with the specified descriptor.
        Type Parameters:
        V - the value type of the required service
        Parameters:
        descriptor - a service descriptor for a capability
        Returns:
        a supplier of the service value
      • requires

        default <V> Supplier<V> requires​(UnaryServiceDescriptor<V> descriptor,
                                         String referenceName)
        Establishes a requirement on the service provided by the capability with the specified descriptor.
        Type Parameters:
        V - the value type of the required service
        Parameters:
        descriptor - a service descriptor for a capability
        referenceName - the dynamic component of the capability name
        Returns:
        a supplier of the service value
      • requires

        default <V> Supplier<V> requires​(BinaryServiceDescriptor<V> descriptor,
                                         String parentName,
                                         String childName)
        Establishes a requirement on the service provided by the capability with the specified descriptor.
        Type Parameters:
        V - the value type of the required service
        Parameters:
        descriptor - a service descriptor for a capability
        parentName - the first dynamic component of the capability name
        childName - the second dynamic component of the capability name
        Returns:
        a supplier of the service value
      • requires

        default <V> Supplier<V> requires​(TernaryServiceDescriptor<V> descriptor,
                                         String grandparentName,
                                         String parentName,
                                         String childName)
        Establishes a requirement on the service provided by the capability with the specified descriptor.
        Type Parameters:
        V - the value type of the required service
        Parameters:
        descriptor - a service descriptor for a capability
        grandparentName - the first dynamic component of the capability name
        parentName - the second dynamic component of the capability name
        childName - the third dynamic component of the capability name
        Returns:
        a supplier of the service value
      • requires

        default <V> Supplier<V> requires​(QuaternaryServiceDescriptor<V> descriptor,
                                         String greatGrandparentName,
                                         String grandparentName,
                                         String parentName,
                                         String childName)
        Establishes a requirement on the service provided by the capability with the specified descriptor.
        Type Parameters:
        V - the value type of the required service
        Parameters:
        descriptor - a service descriptor for a capability
        greatGrandparentName - the first dynamic component of the capability name
        grandparentName - the second dynamic component of the capability name
        parentName - the third dynamic component of the capability name
        childName - the fourth dynamic component of the capability name
        Returns:
        a supplier of the service value