Package org.glassfish.web.sniffer
Class WebSniffer
- java.lang.Object
-
- org.glassfish.internal.deployment.GenericSniffer
-
- org.glassfish.web.sniffer.WebSniffer
-
- All Implemented Interfaces:
org.glassfish.api.container.Sniffer
@Service(name="web") @Singleton public class WebSniffer extends org.glassfish.internal.deployment.GenericSnifferImplementation of the Sniffer for the web container.- Author:
- Jerome Dochez
-
-
Constructor Summary
Constructors Constructor Description WebSniffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String[]getContainerModuleNames()String[]getContainersNames()protected List<String>getDeploymentConfigurationPaths()Returns the web-oriented descriptor paths that might exist in a web app.String[]getIncompatibleSnifferTypes()String[]getURLPatterns()booleanhandles(org.glassfish.api.deployment.archive.ReadableArchive location)Returns true if the passed file or directory is recognized by this instance.booleanhandles(org.glassfish.api.deployment.DeploymentContext context)Returns true if the passed file or directory is recognized by this sniffer.booleanisJavaEE()booleanisUserVisible()booleansupportsArchiveType(org.glassfish.api.deployment.archive.ArchiveType archiveType)This API is used to help determine if the sniffer should recognize the current archive.
-
-
-
Method Detail
-
getURLPatterns
public String[] getURLPatterns()
- Specified by:
getURLPatternsin interfaceorg.glassfish.api.container.Sniffer- Overrides:
getURLPatternsin classorg.glassfish.internal.deployment.GenericSniffer
-
handles
public boolean handles(org.glassfish.api.deployment.DeploymentContext context)
Returns true if the passed file or directory is recognized by this sniffer.- Specified by:
handlesin interfaceorg.glassfish.api.container.Sniffer- Overrides:
handlesin classorg.glassfish.internal.deployment.GenericSniffer- Parameters:
context- deployment context- Returns:
- true if the location is recognized by this sniffer
-
handles
public boolean handles(org.glassfish.api.deployment.archive.ReadableArchive location)
Returns true if the passed file or directory is recognized by this instance.- Specified by:
handlesin interfaceorg.glassfish.api.container.Sniffer- Overrides:
handlesin classorg.glassfish.internal.deployment.GenericSniffer- Parameters:
location- the file or directory to explore- Returns:
- true if this sniffer handles this application type
-
getContainersNames
public String[] getContainersNames()
-
isUserVisible
public boolean isUserVisible()
- Specified by:
isUserVisiblein interfaceorg.glassfish.api.container.Sniffer- Overrides:
isUserVisiblein classorg.glassfish.internal.deployment.GenericSniffer- Returns:
- whether this sniffer should be visible to user
-
isJavaEE
public boolean isJavaEE()
- Specified by:
isJavaEEin interfaceorg.glassfish.api.container.Sniffer- Overrides:
isJavaEEin classorg.glassfish.internal.deployment.GenericSniffer- Returns:
- whether this sniffer represents a Java EE container type
-
getDeploymentConfigurationPaths
protected List<String> getDeploymentConfigurationPaths()
Returns the web-oriented descriptor paths that might exist in a web app.- Overrides:
getDeploymentConfigurationPathsin classorg.glassfish.internal.deployment.GenericSniffer- Returns:
- list of the deployment descriptor paths
-
getIncompatibleSnifferTypes
public String[] getIncompatibleSnifferTypes()
- Specified by:
getIncompatibleSnifferTypesin interfaceorg.glassfish.api.container.Sniffer- Overrides:
getIncompatibleSnifferTypesin classorg.glassfish.internal.deployment.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
-
supportsArchiveType
public boolean supportsArchiveType(org.glassfish.api.deployment.archive.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
-
getContainerModuleNames
protected String[] getContainerModuleNames()
- Overrides:
getContainerModuleNamesin classorg.glassfish.internal.deployment.GenericSniffer
-
-