Package org.forgerock.android.auth
Class NodeListenerFuture<T>
- java.lang.Object
-
- org.forgerock.android.auth.NodeListenerFuture<T>
-
- All Implemented Interfaces:
java.util.concurrent.Future<T>,FRListener<T>,NodeListener<T>
public abstract class NodeListenerFuture<T> extends java.lang.Object implements NodeListener<T>, java.util.concurrent.Future<T>
-
-
Field Summary
-
Fields inherited from interface org.forgerock.android.auth.NodeListener
TAG
-
-
Constructor Summary
Constructors Constructor Description NodeListenerFuture()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)Tget()Tget(long timeout, java.util.concurrent.TimeUnit unit)booleanisCancelled()booleanisDone()voidonException(java.lang.Exception e)Called when an asynchronous call fails to complete.voidonSuccess(T token)Called when an asynchronous call completes successfully.voidreset()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.forgerock.android.auth.NodeListener
getStage, onCallbackReceived, onCallbackReceived, parseCallback
-
-
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancelin interfacejava.util.concurrent.Future<T>
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfacejava.util.concurrent.Future<T>
-
isDone
public boolean isDone()
- Specified by:
isDonein interfacejava.util.concurrent.Future<T>
-
get
public T get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
getin interfacejava.util.concurrent.Future<T>- Throws:
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
get
public T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
getin interfacejava.util.concurrent.Future<T>- Throws:
java.util.concurrent.ExecutionExceptionjava.lang.InterruptedException
-
onSuccess
public void onSuccess(T token)
Description copied from interface:FRListenerCalled when an asynchronous call completes successfully.- Specified by:
onSuccessin interfaceFRListener<T>- Parameters:
token- the value returned
-
onException
public void onException(java.lang.Exception e)
Description copied from interface:FRListenerCalled when an asynchronous call fails to complete.- Specified by:
onExceptionin interfaceFRListener<T>- Parameters:
e- the reason for failure
-
reset
public void reset()
-
-