|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.aop.GeneratedInstanceAdvisorMixin
public class GeneratedInstanceAdvisorMixin
Adapts the old instance advisor api to the new generated advisor stuff. Old API calls on generated instance advisors will delegate to this class
| Nested Class Summary | |
|---|---|
class |
GeneratedInstanceAdvisorMixin.InstanceInterceptorFactory
|
| Field Summary | |
|---|---|
protected ArrayList<Interceptor> |
appendedInterceptors
|
boolean |
hasInstanceAspects
|
protected ArrayList<Interceptor> |
insertedInterceptors
|
protected WeakReference<Object> |
instanceRef
|
| Constructor Summary | |
|---|---|
GeneratedInstanceAdvisorMixin()
|
|
GeneratedInstanceAdvisorMixin(Object instance,
GeneratedClassAdvisor genadvisor)
|
|
| Method Summary | |
|---|---|
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. |
protected void |
finalize()
Added to notify interceptor chain observer of interceptor chain garbage collection. |
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[] advisorChain)
Called by the advisor |
SimpleMetaData |
getMetaData()
Returns the metadata bound to the advised instance. |
Object |
getPerInstanceAspect(AspectDefinition def)
Returns a per instance aspect object defined by def. |
Object |
getPerInstanceAspect(String def)
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. |
GeneratedAdvisorInterceptor[] |
getWrappers()
|
Interceptor[] |
getWrappers(Interceptor[] advisorChain)
Called by the advisor |
boolean |
hasAspects()
Indicates whether there are instance aspects bound to the instance advised. |
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. |
void |
removeInterceptor(String name)
This will not remove interceptor pointcuts! You will have to do this through AspectManager |
void |
removeInterceptorStack(String stackName)
Removes an interceptor stack from the instance's interceptor chain. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList<Interceptor> insertedInterceptors
protected ArrayList<Interceptor> appendedInterceptors
protected WeakReference<Object> instanceRef
public boolean hasInstanceAspects
| Constructor Detail |
|---|
public GeneratedInstanceAdvisorMixin()
public GeneratedInstanceAdvisorMixin(Object instance,
GeneratedClassAdvisor genadvisor)
| Method Detail |
|---|
public boolean hasInterceptors()
InstanceAdvisor
hasInterceptors in interface InstanceAdvisortrue if the advised instance interceptor chain contains one
or more elements.public Object getPerInstanceAspect(String def)
InstanceAdvisoraspectName.
For internal use only.
getPerInstanceAspect in interface InstanceAdvisordef - name of the queried aspect
aspectNamepublic Object getPerInstanceAspect(AspectDefinition def)
InstanceAdvisordef.
For internal use only.
getPerInstanceAspect in interface InstanceAdvisordef - definition of the queried aspect
def
public 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 aspect
def to be applied
at joinpointpublic SimpleMetaData getMetaData()
InstanceAdvisor
getMetaData in interface InstanceAdvisorpublic Interceptor[] getInterceptors()
InstanceAdvisorFor internal use only.
getInterceptors in interface InstanceAdvisorpublic Interceptor[] getInterceptors(Interceptor[] advisorChain)
getInterceptors in interface InstanceAdvisoradvisorChain - 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 GeneratedAdvisorInterceptor[] getWrappers()
public Interceptor[] getWrappers(Interceptor[] advisorChain)
An - array of GeneratedAdvisorInterceptor from the advisor's intereceptor chain for the joinpoint
public void insertInterceptor(int index,
Interceptor interceptor)
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.public void insertInterceptor(Interceptor interceptor)
InstanceAdvisor
insertInterceptor in interface InstanceAdvisorinterceptor - the interceptor to be added to the instance's chain.public void appendInterceptor(Interceptor interceptor)
InstanceAdvisor
appendInterceptor in interface InstanceAdvisorinterceptor - the interceptor to be appended to the instance's chain
public void appendInterceptor(int index,
Interceptor interceptor)
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.public void removeInterceptor(String name)
removeInterceptor in interface InstanceAdvisorname - name of the interceptor to be removed from the chain.Interceptor.getName()public final boolean hasAspects()
InstanceAdvisorInstanceAdvisor.hasInterceptors().
hasAspects in interface InstanceAdvisortrue if there is one or more aspects bound to this advised
instance.public void insertInterceptorStack(String stackName)
InstanceAdvisor
insertInterceptorStack in interface InstanceAdvisorstackName - the name that identifies the interceptor stack to be insertedpublic void appendInterceptorStack(String stackName)
InstanceAdvisor
appendInterceptorStack in interface InstanceAdvisorstackName - the name that identifies the interceptor stack to be appendedpublic void removeInterceptorStack(String stackName)
InstanceAdvisor
removeInterceptorStack in interface InstanceAdvisorstackName - the name that identifies the interceptor stack to be removedpublic Domain getDomain()
InstanceAdvisor
getDomain in interface InstanceAdvisorprotected void finalize()
finalize in class Objectpublic Object getInstance()
InstanceAdvisor
getInstance in interface InstanceAdvisor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||