public final class InterceptorContext extends Object implements Cloneable
Constructor and Description |
---|
InterceptorContext() |
Modifier and Type | Method and Description |
---|---|
InterceptorContext |
clone()
Clone this interceptor context instance.
|
Map<String,Object> |
getContextData()
Get the context data which is reported to the interceptor invocation context.
|
List<Interceptor> |
getInterceptors()
Get the current interceptors.
|
InvocationContext |
getInvocationContext()
Get the invocation context.
|
Method |
getMethod()
Get the invoked method which is reported to the interceptor invocation context.
|
int |
getNextInterceptorIndex()
Returns the next interceptor index.
|
Object[] |
getParameters()
Get the method parameters which are reported to the interceptor invocation context.
|
<T> T |
getPrivateData(Class<T> type)
Get a private data item.
|
Object |
getPrivateData(Object key)
Get a private data item.
|
Object |
getTarget()
Get the invocation target which is reported to the interceptor invocation context.
|
Object |
getTimer()
Get the timer object which is reported to the interceptor invocation context.
|
Object |
proceed()
Pass the invocation on to the next step in the chain.
|
<T> T |
putPrivateData(Class<T> type,
T value)
Insert a private data item.
|
Object |
putPrivateData(Object key,
Object value)
Insert a private data item.
|
void |
setContextData(Map<String,Object> contextData)
Set the context data which is reported to the interceptor invocation context.
|
void |
setInterceptors(List<Interceptor> interceptors)
Set the interceptor iterator.
|
void |
setInterceptors(List<Interceptor> interceptors,
int nextIndex)
Set the interceptors.
|
void |
setMethod(Method method)
Set the invoked method which is reported to the interceptor invocation context.
|
void |
setParameters(Object[] parameters)
Set the method parameters which are reported to the interceptor invocation context.
|
void |
setTarget(Object target)
Set the invocation target which is reported to the interceptor invocation context.
|
void |
setTimer(Object timer)
Set the timer object which is reported to the interceptor invocation context.
|
public Object getTarget()
public void setTarget(Object target)
target
- the invocation targetpublic Method getMethod()
public void setMethod(Method method)
method
- the methodpublic Object[] getParameters()
public void setParameters(Object[] parameters)
parameters
- the method parameterspublic Map<String,Object> getContextData() throws IllegalStateException
IllegalStateException
- if the context data was never initializedpublic void setContextData(Map<String,Object> contextData)
contextData
- the context datapublic Object getTimer()
public void setTimer(Object timer)
timer
- the timer objectpublic InvocationContext getInvocationContext()
public <T> T getPrivateData(Class<T> type)
T
- the data typetype
- the data type class objectnull
if no such item existspublic Object getPrivateData(Object key)
key
- the object keypublic <T> T putPrivateData(Class<T> type, T value)
T
- the data typetype
- the data type class objectvalue
- the data item value, or null
to remove the mappingnull
if no such item existspublic Object putPrivateData(Object key, Object value)
Class
then the value given must be assignable to that class.key
- the data keyvalue
- the data item value, or null
to remove the mappingnull
if no such item existspublic List<Interceptor> getInterceptors()
public int getNextInterceptorIndex()
public void setInterceptors(List<Interceptor> interceptors)
interceptors
- the interceptor listpublic void setInterceptors(List<Interceptor> interceptors, int nextIndex)
interceptors
- the interceptor listnextIndex
- the next index to proceedpublic Object proceed() throws Exception
Exception
- if an invocation throws an exceptionpublic InterceptorContext clone()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.