Class OSGiSniffer

  • All Implemented Interfaces:
    Sniffer

    @Service(name="osgi")
    public class OSGiSniffer
    extends GenericSniffer
    Sniffer for OSGi bundles
    Author:
    Jerome Dochez, Sanjeeb Sahoo
    • Constructor Detail

      • OSGiSniffer

        public OSGiSniffer()
    • Method Detail

      • handles

        public boolean handles​(ReadableArchive location)
        Description copied from class: GenericSniffer
        Returns true if the passed file or directory is recognized by this instance.
        Specified by:
        handles in interface Sniffer
        Overrides:
        handles in class GenericSniffer
        Parameters:
        location - the file or directory to explore
        Returns:
        true if this sniffer handles this application type
      • getContainersNames

        public String[] getContainersNames()
        Description copied from interface: Sniffer
        Returns the list of Containers that this Sniffer enables. The runtime will look up each container implementing using the names provided in the habitat.
        Returns:
        list of container names known to the habitat for this sniffer
      • handles

        public boolean handles​(DeploymentContext context)
        Description copied from class: GenericSniffer
        Returns true if the passed file or directory is recognized by this composite sniffer.
        Specified by:
        handles in interface Sniffer
        Overrides:
        handles in class GenericSniffer
        Parameters:
        context - deployment context
        Returns:
        true if the location is recognized by this sniffer
      • supportsArchiveType

        public boolean supportsArchiveType​(ArchiveType archiveType)
        This API is used to help determine if the sniffer should recognize the current archive. If the sniffer does not support the archive type associated with the current deployment, the sniffer should not recognize the archive.
        Parameters:
        archiveType - the archive type to check
        Returns:
        whether the sniffer supports the archive type