|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.internal.deployment.GenericSniffer
public abstract class GenericSniffer
Generic implementation of the Sniffer service that can be programmatically instantiated
| Field Summary | |
|---|---|
protected com.sun.enterprise.module.ModulesRegistry |
modulesRegistry
|
| Constructor Summary | |
|---|---|
GenericSniffer(String containerName,
String appStigma,
String urlPattern)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
|
Class<? extends Annotation>[] |
getAnnotationTypes()
Returns the list of annotations types that this sniffer is interested in. |
protected List<String> |
getDeploymentConfigurationPaths()
Returns a list of paths within an archive that represents deployment configuration files. |
Map<String,String> |
getDeploymentConfigurations(ReadableArchive location)
Returns a map of deployment configurations composed by reading from a list of paths in the readable archive. |
String[] |
getIncompatibleSnifferTypes()
|
String |
getModuleType()
Returns the container name associated with this sniffer |
String[] |
getURLPatterns()
Returns the pattern to apply against the request URL If the pattern matches the URL, the service method of the associated container will be invoked |
boolean |
handles(ReadableArchive location,
ClassLoader loader)
Returns true if the passed file or directory is recognized by this instance. |
int |
hashCode()
|
boolean |
isUserVisible()
|
com.sun.enterprise.module.Module[] |
setup(String containerHome,
Logger logger)
Sets up the container libraries so that any imported bundle from the connector jar file will now be known to the module subsystem This method returns a ModuleDefinition for the module containing
the core implementation of the container. |
void |
tearDown()
Tears down a container, remove all imported libraries from the module subsystem. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.glassfish.api.container.Sniffer |
|---|
getContainersNames |
| Field Detail |
|---|
protected com.sun.enterprise.module.ModulesRegistry modulesRegistry
| Constructor Detail |
|---|
public GenericSniffer(String containerName,
String appStigma,
String urlPattern)
| Method Detail |
|---|
public boolean handles(ReadableArchive location,
ClassLoader loader)
handles in interface Snifferlocation - the file or directory to exploreloader - class loader for this application
public String[] getURLPatterns()
getURLPatterns in interface Snifferpublic String getModuleType()
getModuleType in interface Sniffer
public com.sun.enterprise.module.Module[] setup(String containerHome,
Logger logger)
throws IOException
ModuleDefinition for the module containing
the core implementation of the container. That means that this module
will be locked as long as there is at least one module loaded in the
associated container.
setup in interface SniffercontainerHome - is where the container implementation resideslogger - the logger to use
IOException - exception if something goes sourpublic void tearDown()
tearDown in interface Snifferpublic Class<? extends Annotation>[] getAnnotationTypes()
getAnnotationTypes in interface Snifferpublic boolean isUserVisible()
isUserVisible in interface Snifferpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
public Map<String,String> getDeploymentConfigurations(ReadableArchive location)
throws IOException
getDeploymentConfigurationPaths() method returns this list of paths
which might exist in archives that this sniffer handles.
In each returned map entry the key is a path and the value is the contents of the archive entry at that path. This method creates a map entry only if the path exists in the readable archive.
Sniffers for applications that do not store their configurations as deployment descriptors at predictable paths within an archive are free to override this implementation to return whatever information is appropriate to that application type. A key usage of the returned Map is in the application type's GUI plug-in (if desired) to allow users to customize the deployment configuration after the application has been deployed. The concrete Sniffer implementation and the GUI plug-in must agree on the conventions for storing deployment configuration inforation in the Map.
getDeploymentConfigurations in interface Snifferlocation - the readable archive for the application of interest
IOException - in case of errors retrieving an entry or
reading the archive contents at an entryprotected List<String> getDeploymentConfigurationPaths()
Sniffers that recognize Java EE applications typically override this default implementation to return a list of the deployment descriptors that might appear in the type of Java EE application which the sniffer recognizes. For example, the WebSniffer implementation of this method returns WEB-INF/web.xml, WEB-INF/glassfish-web.xml and WEB-INF/sun-web.xml.
public String[] getIncompatibleSnifferTypes()
getIncompatibleSnifferTypes in interface Sniffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||