Interface CapabilityServiceInstaller

    • Method Detail

      • builder

        static <V> CapabilityServiceInstaller.Builder<V,​V> builder​(RuntimeCapability<Void> capability,
                                                                         V value)
        Returns a CapabilityServiceInstaller builder for the specified capability whose installed service provides the specified value.
        Type Parameters:
        V - the service value type
        Parameters:
        capability - the target capability
        value - the service value
        Returns:
        a service installer builder
      • builder

        static <V> CapabilityServiceInstaller.Builder<V,​V> builder​(RuntimeCapability<Void> capability,
                                                                         Supplier<V> factory)
        Returns a CapabilityServiceInstaller builder for the specified capability whose installed service provides the value supplied by the specified factory.
        Type Parameters:
        V - the service value type
        Parameters:
        capability - the target capability
        factory - provides the service value
        Returns:
        a service installer builder
      • builder

        static <T,​V> CapabilityServiceInstaller.Builder<T,​V> builder​(RuntimeCapability<Void> capability,
                                                                                 Function<T,​V> mapper,
                                                                                 Supplier<T> factory)
        Returns a CapabilityServiceInstaller builder for the specified capability whose installed service provides the value supplied by the specified factory and mapping function.
        Type Parameters:
        T - the source value type
        V - the service value type
        Parameters:
        capability - the target capability
        mapper - a function that returns the service value given the value supplied by the factory
        factory - provides the input to the specified mapper
        Returns:
        a service installer builder