Errai 3.0.1-SNAPSHOT

org.jboss.errai.common.client.api
Interface Caller<T>


public interface Caller<T>

An interface that can be used as the injection point for a (probably generated) proxy that invokes remote methods and gives their return values to the supplied callbacks.

Author:
Mike Brock

Method Summary
 T call()
          Returns an instance of the proxy that can invoke service methods on the service described by T.
 T call(RemoteCallback<?> callback)
          Returns an instance of the proxy that can invoke service methods on the service described by T.
 T call(RemoteCallback<?> callback, ErrorCallback<?> errorCallback)
          Returns an instance of the proxy that can invoke service methods on the service described by T.
 

Method Detail

call

T call()
Returns an instance of the proxy that can invoke service methods on the service described by T.

Returns:
an instance of the proxy that can invoke service methods on the service described by T.

call

T call(RemoteCallback<?> callback)
Returns an instance of the proxy that can invoke service methods on the service described by T.

Parameters:
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.

Returns:
an instance of the proxy that can invoke service methods on the service described by T.

call

T call(RemoteCallback<?> callback,
       ErrorCallback<?> errorCallback)
Returns an instance of the proxy that can invoke service methods on the service described by T.

Parameters:
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.

Returns:
an instance of the proxy that can invoke service methods on the service described by T.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.