|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.common.client.api.interceptor.RemoteCallContext
org.jboss.errai.enterprise.client.jaxrs.api.interceptor.RestCallContext
public abstract class RestCallContext
Represents the context of an intercepted JAX-RS (REST) remote call.
Constructor Summary | |
---|---|
RestCallContext()
|
Method Summary | |
---|---|
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. |
com.google.gwt.http.client.RequestBuilder |
getRequestBuilder()
Provides access to the RequestBuilder used to construct and execute
the call to the REST endpoint. |
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(ResponseCallback 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(ResponseCallback 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 |
setRequestBuilder(com.google.gwt.http.client.RequestBuilder requestBuilder)
Changes the RequestBuilder instance used to execute the call to the
REST endpoint. |
Methods inherited from class org.jboss.errai.common.client.api.interceptor.RemoteCallContext |
---|
getResult, proceed, proceed, setResult |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RestCallContext()
Method Detail |
---|
public com.google.gwt.http.client.RequestBuilder getRequestBuilder()
RequestBuilder
used to construct and execute
the call to the REST endpoint.
Note that a call to setParameters(Object[])
will change this
context's RequestBuilder
instance to reflect the parameter changes
(affecting the URL and HTTP headers).
RequestBuilder
with the URL, HTTP method and HTTP
headers set.public void setRequestBuilder(com.google.gwt.http.client.RequestBuilder requestBuilder)
RequestBuilder
instance used to execute the call to the
REST endpoint.
requestBuilder
- the RequestBuilder
instance to use when proceeding with
the request. Must not be null.public abstract void proceed(ResponseCallback callback)
callback
- The response callback that receives the Response
of 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(ResponseCallback callback, ErrorCallback<?> errorCallback)
callback
- The response callback that receives the Response
of 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. 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 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.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |