Class ResourcesCompositeSniffer

  • All Implemented Interfaces:
    Sniffer
    Direct Known Subclasses:
    PayaraResourcesCompositeSniffer

    @Service(name="resources_ear")
    public class ResourcesCompositeSniffer
    extends GenericSniffer
    Sniffer to detect glassfish-resources.xml(s) in composite archives
    Author:
    Jagadish Ramu
    • Constructor Detail

      • ResourcesCompositeSniffer

        public ResourcesCompositeSniffer()
      • ResourcesCompositeSniffer

        protected ResourcesCompositeSniffer​(String containerName,
                                            String appStigma)
    • Method Detail

      • handles

        public boolean handles​(ReadableArchive archive)
        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:
        archive - the file or directory to explore
        Returns:
        true if this sniffer handles this application type
      • getContainersNames

        public String[] getContainersNames()
        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
      • 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