Class BeanClassRefreshAgent
- java.lang.Object
-
- org.hotswap.agent.plugin.weld.command.BeanClassRefreshAgent
-
public class BeanClassRefreshAgent extends java.lang.ObjectHandle definition and redefinition of bean classes in BeanManager. If the bean class already exists than, according reloading policy, either bean instance re-injection or bean context reloading is processed.- Author:
- Vladimir Dvorak, alpapad@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description static booleanreloadFlagFlag for checking reload status.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetArchivePath()Gets the archive path.java.lang.StringgetBdaId()Gets the Bean deployment ID - bdaId.org.jboss.weld.bootstrap.spi.BeanDeploymentArchivegetDeploymentArchive()Gets the deployment archive.static java.util.Collection<BeanClassRefreshAgent>getInstances()Gets the collection of registered BeanDeploymentArchive(s)static voidrecreateProxy(java.lang.ClassLoader classLoader, java.lang.String archivePath, java.util.Map registeredProxiedBeans, java.lang.String beanClassName, java.lang.String oldSignatureForProxyCheck)Recreate proxy classes, Called from BeanClassRefreshCommand.static voidregisterArchive(java.lang.ClassLoader appClassLoader, org.jboss.weld.bootstrap.spi.BeanDeploymentArchive beanArchive, java.lang.String beanArchiveType)Register bean archive into BdaAgentRegistry and into WeldPlugin.static voidreloadBean(java.lang.ClassLoader classLoader, java.lang.String archivePath, java.lang.String beanClassName, java.util.Map<java.lang.String,java.lang.String> oldFullSignatures, java.util.Map<java.lang.String,java.lang.String> oldSignatures, java.lang.String strReloadStrategy)Reload bean according strategy, reinject bean instances.
-
-
-
Method Detail
-
registerArchive
public static void registerArchive(java.lang.ClassLoader appClassLoader, org.jboss.weld.bootstrap.spi.BeanDeploymentArchive beanArchive, java.lang.String beanArchiveType)Register bean archive into BdaAgentRegistry and into WeldPlugin. Current classLoader is set to beanArchive classLoader.- Parameters:
appClassLoader- the class loader - container or application class loader.beanArchive- the bean archive to be registeredbeanArchiveType- the bean archive type
-
getInstances
public static java.util.Collection<BeanClassRefreshAgent> getInstances()
Gets the collection of registered BeanDeploymentArchive(s)- Returns:
- the instances
-
getBdaId
public java.lang.String getBdaId()
Gets the Bean deployment ID - bdaId.- Returns:
- the bdaId
-
getArchivePath
public java.lang.String getArchivePath()
Gets the archive path.- Returns:
- the archive path
-
getDeploymentArchive
public org.jboss.weld.bootstrap.spi.BeanDeploymentArchive getDeploymentArchive()
Gets the deployment archive.- Returns:
- the deployment archive
-
reloadBean
public static void reloadBean(java.lang.ClassLoader classLoader, java.lang.String archivePath, java.lang.String beanClassName, java.util.Map<java.lang.String,java.lang.String> oldFullSignatures, java.util.Map<java.lang.String,java.lang.String> oldSignatures, java.lang.String strReloadStrategy) throws java.io.IOExceptionReload bean according strategy, reinject bean instances. Called from BeanClassRefreshCommand.- Parameters:
classLoader- the class loaderarchivePath- the archive pathbeanClassName- the bean class nameoldFullSignatures- the old full signaturesoldSignatures- the map of className to old signaturestrReloadStrategy- the str reload strategy- Throws:
java.io.IOException- error working with classDefinition
-
recreateProxy
public static void recreateProxy(java.lang.ClassLoader classLoader, java.lang.String archivePath, java.util.Map registeredProxiedBeans, java.lang.String beanClassName, java.lang.String oldSignatureForProxyCheck) throws java.io.IOExceptionRecreate proxy classes, Called from BeanClassRefreshCommand.- Parameters:
classLoader- the class loaderarchivePath- the bean archive pathregisteredProxiedBeans- the registered proxied beansbeanClassName- the bean class nameoldSignatureForProxyCheck- the old signature for proxy check- Throws:
java.io.IOException- error working with classDefinition
-
-