Class SnifferManagerImpl

  • All Implemented Interfaces:
    SnifferManager

    @Service
    public class SnifferManagerImpl
    extends Object
    implements SnifferManager
    Provide convenience methods to deal with Sniffers in the system.
    Author:
    Kohsuke Kawaguchi
    • Field Detail

      • habitat

        @Inject
        protected org.glassfish.hk2.api.ServiceLocator habitat
    • Constructor Detail

      • SnifferManagerImpl

        public SnifferManagerImpl()
    • Method Detail

      • getSniffers

        public Collection<Sniffer> getSniffers()
        Returns all the presently registered sniffers
        Specified by:
        getSniffers in interface SnifferManager
        Returns:
        Collection (possibly empty but never null) of Sniffer
      • hasNoSniffers

        public final boolean hasNoSniffers()
        Check if there's any Sniffer installed at all.
        Specified by:
        hasNoSniffers in interface SnifferManager
        Returns:
        true if not sniffer is registered
      • getSniffer

        public Sniffer getSniffer​(String appType)
        Description copied from interface: SnifferManager
        Return a sniffer instance based on its registered name
        Specified by:
        getSniffer in interface SnifferManager
        Parameters:
        appType - the sniffer service registration name
        Returns:
        the sniffer instance of null if not found.
      • getSniffers

        public Collection<Sniffer> getSniffers​(DeploymentContext context)
        Returns a collection of sniffers that recognized some parts of the passed archive as components their container handle. If no sniffer recognize the passed archive, an empty collection is returned.
        Specified by:
        getSniffers in interface SnifferManager
        Parameters:
        context - the deployment context
        Returns:
        possibly empty collection of sniffers that handle the passed archive.