Class DelegatingServiceTarget

java.lang.Object
org.jboss.msc.service.DelegatingServiceTarget
All Implemented Interfaces:
ServiceTarget

public class DelegatingServiceTarget extends Object implements ServiceTarget
A service target which delegates to another service target.
Author:
David M. Lloyd, Richard Opalka
  • Constructor Details

    • DelegatingServiceTarget

      public DelegatingServiceTarget(ServiceTarget delegate)
      Construct a new instance.
      Parameters:
      delegate - the delegate service target
  • Method Details

    • getDelegate

      protected ServiceTarget getDelegate()
      Get the ServiceTarget delegate.
      Returns:
      ServiceTarget delegate
    • addListener

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

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

      public ServiceBuilder<?> addService()
      Get a builder which can be used to add a service to this target.
      Specified by:
      addService in interface ServiceTarget
      Returns:
      new service configurator
    • subTarget

      public ServiceTarget subTarget()
      Create a sub-target using this as the parent target.
      Specified by:
      subTarget in interface ServiceTarget
      Returns:
      the new service target
    • addService

      @Deprecated public ServiceBuilder<?> addService(ServiceName name)
      Deprecated.
      Get a builder which can be used to add a service to this target.
      Specified by:
      addService in interface ServiceTarget
      Parameters:
      name - the service name
      Returns:
      new service configurator
    • addService

      @Deprecated public <T> ServiceBuilder<T> addService(ServiceName name, Service<T> service)
      Deprecated.
      Get a builder which can be used to add a service to this target.
      Specified by:
      addService in interface ServiceTarget
      Parameters:
      name - the service name
      service - the service
      Returns:
      the builder for the service
    • addDependency

      @Deprecated public ServiceTarget addDependency(ServiceName dependency)
      Deprecated.
      Add a dependency that will be added to the all ServiceBuilders installed in this target.
      Specified by:
      addDependency in interface ServiceTarget
      Parameters:
      dependency - the dependency to add to the target
      Returns:
      this target
    • addMonitor

      @Deprecated public ServiceTarget addMonitor(StabilityMonitor monitor)
      Deprecated.
      Add a stability monitor that will be added to all the ServiceBuilders installed in this target.
      Specified by:
      addMonitor in interface ServiceTarget
      Parameters:
      monitor - the monitor to add to the target
      Returns:
      this target
    • removeMonitor

      @Deprecated public ServiceTarget removeMonitor(StabilityMonitor monitor)
      Deprecated.
      Remove a monitor from this target, if it exists.
      Specified by:
      removeMonitor in interface ServiceTarget
      Parameters:
      monitor - the monitor to remove
      Returns:
      this target