Package org.jdeferred2
Class DeferredCallable<D,P>
java.lang.Object
org.jdeferred2.DeferredCallable<D,P>
- Type Parameters:
D
- Type used as return type ofCallable.call()
, andDeferred.resolve(Object)
P
- Type used forDeferred.notify(Object)
- All Implemented Interfaces:
Callable<D>
Use this as superclass in case you need to be able to return a result and notify progress.
If you don't need to notify progress, you can simply use
Callable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newDeferredCallable
with DEFAULTstartPolicy
.DeferredCallable
(DeferredManager.StartPolicy startPolicy) Creates a newDeferredCallable
with the givenstartPolicy
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Trigger notification of an intermediate result.
-
Field Details
-
deferred
-
startPolicy
-
-
Constructor Details
-
DeferredCallable
public DeferredCallable()Creates a newDeferredCallable
with DEFAULTstartPolicy
. -
DeferredCallable
Creates a newDeferredCallable
with the givenstartPolicy
.- Parameters:
startPolicy
- the startPolicy to use. will be set to DEFAULT ifnull
.
-
-
Method Details
-
notify
Trigger notification of an intermediate result.- Parameters:
progress
- the value to be sent as a notification- See Also:
-
getDeferred
-
getStartPolicy
-