Interface ServiceTarget

    • Method Detail

      • addListener

        ServiceTarget addListener​(LifecycleListener listener)
        Add a service lifecycle listener that will be added to this service.
        Parameters:
        listener - the lifecycle listener to add to the service
        Returns:
        this target
      • removeListener

        ServiceTarget removeListener​(LifecycleListener listener)
        Remove a lifecycle listener from this target, if it exists.
        Parameters:
        listener - the lifecycle listener to remove
        Returns:
        this target
      • addService

        ServiceBuilder<?> addService​(ServiceName name)
        Get a builder which can be used to add a service to this target.
        Parameters:
        name - the service name
        Returns:
        new service configurator
      • subTarget

        ServiceTarget subTarget()
        Create a sub-target using this as the parent target.
        Returns:
        the new service target
      • addServiceValue

        @Deprecated
        <T> ServiceBuilder<T> addServiceValue​(ServiceName name,
                                              Value<? extends Service<T>> value)
        Deprecated.
        Use addService(ServiceName) instead. This method will be removed in a future release.
        Get a builder which can be used to add a service to this target.
        Parameters:
        name - the service name
        value - the service value
        Returns:
        the builder for the service
      • addService

        @Deprecated
        <T> ServiceBuilder<T> addService​(ServiceName name,
                                         Service<T> service)
        Deprecated.
        Use addService(ServiceName) instead. This method will be removed in a future release.
        Get a builder which can be used to add a service to this target.
        Parameters:
        name - the service name
        service - the service
        Returns:
        the builder for the service
      • addMonitor

        @Deprecated
        ServiceTarget addMonitor​(StabilityMonitor monitor)
        Deprecated.
        Stability monitors are unreliable - do not use them. This method will be removed in a future release.
        Add a stability monitor that will be added to all the ServiceBuilders installed in this target.
        Parameters:
        monitor - the monitor to add to the target
        Returns:
        this target
      • addMonitors

        @Deprecated
        ServiceTarget addMonitors​(StabilityMonitor... monitors)
        Deprecated.
        Stability monitors are unreliable - do not use them. This method will be removed in a future release.
        Add a stability monitors that will be added to all the ServiceBuilders installed in this target.
        Parameters:
        monitors - the monitors to add to the target
        Returns:
        this target
      • removeMonitor

        @Deprecated
        ServiceTarget removeMonitor​(StabilityMonitor monitor)
        Deprecated.
        Stability monitors are unreliable - do not use them. This method will be removed in a future release.
        Remove a monitor from this target, if it exists.
        Parameters:
        monitor - the monitor to remove
        Returns:
        this target
      • addListener

        @Deprecated
        ServiceTarget addListener​(ServiceListener<Object>... listeners)
        Deprecated.
        Use addListener(LifecycleListener) instead. This method will be removed in a future release.
        Add a list of service listener that will be added to all ServiceBuilders installed in this target.
        Parameters:
        listeners - a list of listeners to add to the target
        Returns:
        this target
      • getMonitors

        @Deprecated
        Set<StabilityMonitor> getMonitors()
        Deprecated.
        Stability monitors are unreliable - do not use them. This method will be removed in a future release.
        Returns a set of the monitors added to this target.
        Returns:
        the monitors added to this target
      • getListeners

        @Deprecated
        Set<ServiceListener<Object>> getListeners()
        Deprecated.
        This method will be removed in a future release.
        Returns a set of the listeners added to this target.
        Returns:
        the listeners added to this target
      • addDependency

        @Deprecated
        ServiceTarget addDependency​(ServiceName dependency)
        Deprecated.
        This method will be removed in a future release.
        Add a dependency that will be added to the all ServiceBuilders installed in this target.
        Parameters:
        dependency - the dependency to add to the target
        Returns:
        this target
      • addDependency

        @Deprecated
        ServiceTarget addDependency​(ServiceName... dependencies)
        Deprecated.
        This method will be removed in a future release.
        Add a list of dependencies that will be added to the all ServiceBuilders installed in this target.
        Parameters:
        dependencies - a list of dependencies to add to the target
        Returns:
        this target
      • addDependency

        @Deprecated
        ServiceTarget addDependency​(Collection<ServiceName> dependencies)
        Deprecated.
        This method will be removed in a future release.
        Add a collection of dependencies that will be added to the all ServiceBuilders installed in this target
        Parameters:
        dependencies - a collection of dependencies to add to this target
        Returns:
        this target
      • removeDependency

        @Deprecated
        ServiceTarget removeDependency​(ServiceName dependency)
        Deprecated.
        This method will be removed in a future release.
        Remove a dependency from this target. Subsequently defined services will not have this dependency.
        Parameters:
        dependency - the dependency
        Returns:
        this target
      • getDependencies

        @Deprecated
        Set<ServiceName> getDependencies()
        Deprecated.
        This method will be removed in a future release.
        Returns a set of all dependencies added to this target.
        Returns:
        all dependencies of this target
      • batchTarget

        @Deprecated
        BatchServiceTarget batchTarget()
        Deprecated.
        This method will be removed in a future release.
        Create a new batch service target, which is used to install described services in this target.
        Returns:
        the new batch service target