Class DynamicHandler<P,R>
java.lang.Object
android.os.Handler
com.pranavpandey.android.dynamic.util.concurrent.DynamicHandler<P,R>
- Type Parameters:
P- The type of the progress.R- The type of the result.
A
Handler to handle updates from the DynamicTask.-
Nested Class Summary
Nested classes/interfaces inherited from class android.os.Handler
Handler.Callback -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMessage constant to set the content tonullif not matched the criteria.static final intMessage constant to publish the progress on the main thread.static final intMessage constant to post the final result on the main thread. -
Constructor Summary
ConstructorsConstructorDescriptionDynamicHandler(Looper looper, DynamicRunnable<?, P, R> runnable) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionDynamicRunnable<?,P, R> Returns the runnable handled by this handler.voidhandleMessage(Message msg) Methods inherited from class android.os.Handler
createAsync, createAsync, dispatchMessage, dump, getLooper, getMessageName, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
-
Field Details
-
MESSAGE_POST_RESULT
public static final int MESSAGE_POST_RESULTMessage constant to post the final result on the main thread.- See Also:
-
MESSAGE_POST_PROGRESS
public static final int MESSAGE_POST_PROGRESSMessage constant to publish the progress on the main thread.- See Also:
-
MESSAGE_NULL_IF_NOT
public static final int MESSAGE_NULL_IF_NOTMessage constant to set the content tonullif not matched the criteria.
-
-
Constructor Details
-
Method Details
-
handleMessage
- Overrides:
handleMessagein classHandler
-
getRunnable
Returns the runnable handled by this handler.- Returns:
- The runnable handled by this handler.
-