Class FutureResult<T>

  • Type Parameters:
    T - type of the result
    All Implemented Interfaces:
    org.fusesource.restygwt.client.MethodCallback<T>

    public class FutureResult<T>
    extends Object
    implements org.fusesource.restygwt.client.MethodCallback<T>
    future result for asynchronous call caching. Based on RPC Future Result from http://stackoverflow.com/questions/34851180/how-to-cache-server-results-in-gwt-with-guava
    Author:
    Manfred Tremmel
    • Constructor Detail

      • FutureResult

        public FutureResult()
    • Method Detail

      • addCallback

        public void addCallback​(org.fusesource.restygwt.client.MethodCallback<T> pcallback)
        add callback which is informed about changes.
        Parameters:
        pcallback - callback which is informed about changes
      • isDone

        public boolean isDone()
      • onFailure

        public void onFailure​(org.fusesource.restygwt.client.Method pmethod,
                              Throwable pexception)
        Specified by:
        onFailure in interface org.fusesource.restygwt.client.MethodCallback<T>
      • onSuccess

        public void onSuccess​(org.fusesource.restygwt.client.Method pmethod,
                              T presponse)
        Specified by:
        onSuccess in interface org.fusesource.restygwt.client.MethodCallback<T>