Package org.glassfish.weld.connector
Class WeldSniffer
- java.lang.Object
-
- org.glassfish.internal.deployment.GenericSniffer
-
- org.glassfish.weld.connector.WeldSniffer
-
- All Implemented Interfaces:
Sniffer
- Direct Known Subclasses:
WeldCompositeSniffer
@Service(name="weld") @Singleton public class WeldSniffer extends GenericSniffer
Implementation of the Sniffer for Weld.
-
-
Field Summary
-
Fields inherited from class org.glassfish.internal.deployment.GenericSniffer
habitat, modulesRegistry
-
-
Constructor Summary
Constructors Constructor Description WeldSniffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getAnnotationNames(DeploymentContext context)
Returns the list of annotation names that this sniffer is interested in.String[]
getContainersNames()
Returns the list of Containers that this Sniffer enables.boolean
handles(DeploymentContext context)
Returns true if the archive contains beans.xml as defined by packaging rules of Weldprotected boolean
isArchiveCDIEnabled(DeploymentContext context, ReadableArchive archive, String relativeBeansXmlPath)
protected boolean
isEntryPresent(ReadableArchive archive, String entry)
boolean
supportsArchiveType(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, getAnnotationTypes, getContainerModuleNames, getDeploymentConfigurationPaths, getDeploymentConfigurations, getIncompatibleSnifferTypes, getModuleType, getURLPatterns, handles, hashCode, isJavaEE, isUserVisible, setup, tearDown
-
-
-
-
Method Detail
-
handles
public boolean handles(DeploymentContext context)
Returns true if the archive contains beans.xml as defined by packaging rules of Weld- Specified by:
handles
in interfaceSniffer
- Overrides:
handles
in classGenericSniffer
- Parameters:
context
- deployment context- Returns:
- true if the location is recognized by this sniffer
-
isEntryPresent
protected boolean isEntryPresent(ReadableArchive archive, String entry)
-
isArchiveCDIEnabled
protected boolean isArchiveCDIEnabled(DeploymentContext context, ReadableArchive archive, String relativeBeansXmlPath)
-
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
-
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
-
getAnnotationNames
public String[] getAnnotationNames(DeploymentContext context)
Description copied from class:GenericSniffer
Returns the list of annotation names 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:
getAnnotationNames
in interfaceSniffer
- Overrides:
getAnnotationNames
in classGenericSniffer
- Parameters:
context
- deployment context- Returns:
- list of annotations this sniffer is interested in or an empty array
-
-