org.glassfish.internal.data
Class ModuleInfo

java.lang.Object
  extended by org.glassfish.internal.data.ModuleInfo
Direct Known Subclasses:
ApplicationInfo

public class ModuleInfo
extends Object

Each module of an application has an associated module info instance keeping the list of engines in which that module is loaded.

Author:
Jerome Dochez

Field Summary
protected  Set<EngineRef> engines
           
protected  Events events
           
protected  Map<Class<? extends Object>,Object> metaData
           
protected  String name
           
 
Constructor Summary
ModuleInfo(Events events, String name, Collection<EngineRef> refs, Properties moduleProps)
           
 
Method Summary
protected  Set<EngineRef> _getEngineRefs()
           
 void addMetaData(Object o)
           
 void clean(ExtendedDeploymentContext context)
           
 void cleanClassLoaders()
           
 Set<ClassLoader> getClassLoaders()
           
<T extends Container>
EngineRef
getEngineRefForContainer(Class<T> type)
           
 Set<EngineRef> getEngineRefs()
           
<T> T
getMetaData(Class<T> c)
           
 Properties getModuleProps()
           
 String getName()
           
 Collection<Sniffer> getSniffers()
          Returns the list of sniffers that participated in loaded this application
 void load(ExtendedDeploymentContext context, ProgressTracker tracker)
           
 boolean resume(Logger logger)
           
 void save(Module module)
          Saves its state to the configuration.
 void start(DeploymentContext context, ProgressTracker tracker)
           
 void stop(ExtendedDeploymentContext context, Logger logger)
           
 boolean suspend(Logger logger)
           
 void unload(ExtendedDeploymentContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

engines

protected Set<EngineRef> engines

metaData

protected final Map<Class<? extends Object>,Object> metaData

name

protected final String name

events

protected final Events events
Constructor Detail

ModuleInfo

public ModuleInfo(Events events,
                  String name,
                  Collection<EngineRef> refs,
                  Properties moduleProps)
Method Detail

getEngineRefs

public Set<EngineRef> getEngineRefs()

_getEngineRefs

protected Set<EngineRef> _getEngineRefs()

getClassLoaders

public Set<ClassLoader> getClassLoaders()

cleanClassLoaders

public void cleanClassLoaders()

addMetaData

public void addMetaData(Object o)

getMetaData

public <T> T getMetaData(Class<T> c)

getName

public String getName()

getModuleProps

public Properties getModuleProps()

getSniffers

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

Returns:
array of sniffer that loaded the application's module

load

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

getEngineRefForContainer

public <T extends Container> EngineRef getEngineRefForContainer(Class<T> type)

start

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

stop

public void stop(ExtendedDeploymentContext context,
                 Logger logger)

unload

public void unload(ExtendedDeploymentContext context)

clean

public void clean(ExtendedDeploymentContext context)
           throws Exception
Throws:
Exception

suspend

public boolean suspend(Logger logger)

resume

public boolean resume(Logger logger)

save

public void save(Module module)
          throws org.jvnet.hk2.config.TransactionFailure,
                 PropertyVetoException
Saves its state to the configuration. this method must be called within a transaction to the configured module instance.

Parameters:
module - the module being persisted
Throws:
org.jvnet.hk2.config.TransactionFailure
PropertyVetoException


Copyright © 2012 GlassFish Community. All Rights Reserved.