Class WebServicesSniffer

  • All Implemented Interfaces:
    Sniffer

    @Service(name="webservices")
    @Singleton
    public class WebServicesSniffer
    extends GenericSniffer
    This is the Sniffer for Webservices
    Author:
    Bhakti Mehta
    • Constructor Detail

      • WebServicesSniffer

        public WebServicesSniffer()
    • Method Detail

      • handles

        public boolean handles​(ReadableArchive location)
        .ear (the resource can be present in lib dir of the ear) Returns true if the archive contains webservices.xml either in WEB-INF or META-INF directories
        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
      • 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.
      • getURLPatterns

        public String[] getURLPatterns()
        Description copied from class: GenericSniffer
        Returns the pattern to apply against the request URL If the pattern matches the URL, the service method of the associated container will be invoked
        Specified by:
        getURLPatterns in interface Sniffer
        Overrides:
        getURLPatterns in class GenericSniffer
        Returns:
        pattern instance
      • 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