Class ServiceTracker<S>

  • Type Parameters:
    S - the type of the service to track
    All Implemented Interfaces:
    org.jboss.msc.service.ServiceListener<java.lang.Object>

    public class ServiceTracker<S>
    extends org.jboss.msc.service.AbstractServiceListener<java.lang.Object>

    Service Listener that adds / removes services to / from a collection as they are added / removed to the service controller.

    Author:
    Daniel Meyer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Collection<S> serviceCollection  
      protected org.jboss.msc.service.ServiceName typeToTrack  
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceTracker​(org.jboss.msc.service.ServiceName typeToTrack, java.util.Collection<S> serviceCollection)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void transition​(org.jboss.msc.service.ServiceController controller, org.jboss.msc.service.ServiceController.Transition transition)  
      • Methods inherited from class org.jboss.msc.service.AbstractServiceListener

        dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, listenerAdded, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • serviceCollection

        protected java.util.Collection<S> serviceCollection
      • typeToTrack

        protected org.jboss.msc.service.ServiceName typeToTrack
    • Constructor Detail

      • ServiceTracker

        public ServiceTracker​(org.jboss.msc.service.ServiceName typeToTrack,
                              java.util.Collection<S> serviceCollection)
    • Method Detail

      • transition

        public void transition​(org.jboss.msc.service.ServiceController controller,
                               org.jboss.msc.service.ServiceController.Transition transition)
        Specified by:
        transition in interface org.jboss.msc.service.ServiceListener<S>
        Overrides:
        transition in class org.jboss.msc.service.AbstractServiceListener<java.lang.Object>