Class OSGiSniffer
- java.lang.Object
-
- org.glassfish.internal.deployment.GenericSniffer
-
- org.glassfish.extras.osgicontainer.OSGiSniffer
-
- All Implemented Interfaces:
Sniffer
@Service(name="osgi") public class OSGiSniffer extends GenericSniffer
Sniffer for OSGi bundles- Author:
- Jerome Dochez, Sanjeeb Sahoo
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTAINER_NAME
-
Fields inherited from class org.glassfish.internal.deployment.GenericSniffer
habitat, modulesRegistry
-
-
Constructor Summary
Constructors Constructor Description OSGiSniffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getContainersNames()
Returns the list of Containers that this Sniffer enables.boolean
handles(ReadableArchive location)
Returns true if the passed file or directory is recognized by this instance.boolean
handles(DeploymentContext context)
Returns true if the passed file or directory is recognized by this composite sniffer.boolean
isUserVisible()
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, getAnnotationNames, getAnnotationTypes, getContainerModuleNames, getDeploymentConfigurationPaths, getDeploymentConfigurations, getIncompatibleSnifferTypes, getModuleType, getURLPatterns, hashCode, isJavaEE, setup, tearDown
-
-
-
-
Field Detail
-
CONTAINER_NAME
public static final String CONTAINER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
handles
public boolean handles(ReadableArchive location)
Description copied from class:GenericSniffer
Returns true if the passed file or directory is recognized by this instance.- Specified by:
handles
in interfaceSniffer
- Overrides:
handles
in classGenericSniffer
- 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
-
isUserVisible
public boolean isUserVisible()
- Specified by:
isUserVisible
in interfaceSniffer
- Overrides:
isUserVisible
in classGenericSniffer
- Returns:
- whether this sniffer should be visible to user
-
handles
public boolean handles(DeploymentContext context)
Description copied from class:GenericSniffer
Returns true if the passed file or directory is recognized by this composite sniffer.- Specified by:
handles
in interfaceSniffer
- Overrides:
handles
in classGenericSniffer
- Parameters:
context
- deployment context- Returns:
- true if the location is recognized by 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
-
-