public final class AsynchronousInterceptorContext extends Object implements Cloneable
| Constructor and Description |
|---|
AsynchronousInterceptorContext()
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Constructor<?> |
getConstructor()
Get the intercepted constructor.
|
Map<String,Object> |
getContextData()
Get the context data which is reported to the interceptor invocation context.
|
AsynchronousInterceptor[] |
getInterceptors()
Get the current interceptors.
|
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.
|
boolean |
isBlockingCaller()
Determine whether this invocation is currently directly blocking the calling thread.
|
AsynchronousInterceptor.CancellationHandle |
proceed(AsynchronousInterceptor.ResultHandler resultHandler)
Pass the invocation on to the next or previous step in the chain (depending on whether a result has been set).
|
<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 |
setBlockingCaller(boolean blockingCaller)
Establish whether this invocation is currently directly blocking the calling thread.
|
void |
setConstructor(Constructor<?> constructor)
Set the intercepted constructor.
|
void |
setContextData(Map<String,Object> contextData)
Set the context data which is reported to the interceptor invocation context.
|
void |
setInterceptors(AsynchronousInterceptor[] interceptors)
Set the interceptor iterator.
|
void |
setInterceptors(AsynchronousInterceptor[] interceptors,
int nextIndex)
Set the interceptors, with a starting index to proceed from.
|
void |
setInterceptors(List<AsynchronousInterceptor> interceptorList)
Set the interceptor array from a list.
|
void |
setInterceptors(List<AsynchronousInterceptor> interceptorList,
int nextIndex)
Set the interceptors, with a starting index to proceed from.
|
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 AsynchronousInterceptorContext()
public Object getTarget()
public void setTarget(Object target)
target - the invocation targetpublic Method getMethod()
public void setMethod(Method method)
method - the methodpublic Constructor<?> getConstructor()
public void setConstructor(Constructor<?> constructor)
constructor - the constructorpublic 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 <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 AsynchronousInterceptor[] getInterceptors()
public int getNextInterceptorIndex()
public void setInterceptors(AsynchronousInterceptor[] interceptors)
interceptors - the interceptor listpublic void setInterceptors(List<AsynchronousInterceptor> interceptorList)
interceptorList - the interceptor listpublic void setInterceptors(AsynchronousInterceptor[] interceptors, int nextIndex)
interceptors - the interceptor arraynextIndex - the next index to proceedpublic void setInterceptors(List<AsynchronousInterceptor> interceptorList, int nextIndex)
interceptorList - the interceptor listnextIndex - the next index to proceedpublic boolean isBlockingCaller()
true if the calling thread is being blocked; false otherwisepublic void setBlockingCaller(boolean blockingCaller)
blockingCaller - true if the calling thread is being blocked; false otherwisepublic AsynchronousInterceptor.CancellationHandle proceed(AsynchronousInterceptor.ResultHandler resultHandler)
resultHandler - the result handler to pass to the next interceptor (must not be null)null)Copyright © 2016 JBoss by Red Hat. All rights reserved.