public abstract class RemoteCallContext extends Object
Constructor and Description |
---|
RemoteCallContext() |
Modifier and Type | Method and Description |
---|---|
abstract Annotation[] |
getAnnotations()
Returns the annotations of the intercepted method.
|
abstract String |
getMethodName()
Returns the name of the intercepted method.
|
Object[] |
getParameters()
Provides access to the intercepted method's parameters.
|
Object |
getResult()
Returns the result of the intercepted remote call.
|
abstract Class |
getReturnType()
Returns the return type of the intercepted method.
|
abstract Annotation[] |
getTypeAnnotations()
Get the annotations of the intercepted type.
|
abstract Object |
proceed()
Proceeds to the next interceptor in the chain or with the execution of the intercepted method if all
interceptors have been executed.
|
abstract void |
proceed(RemoteCallback<?> callback)
Proceeds to the next interceptor in the chain or with the execution of the
intercepted method if all interceptors have been executed.
|
abstract void |
proceed(RemoteCallback<?> callback,
ErrorCallback<?> errorCallback)
Proceeds to the next interceptor in the chain or with the execution of the
intercepted method if all interceptors have been executed.
|
void |
setParameters(Object[] parameters)
Overrides the parameters that are passed to the method for which the interceptor was invoked.
|
void |
setResult(Object result)
Sets the result of the intercepted remote call.
|
public Object getResult()
public void setResult(Object result)
ErrorCallback
it will prevent the error from bubbling up and
instead cause the RemoteCallback
specified in the previous
interceptor or at the actual remote call site to be invoked with the
provided result.result
- The result to return to the caller of the intercepted method.public abstract void proceed(RemoteCallback<?> callback)
callback
- The remote callback that receives the return value from the call.
This callback is guaranteed to be invoked before the callback
provided on the actual call site. Cannot be null.public abstract void proceed(RemoteCallback<?> callback, ErrorCallback<?> errorCallback)
callback
- The remote callback that receives the return value from the call.
This callback is guaranteed to be invoked before the callback
provided on the actual call site. Cannot be null.errorCallback
- The error callback that receives transmission errors and
exceptions thrown by the remote service. This error callback is
guaranteed to be invoked before the error callback provided on the
actual call site. Cannot be null.public Object[] getParameters()
public void setParameters(Object[] parameters)
parameters
- the parameters to use when invoking the intercepted method. Must not be null.public abstract String getMethodName()
public abstract Class getReturnType()
public abstract Annotation[] getAnnotations()
public abstract Annotation[] getTypeAnnotations()
public abstract Object proceed()
This method can also be called to proceed with an asynchronous call (e.g. when intercepting a remote procedure
call), but only if the call's result is not required in the interceptor logic. If access to the result of an
asynchronous method call is needed in the interceptor, one of the overloaded versions of this method accepting a
RemoteCallback
has to be used instead.
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.