Class SecuritySniffer

  • All Implemented Interfaces:
    Sniffer

    @Service(name="Security")
    public class SecuritySniffer
    extends GenericSniffer
    SecuritySniffer for security related activities
    • Constructor Detail

      • SecuritySniffer

        public SecuritySniffer()
    • Method Detail

      • handles

        public boolean handles​(ReadableArchive location)
        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
      • setup

        public com.sun.enterprise.module.HK2Module[] setup​(String containerHome,
                                                           Logger logger)
                                                    throws IOException
        Sets up the container libraries so that any imported bundle from the connector jar file will now be known to the module subsystem

        This method returns a ModuleDefinition for the module containing the core implementation of the container. That means that this module will be locked as long as there is at least one module loaded in the associated container.

        Specified by:
        setup in interface Sniffer
        Overrides:
        setup in class GenericSniffer
        Parameters:
        containerHome - is where the container implementation resides
        logger - the logger to use
        Returns:
        the module definition of the core container implementation.
        Throws:
        IOException - exception if something goes sour
      • tearDown

        public void tearDown()
        Tears down a container, remove all imported libraries from the module subsystem.
        Specified by:
        tearDown in interface Sniffer
        Overrides:
        tearDown in class GenericSniffer
      • 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
      • getAnnotationTypes

        public Class<? extends Annotation>[] getAnnotationTypes()
        Description copied from class: GenericSniffer
        Returns the list of annotations types that this sniffer is interested in. If an application bundle contains at least one class annotated with one of the returned annotations, the deployment process will not call the handles method but will invoke the containers deployers as if the handles method had been called and returned true.
        Specified by:
        getAnnotationTypes in interface Sniffer
        Overrides:
        getAnnotationTypes in class GenericSniffer
        Returns:
        list of annotations this sniffer is interested in.
      • 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