org.glassfish.web.sniffer
Class WebSniffer

java.lang.Object
  extended by org.glassfish.internal.deployment.GenericSniffer
      extended by org.glassfish.web.sniffer.WebSniffer
All Implemented Interfaces:
Sniffer

@Service(name="web")
@Scoped(value=org.jvnet.hk2.component.Singleton.class)
public class WebSniffer
extends GenericSniffer

Implementation of the Sniffer for the web container.

Author:
Jerome Dochez

Field Summary
 
Fields inherited from class org.glassfish.internal.deployment.GenericSniffer
modulesRegistry
 
Constructor Summary
WebSniffer()
           
 
Method Summary
 String[] getContainersNames()
           
protected  List<String> getDeploymentConfigurationPaths()
          Returns the web-oriented descriptor paths that might exist in a web app.
 String[] getIncompatibleSnifferTypes()
           
 String[] getURLPatterns()
           
 boolean handles(ReadableArchive location, ClassLoader loader)
          Returns true if the passed file or directory is recognized by this instance.
 boolean isUserVisible()
           
 
Methods inherited from class org.glassfish.internal.deployment.GenericSniffer
equals, getAnnotationTypes, getDeploymentConfigurations, getModuleType, hashCode, setup, tearDown
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSniffer

public WebSniffer()
Method Detail

getURLPatterns

public String[] getURLPatterns()
Specified by:
getURLPatterns in interface Sniffer
Overrides:
getURLPatterns in class GenericSniffer

handles

public boolean handles(ReadableArchive location,
                       ClassLoader loader)
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
loader - class loader for this application
Returns:
true if this sniffer handles this application type

getContainersNames

public String[] getContainersNames()

isUserVisible

public boolean isUserVisible()
Specified by:
isUserVisible in interface Sniffer
Overrides:
isUserVisible in class GenericSniffer
Returns:
whether this sniffer should be visible to user

getDeploymentConfigurationPaths

protected List<String> getDeploymentConfigurationPaths()
Returns the web-oriented descriptor paths that might exist in a web app.

Overrides:
getDeploymentConfigurationPaths in class GenericSniffer
Returns:
list of the deployment descriptor paths

getIncompatibleSnifferTypes

public String[] getIncompatibleSnifferTypes()
Specified by:
getIncompatibleSnifferTypes in interface Sniffer
Overrides:
getIncompatibleSnifferTypes in class GenericSniffer
Returns:
the set of the sniffers that should not co-exist for the same module. For example, ejb and appclient sniffers should not be returned in the sniffer list for a certain module. This method will be used to validate and filter the retrieved sniffer lists for a certain module


Copyright © 2012 GlassFish Community. All Rights Reserved.