Class EjbSniffer
- java.lang.Object
-
- org.glassfish.internal.deployment.GenericSniffer
-
- org.glassfish.ejb.deployment.archive.EjbSniffer
-
- All Implemented Interfaces:
Sniffer
@Service(name="Ejb") @Singleton public class EjbSniffer extends GenericSniffer
Implementation of the Sniffer for the Ejb container.- Author:
- Mahesh Kannan
-
-
Field Summary
-
Fields inherited from class org.glassfish.internal.deployment.GenericSniffer
habitat, modulesRegistry
-
-
Constructor Summary
Constructors Constructor Description EjbSniffer()EjbSniffer(String containerName, String appStigma, String urlPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Annotation>[]getAnnotationTypes()Returns the list of annotations types that this sniffer is interested in.String[]getContainersNames()Returns the list of Containers that this Sniffer enables.protected List<String>getDeploymentConfigurationPaths()Returns the descriptor paths that might exist at an ejb app.String[]getIncompatibleSnifferTypes()booleanhandles(ReadableArchive location)Returns true if the passed file or directory is recognized by this instance.booleanisJavaEE()booleanisUserVisible()booleansupportsArchiveType(ArchiveType archiveType)This API is used to help determine if the sniffer should recognize the current archive.-
Methods inherited from class org.glassfish.internal.deployment.GenericSniffer
equals, getAnnotationNames, getContainerModuleNames, getDeploymentConfigurations, getModuleType, getURLPatterns, handles, hashCode, setup, tearDown
-
-
-
-
Method Detail
-
getContainersNames
public String[] getContainersNames()
Description copied from interface:SnifferReturns 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
-
handles
public boolean handles(ReadableArchive location)
Returns true if the passed file or directory is recognized by this instance.- Specified by:
handlesin interfaceSniffer- Overrides:
handlesin classGenericSniffer- Parameters:
location- the file or directory to explore- Returns:
- true if this sniffer handles this application type
-
getAnnotationTypes
public Class<? extends Annotation>[] getAnnotationTypes()
Description copied from class:GenericSnifferReturns 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:
getAnnotationTypesin interfaceSniffer- Overrides:
getAnnotationTypesin classGenericSniffer- Returns:
- list of annotations this sniffer is interested in.
-
isUserVisible
public boolean isUserVisible()
- Specified by:
isUserVisiblein interfaceSniffer- Overrides:
isUserVisiblein classGenericSniffer- Returns:
- whether this sniffer should be visible to user
-
isJavaEE
public boolean isJavaEE()
- Specified by:
isJavaEEin interfaceSniffer- Overrides:
isJavaEEin classGenericSniffer- Returns:
- whether this sniffer represents a Java EE container type
-
getIncompatibleSnifferTypes
public String[] getIncompatibleSnifferTypes()
- Specified by:
getIncompatibleSnifferTypesin interfaceSniffer- Overrides:
getIncompatibleSnifferTypesin classGenericSniffer- Returns:
- the set of the sniffers that should not co-exist for the same module. For example, ejb and connector 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(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
-
getDeploymentConfigurationPaths
protected List<String> getDeploymentConfigurationPaths()
Returns the descriptor paths that might exist at an ejb app.- Overrides:
getDeploymentConfigurationPathsin classGenericSniffer- Returns:
- list of the deployment descriptor paths
-
-