public class MarshalledProxyAdvisor extends Advisor implements InstanceAdvisor
adviceBindings, adviceInterceptors, advisedMethods, annotations, aspects, classMetaData, classMetaDataBindings, clazz, constructionInfos, constructionInterceptors, constructorInfos, constructorInterceptors, constructorMetaData, constructors, defaultMetaData, doesHaveAspects, fieldMetaData, interfaceIntroductions, lazyCollectionLock, loader, manager, methodInterceptors, methodMetaData, name, NULL_ASPECT, perInstanceAspectDefinitions, perInstanceJoinpointAspectDefinitions| Constructor and Description |
|---|
MarshalledProxyAdvisor(String name,
AspectManager manager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassMetaData(ClassMetaDataBinding data) |
void |
addMethodInfo(MethodInfo info) |
void |
appendInterceptor(Interceptor interceptor)
Appends an interceptor to the end of the instance's interceptor chain.
|
void |
appendInterceptor(int index,
Interceptor interceptor)
Appends an interceptor at position
index of the appended instance's
interceptor chain. |
void |
appendInterceptorStack(String stackName)
Appends an interceptor chain to the end of the instance's interceptor chain.
|
Domain |
getDomain()
Returns the domain where this advisor belongs.
|
Object |
getInstance()
Returns the advised instance managed by this advisor.
|
Interceptor[] |
getInterceptors()
Returns the interceptor chain of the advised instance.
|
Interceptor[] |
getInterceptors(Interceptor[] baseChain)
Merges the advised instance interceptor chain with
baseChain. |
SimpleMetaData |
getMetaData()
Returns the metadata bound to the advised instance.
|
MethodInfo |
getMethodInfo(long hash)
Returns the
MethodInfo that represents the execution of the method
identified by hash. |
MethodInfo[] |
getMethodInfos() |
Object |
getPerInstanceAspect(AspectDefinition def)
Returns a per instance aspect object defined by
def. |
Object |
getPerInstanceAspect(String aspectName)
Returns a per instance aspect object identified by
aspectName. |
Object |
getPerInstanceJoinpointAspect(Joinpoint joinpoint,
AspectDefinition def)
Returns the per instance joinpoint aspect object defined by
def to be
applied at joipoint. |
boolean |
hasInterceptors()
Indicates if the advised instance interceptor chain is not empty.
|
void |
insertInterceptor(Interceptor interceptor)
Inserts an interceptor at the beginning of the instance's interceptor chain.
|
void |
insertInterceptor(int index,
Interceptor interceptor)
Inserts an interceptor at position
index of the inserted instance's
interceptor chain. |
void |
insertInterceptorStack(String stackName)
Inserts an interceptor stack to the beginning of the instance's interceptor
chain.
|
protected void |
rebuildInterceptors() |
protected void |
rebuildInterceptorsForAddedBinding(AdviceBinding binding) |
protected void |
rebuildInterceptorsForRemovedBinding(AdviceBinding removedBinding) |
void |
removeClassMetaData(ClassMetaDataBinding data) |
void |
removeInterceptor(String name)
Removes an interceptor from instance's interceptor chain.
|
void |
removeInterceptorStack(String name)
Removes an interceptor stack from the instance's interceptor chain.
|
void |
setClazz(Class<?> clazz) |
void |
setInstance(Object instance) |
addAdviceInterceptor, addInterfaceIntroduction, addPerClassAspect, addPerInstanceAspect, addPerInstanceJoinpointAspect, adjustInfoForAddedBinding, chainOverridingForInheritedMethods, cleanup, createInterceptorChain, deployAnnotationOverride, deployAnnotationOverrides, deployMethodAnnotationOverrides, doDeployAnnotationOverride, dynamicInvoke, finalizeChain, finalizeMethodChain, getAdviceInterceptor, getAllMethods, getAnnotations, getClassLoader, getClassMetaData, getClassMetadataBindings, getClazz, getConstructionInfos, getConstructionInterceptors, getConstructorInfos, getConstructorInterceptors, getConstructorMetaData, getConstructors, getDefaultMetaData, getFieldMetaData, getInterfaceIntroductions, getManager, getMetadata, getMethodMetaData, getName, getPerClassAspect, getPerClassAspect, getPerInstanceAspectDefinitions, getPerInstanceJoinpointAspectDefinitions, getPerVMAspect, getSimpleName, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAspects, hasSameConstructorAspectLength, hasSameMethodAspectLength, initAdvisedMethodsMap, initClassMetaDataBindingsList, initializeConstructionChain, initializeConstructorChain, initializeInterfaceIntroductions, initInterfaceIntroductionsList, initPerInstanceAspectDefinitionsSet, initPerInstanceJoinpointAspectDefinitionsMap, lockWriteChain, lockWriteChain, newBindingAdded, newBindingAdded, pointcutResolved, populateInterceptorsFromInfos, removeAdviceBinding, removeAdviceBindings, removeInterfaceIntroduction, removePerClassAspect, removePerInstanceAspect, removePerInstanceJoinpointAspect, resetChain, resetChain, resetChainKeepInterceptors, resetChainKeepInterceptors, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveConstructionPointcut, resolveConstructorPointcut, resolveMethodPointcut, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, setChainOverridingForInheritedMethods, setManager, setMetadata, unlockWriteChain, unlockWriteChain, updateConstructionPointcutAfterRemove, updateConstructorPointcutAfterRemove, updateFieldPointcutAfterRemove, updateFieldPointcutAfterRemove, updateMethodPointcutAfterRemoveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasAspectspublic MarshalledProxyAdvisor(String name, AspectManager manager)
public void setClazz(Class<?> clazz)
public void addMethodInfo(MethodInfo info)
public void setInstance(Object instance)
public void addClassMetaData(ClassMetaDataBinding data)
addClassMetaData in class Advisorprotected void rebuildInterceptors()
rebuildInterceptors in class Advisorprotected void rebuildInterceptorsForAddedBinding(AdviceBinding binding)
rebuildInterceptorsForAddedBinding in class Advisorprotected void rebuildInterceptorsForRemovedBinding(AdviceBinding removedBinding)
rebuildInterceptorsForRemovedBinding in class Advisorpublic void removeClassMetaData(ClassMetaDataBinding data)
removeClassMetaData in class Advisorpublic MethodInfo getMethodInfo(long hash)
AdvisorMethodInfo that represents the execution of the method
identified by hash.getMethodInfo in class Advisorhash - a hash code that identifies uniquely a method inside the context.MethodInfo representing the queried method execution
joinpoint.public MethodInfo[] getMethodInfos()
public void appendInterceptor(Interceptor interceptor)
InstanceAdvisorappendInterceptor in interface InstanceAdvisorinterceptor - the interceptor to be appended to the instance's chainpublic void appendInterceptor(int index,
Interceptor interceptor)
throws IndexOutOfBoundsException
InstanceAdvisorindex of the appended instance's
interceptor chain.appendInterceptor in interface InstanceAdvisorindex - the position where to insert interceptor. This value must
not be greater than or equal to the number of appended interceptors in
the chain.interceptor - the interceptor to be added to the instance's chain.IndexOutOfBoundsException - if index is greater than or equal to
the total number of appended interceptors contained in this advisor, or
if index is a negative valuepublic void appendInterceptorStack(String stackName)
InstanceAdvisorappendInterceptorStack in interface InstanceAdvisorstackName - the name that identifies the interceptor stack to be appendedpublic Domain getDomain()
InstanceAdvisorgetDomain in interface InstanceAdvisorpublic Object getInstance()
InstanceAdvisorgetInstance in interface InstanceAdvisorpublic Interceptor[] getInterceptors()
InstanceAdvisorFor internal use only.
getInterceptors in interface InstanceAdvisorpublic Interceptor[] getInterceptors(Interceptor[] baseChain)
InstanceAdvisorbaseChain.
baseChain, and finally all the appended interceptors.
For internal use only.
getInterceptors in interface InstanceAdvisorbaseChain - the chain to be joined with the advised instance's chain.baseChain
with the instance's chain. May return baseChain if the last one
is empty.public SimpleMetaData getMetaData()
InstanceAdvisorgetMetaData in interface InstanceAdvisorpublic Object getPerInstanceAspect(String aspectName)
InstanceAdvisoraspectName.
For internal use only.
getPerInstanceAspect in interface InstanceAdvisoraspectName - name of the queried aspectaspectNamepublic Object getPerInstanceAspect(AspectDefinition def)
InstanceAdvisordef.
For internal use only.
getPerInstanceAspect in interface InstanceAdvisordef - definition of the queried aspectdefpublic Object getPerInstanceJoinpointAspect(Joinpoint joinpoint, AspectDefinition def)
InstanceAdvisordef to be
applied at joipoint.
For internal use only.
getPerInstanceJoinpointAspect in interface InstanceAdvisorjoinpoint - the joinpoint to which the aspect object will be applied.def - definition of the queried aspectdef to be applied
at joinpointpublic boolean hasInterceptors()
InstanceAdvisorhasInterceptors in interface InstanceAdvisortrue if the advised instance interceptor chain contains one
or more elements.public void insertInterceptor(Interceptor interceptor)
InstanceAdvisorinsertInterceptor in interface InstanceAdvisorinterceptor - the interceptor to be added to the instance's chain.public void insertInterceptor(int index,
Interceptor interceptor)
throws IndexOutOfBoundsException
InstanceAdvisorindex of the inserted instance's
interceptor chain.insertInterceptor in interface InstanceAdvisorindex - the position where to insert interceptor. This value must
not be greater than or equal to the number of inserted interceptors in
the chain.interceptor - the interceptor to be added to the instance's chain.IndexOutOfBoundsException - if index is greater than or equal to
the total number of inserted interceptors contained in this advisor, or
if index is a negative valuepublic void insertInterceptorStack(String stackName)
InstanceAdvisorinsertInterceptorStack in interface InstanceAdvisorstackName - the name that identifies the interceptor stack to be insertedpublic void removeInterceptor(String name)
InstanceAdvisorremoveInterceptor in interface InstanceAdvisorname - name of the interceptor to be removed from the chain.Interceptor.getName()public void removeInterceptorStack(String name)
InstanceAdvisorremoveInterceptorStack in interface InstanceAdvisorname - the name that identifies the interceptor stack to be removedCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.