org.glassfish.internal.data
Class ApplicationInfo

java.lang.Object
  extended by org.glassfish.internal.data.ModuleInfo
      extended by org.glassfish.internal.data.ApplicationInfo

public class ApplicationInfo
extends ModuleInfo

Information about a running application. Applications are composed of modules. Modules run in an individual container.

Author:
Jerome Dochez

Field Summary
 
Fields inherited from class org.glassfish.internal.data.ModuleInfo
engines, events, metaData, name
 
Constructor Summary
ApplicationInfo(Events events, ReadableArchive source, String name)
          Creates a new instance of an ApplicationInfo
 
Method Summary
 void add(EngineRef ref)
           
 void addModule(ModuleInfo info)
           
 void addTransientAppMetaData(String metaDataKey, Object metaDataValue)
           
 void clean(ExtendedDeploymentContext context)
           
<T extends Container>
Collection<EngineRef>
getEngineRefsForContainer(Class<T> type)
           
 String getLibraries()
          Returns the deployment time libraries for this application
 Collection<ModuleInfo> getModuleInfos()
          Returns the modules of this application
 String getName()
          Returns the registration name for this application
 Collection<Sniffer> getSniffers()
          Returns the list of sniffers that participated in loaded this application
 ReadableArchive getSource()
          Returns the directory where the application bits are located
protected  ExtendedDeploymentContext getSubContext(ModuleInfo info, ExtendedDeploymentContext context)
           
<T> T
getTransientAppMetaData(String key, Class<T> metadataType)
           
 boolean isJavaEEApp()
          Returns whether this application is a JavaEE application
 boolean isLoaded()
           
 void load(ExtendedDeploymentContext context, ProgressTracker tracker)
           
 boolean resume(Logger logger)
           
 void save(Application app)
          Saves its state to the configuration.
 void setAppClassLoader(ClassLoader cLoader)
          Sets the application classloader for this application
 void setIsJavaEEApp(List<EngineInfo> engineInfos)
          Sets whether this application is a JavaEE application
 void setLibraries(String libraries)
          Sets the deployment time libraries for this application
 void start(ExtendedDeploymentContext context, ProgressTracker tracker)
           
 void stop(ExtendedDeploymentContext context, Logger logger)
           
 boolean suspend(Logger logger)
           
 void unload(ExtendedDeploymentContext context)
           
 
Methods inherited from class org.glassfish.internal.data.ModuleInfo
_getEngineRefs, addMetaData, cleanClassLoaders, getClassLoaders, getEngineRefForContainer, getEngineRefs, getMetaData, getModuleProps, save, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationInfo

public ApplicationInfo(Events events,
                       ReadableArchive source,
                       String name)
Creates a new instance of an ApplicationInfo

Parameters:
events -
source - the archive for this application
name - name of the application
Method Detail

add

public void add(EngineRef ref)

addTransientAppMetaData

public void addTransientAppMetaData(String metaDataKey,
                                    Object metaDataValue)

getTransientAppMetaData

public <T> T getTransientAppMetaData(String key,
                                     Class<T> metadataType)

getName

public String getName()
Returns the registration name for this application

Overrides:
getName in class ModuleInfo
Returns:
the application registration name

getLibraries

public String getLibraries()
Returns the deployment time libraries for this application

Returns:
the libraries

setLibraries

public void setLibraries(String libraries)
Sets the deployment time libraries for this application

Parameters:
libraries - the libraries

setAppClassLoader

public void setAppClassLoader(ClassLoader cLoader)
Sets the application classloader for this application

Parameters:
cLoader - application classloader

isJavaEEApp

public boolean isJavaEEApp()
Returns whether this application is a JavaEE application

Returns:
the isJavaEEApp flag

setIsJavaEEApp

public void setIsJavaEEApp(List<EngineInfo> engineInfos)
Sets whether this application is a JavaEE application

Parameters:
engineInfos - the engine info list

getSource

public ReadableArchive getSource()
Returns the directory where the application bits are located

Returns:
the application bits directory

getModuleInfos

public Collection<ModuleInfo> getModuleInfos()
Returns the modules of this application

Returns:
the modules of this application

getSniffers

public Collection<Sniffer> getSniffers()
Returns the list of sniffers that participated in loaded this application

Overrides:
getSniffers in class ModuleInfo
Returns:
array of sniffer that loaded the application's module

getEngineRefsForContainer

public <T extends Container> Collection<EngineRef> getEngineRefsForContainer(Class<T> type)

getSubContext

protected ExtendedDeploymentContext getSubContext(ModuleInfo info,
                                                  ExtendedDeploymentContext context)

load

public void load(ExtendedDeploymentContext context,
                 ProgressTracker tracker)
          throws Exception
Overrides:
load in class ModuleInfo
Throws:
Exception

start

public void start(ExtendedDeploymentContext context,
                  ProgressTracker tracker)
           throws Exception
Throws:
Exception

stop

public void stop(ExtendedDeploymentContext context,
                 Logger logger)
Overrides:
stop in class ModuleInfo

unload

public void unload(ExtendedDeploymentContext context)
Overrides:
unload in class ModuleInfo

suspend

public boolean suspend(Logger logger)
Overrides:
suspend in class ModuleInfo

resume

public boolean resume(Logger logger)
Overrides:
resume in class ModuleInfo

clean

public void clean(ExtendedDeploymentContext context)
           throws Exception
Overrides:
clean in class ModuleInfo
Throws:
Exception

save

public void save(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.TransactionFailure
PropertyVetoException

addModule

public void addModule(ModuleInfo info)

isLoaded

public boolean isLoaded()


Copyright © 2012 GlassFish Community. All Rights Reserved.