org.jboss.aop
Class HotSwapStrategy

java.lang.Object
  extended by org.jboss.aop.HotSwapStrategy
All Implemented Interfaces:
DynamicAOPStrategy

public class HotSwapStrategy
extends Object
implements DynamicAOPStrategy

Dynamic AOP strategy that hot swaps a class code. A class code is hot swapped whenever one or more joinpoints become advised or unadvised through dynamic aop operations.

Author:
Flavia Rainone
See Also:
DynamicAOPStrategy

Constructor Summary
HotSwapStrategy(HotSwapper hotSwapper)
          Constructor.
 
Method Summary
 DynamicTransformationObserver getDynamicTransformationObserver(javassist.CtClass clazz)
          Returns a dynamic transformation observer for clazz.
 org.jboss.aop.InterceptorChainObserver getInterceptorChainObserver(Class<?> clazz)
          Returns an interceptor chain observer for clazz.
 JoinpointClassifier getJoinpointClassifier()
          Returns a org.jboss.aop.instrument.JoinpointFullClassifier instance.
 void interceptorChainsUpdated()
          Notifies the strategy that one or more interceptor chains in the system may have been updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HotSwapStrategy

public HotSwapStrategy(HotSwapper hotSwapper)
Constructor.

Parameters:
hotSwapper - a hot swapper is necessary for this strategy.
Method Detail

interceptorChainsUpdated

public void interceptorChainsUpdated()
Notifies the strategy that one or more interceptor chains in the system may have been updated. This method hot swaps all classes whose joinpoints became advised or unadvised due to recent dynamic aop operations.

Specified by:
interceptorChainsUpdated in interface DynamicAOPStrategy
See Also:
DynamicAOPStrategy.interceptorChainsUpdated()

getJoinpointClassifier

public JoinpointClassifier getJoinpointClassifier()
Returns a org.jboss.aop.instrument.JoinpointFullClassifier instance.

Specified by:
getJoinpointClassifier in interface DynamicAOPStrategy
Returns:
an instance of org.jboss.aop.instrument.JoinpointClassifier.
See Also:
DynamicAOPStrategy.getJoinpointClassifier()

getDynamicTransformationObserver

public DynamicTransformationObserver getDynamicTransformationObserver(javassist.CtClass clazz)
Returns a dynamic transformation observer for clazz.

Specified by:
getDynamicTransformationObserver in interface DynamicAOPStrategy
Parameters:
clazz - the clazz whose transformation must be observed.
See Also:
DynamicAOPStrategy.getDynamicTransformationObserver(javassist.CtClass)

getInterceptorChainObserver

public org.jboss.aop.InterceptorChainObserver getInterceptorChainObserver(Class<?> clazz)
Returns an interceptor chain observer for clazz.

Specified by:
getInterceptorChainObserver in interface DynamicAOPStrategy
Parameters:
clazz - the clazz whose interceptor chains will be observed by the observer returned.
Returns:
the interceptor chain observer for clazz. May return null if the strategy doesn't require an observer at all.
See Also:
DynamicAOPStrategy.getInterceptorChainObserver(java.lang.Class)


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.