Package org.glassfish.internal.data
Class ApplicationInfo
java.lang.Object
org.glassfish.internal.data.ModuleInfo
org.glassfish.internal.data.ApplicationInfo
Information about a running application. Applications are composed of modules. Modules run in an individual
container.
- Author:
- Jerome Dochez
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe prefix that will be given to the service locator, followed by the name of the applicationFields inherited from class org.glassfish.internal.data.ModuleInfo
engines, events, metaData, name, reversedEngines -
Constructor Summary
ConstructorsConstructorDescriptionApplicationInfo(org.glassfish.api.event.Events events, org.glassfish.api.deployment.archive.ReadableArchive source, String name) Creates a new instance of an ApplicationInfo -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddModule(ModuleInfo info) voidaddTransientAppMetaData(String metaDataKey, Object metaDataValue) voidclean(ExtendedDeploymentContext context) voiddetectIfJakartaEEApp(List<EngineInfo<?, ?>> engineInfos) Sets whether this application is a Jakarta EE applicationReturns the application classloader for this application.org.glassfish.hk2.api.ServiceLocatorReturns the application scoped ServiceLocator<T extends org.glassfish.api.container.Container>
Collection<EngineRef> getEngineRefsForContainer(Class<T> type) Returns the EngineRef for a particular container typeReturns the deployment time libraries for this applicationReturns the modules of this applicationgetName()Returns the registration name for this applicationCollection<org.glassfish.api.container.Sniffer> Returns the list of sniffers that participated in loaded this applicationorg.glassfish.api.deployment.archive.ReadableArchiveReturns the directory where the application bits are locatedprotected ExtendedDeploymentContextgetSubContext(ModuleInfo info, ExtendedDeploymentContext context) <T> TgetTransientAppMetaData(String key, Class<T> metadataType) booleanReturns whether this application is a JavaEE applicationbooleanisLoaded()voidload(ExtendedDeploymentContext context, ProgressTracker tracker) booleanvoidsave(com.sun.enterprise.config.serverbeans.Application app) Saves its state to the configuration.voidsetAppClassLoader(ClassLoader cLoader) Sets the application classloader for this applicationvoidsetLibraries(String libraries) Sets the deployment time libraries for this applicationvoidstart(ExtendedDeploymentContext context, ProgressTracker tracker) voidstop(ExtendedDeploymentContext context, Logger logger) booleanvoidunload(ExtendedDeploymentContext context) Methods inherited from class org.glassfish.internal.data.ModuleInfo
_getEngineRefs, addMetaData, cleanClassLoaders, getClassLoaders, getEngineRefForContainer, getEngineRefs, getMetaData, getMetaData, getModuleClassLoader, getModuleProps, save, start
-
Field Details
-
APP_SERVICE_LOCATOR_PREFIX
The prefix that will be given to the service locator, followed by the name of the application- See Also:
-
-
Constructor Details
-
ApplicationInfo
public ApplicationInfo(org.glassfish.api.event.Events events, org.glassfish.api.deployment.archive.ReadableArchive source, String name) Creates a new instance of an ApplicationInfo- Parameters:
events-source- the archive for this applicationname- name of the application
-
-
Method Details
-
add
-
addTransientAppMetaData
-
getTransientAppMetaData
-
getName
Returns the registration name for this application- Overrides:
getNamein classModuleInfo- Returns:
- the application registration name
-
getLibraries
Returns the deployment time libraries for this application- Returns:
- the libraries
-
setLibraries
Sets the deployment time libraries for this application- Parameters:
libraries- the libraries
-
getAppClassLoader
Returns the application classloader for this application.- Returns:
- The application classloader for this application.
-
setAppClassLoader
Sets the application classloader for this application- Parameters:
cLoader- application classloader
-
getAppServiceLocator
public org.glassfish.hk2.api.ServiceLocator getAppServiceLocator()Returns the application scoped ServiceLocator- Returns:
- The application scoped ServiceLocator
-
isJakartaEEApp
public boolean isJakartaEEApp()Returns whether this application is a JavaEE application- Returns:
- the isJavaEEApp flag
-
detectIfJakartaEEApp
Sets whether this application is a Jakarta EE application- Parameters:
engineInfos- the engine info list
-
getSource
public org.glassfish.api.deployment.archive.ReadableArchive getSource()Returns the directory where the application bits are located- Returns:
- the application bits directory
-
getModuleInfos
Returns the modules of this application- Returns:
- the modules of this application
-
getSniffers
Returns the list of sniffers that participated in loaded this application- Overrides:
getSniffersin classModuleInfo- Returns:
- array of sniffer that loaded the application's module
-
getEngineRefsForContainer
public <T extends org.glassfish.api.container.Container> Collection<EngineRef> getEngineRefsForContainer(Class<T> type) Returns the EngineRef for a particular container type- Parameters:
type- the container type- Returns:
- the module info is this application as a module implemented with the passed container type
-
getSubContext
protected ExtendedDeploymentContext getSubContext(ModuleInfo info, ExtendedDeploymentContext context) -
load
- Overrides:
loadin classModuleInfo- Throws:
Exception
-
start
- Throws:
Exception
-
stop
- Overrides:
stopin classModuleInfo
-
unload
- Overrides:
unloadin classModuleInfo
-
suspend
- Overrides:
suspendin classModuleInfo
-
resume
- Overrides:
resumein classModuleInfo
-
clean
- Overrides:
cleanin classModuleInfo- Throws:
Exception
-
save
public void save(com.sun.enterprise.config.serverbeans.Application app) throws org.jvnet.hk2.config.TransactionFailure, PropertyVetoException Saves its state to the configuration. this method must be called within a transaction to the configured Application instance.- Parameters:
app- the application being persisted- Throws:
org.jvnet.hk2.config.TransactionFailurePropertyVetoException
-
addModule
-
isLoaded
public boolean isLoaded()
-