|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BatchCaller
An interface that can be used as an injection point for batched invocations of remote methods using generated
proxies. In contrast to Caller
, no remote request will be sent until sendBatch()
is called.
Method Summary | ||
---|---|---|
|
call(RemoteCallback<?> callback,
Class<T> remoteService)
Returns an instance of the proxy that can schedule invocations on service methods on the service described by T . |
|
|
call(RemoteCallback<?> callback,
ErrorCallback<?> errorCallback,
Class<T> remoteService)
Returns an instance of the proxy that can schedule invocations on service methods on the service described by T . |
|
void |
sendBatch()
Invokes the accumulated remote requests using a single server round trip. |
|
void |
sendBatch(ErrorCallback<?> errorCallback)
Invokes the accumulated remote requests using a single server round trip. |
|
void |
sendBatch(RemoteCallback<Void> callback)
Invokes the accumulated remote requests using a single server round trip. |
|
void |
sendBatch(RemoteCallback<Void> callback,
ErrorCallback<?> errorCallback)
Invokes the accumulated remote requests using a single server round trip. |
Method Detail |
---|
<T> T call(RemoteCallback<?> callback, Class<T> remoteService)
T
.
callback
- the callback to be invoked when the remote call has completed in success. In the case of an error, a
default error callback will be notified. Which one depends on the proxy implementation.
The provided callback must not be null.
remoteService
- The interface describing the remote endpoint.
T
.<T> T call(RemoteCallback<?> callback, ErrorCallback<?> errorCallback, Class<T> remoteService)
T
.
callback
- the callback to be invoked when the remote call has completed in success. In the case of an error, a
default error callback will be notified. Which one depends on the proxy implementation.
The callback must not be null.
errorCallback
- the callback to be invoked when the remote call has completed in failure. No callback is invoked in the
case of success.
The provided callback must not be null.
remoteService
- The interface describing the remote endpoint.
T
.void sendBatch()
void sendBatch(RemoteCallback<Void> callback)
callback
- the callback to be invoked when all remote calls have completed in success. Must not be null.void sendBatch(ErrorCallback<?> errorCallback)
errorCallback
- the callback to be invoked for all remote calls that have completed in failure. No callback is invoked
in the case of success.void sendBatch(RemoteCallback<Void> callback, ErrorCallback<?> errorCallback)
callback
- the callback to be invoked when all remote calls have completed in success. Must not be null.errorCallback
- the callback to be invoked for all remote calls that have completed in failure.
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |