public T get ( ) throws IllegalStateException { switch ( this . state ) { case INCOMPLETE : // Do not block browser so just throw ex throw new IllegalStateException ( "The server response did not yet recieved." ) ; case FAILED : throw new IllegalStateException ( this . error ) ; case SUCCEEDED : return this . value ; default : throw new IllegalStateException ( "Something very unclear" ) ; } }
get result of the call .