public interface InstanceAdvisor
insertInterceptor(org.jboss.aop.advice.Interceptor)
and appendInterceptor(org.jboss.aop.advice.Interceptor)
methods).
Modifier and Type | Method and Description |
---|---|
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.
|
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 |
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)
Removes an interceptor from instance's interceptor chain.
|
void |
removeInterceptorStack(String name)
Removes an interceptor stack from the instance's interceptor chain.
|
SimpleMetaData getMetaData()
Domain getDomain()
Object getInstance()
boolean hasInterceptors()
true
if the advised instance interceptor chain contains one
or more elements.boolean hasAspects()
hasInterceptors()
.true
if there is one or more aspects bound to this advised
instance.void insertInterceptor(Interceptor interceptor)
interceptor
- the interceptor to be added to the instance's chain.void insertInterceptor(int index, Interceptor interceptor) throws IndexOutOfBoundsException
index
of the inserted instance's
interceptor chain.index
- 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 valuevoid insertInterceptorStack(String stackName)
stackName
- the name that identifies the interceptor stack to be insertedvoid appendInterceptor(Interceptor interceptor)
interceptor
- the interceptor to be appended to the instance's chainvoid appendInterceptor(int index, Interceptor interceptor) throws IndexOutOfBoundsException
index
of the appended instance's
interceptor chain.index
- 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 valuevoid appendInterceptorStack(String stackName)
stackName
- the name that identifies the interceptor stack to be appendedvoid removeInterceptor(String name)
name
- name of the interceptor to be removed from the chain.Interceptor.getName()
void removeInterceptorStack(String name)
name
- the name that identifies the interceptor stack to be removedInterceptor[] getInterceptors()
For internal use only.
Interceptor[] getInterceptors(Interceptor[] baseChain)
baseChain
.
baseChain
, and finally all the appended interceptors.
For internal use only.
baseChain
- 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.Object getPerInstanceAspect(String aspectName)
aspectName
.
For internal use only.
aspectName
- name of the queried aspectaspectName
Object getPerInstanceAspect(AspectDefinition def)
def
.
For internal use only.
def
- definition of the queried aspectdef
Object getPerInstanceJoinpointAspect(Joinpoint joinpoint, AspectDefinition def)
def
to be
applied at joipoint
.
For internal use only.
joinpoint
- the joinpoint to which the aspect object will be applied.def
- definition of the queried aspectdef
to be applied
at joinpoint
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.