|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.path.android.jobqueue.BaseJob
@Deprecated public abstract class BaseJob
This class has been deprecated and will soon be removed from public api.
Please use Job instead which provider a cleaner constructor API.
Deprecated. Use Job
| Field Summary | |
|---|---|
static int |
DEFAULT_RETRY_LIMIT
Deprecated. |
| Constructor Summary | |
|---|---|
protected |
BaseJob(boolean requiresNetwork)
Deprecated. |
|
BaseJob(boolean requiresNetwork,
boolean persistent)
Deprecated. |
protected |
BaseJob(boolean requiresNetwork,
boolean persistent,
java.lang.String groupId)
Deprecated. |
protected |
BaseJob(boolean requiresNetwork,
java.lang.String groupId)
Deprecated. |
protected |
BaseJob(java.lang.String groupId)
Deprecated. |
| Method Summary | |
|---|---|
protected int |
getCurrentRunCount()
Deprecated. before each run, JobManager sets this number. |
protected int |
getRetryLimit()
Deprecated. By default, jobs will be retried DEFAULT_RETRY_LIMIT times. |
java.lang.String |
getRunGroupId()
Deprecated. Some jobs may require being run synchronously. |
boolean |
isPersistent()
Deprecated. defines if we should add this job to disk or non-persistent queue |
abstract void |
onAdded()
Deprecated. called when the job is added to disk and committed. |
protected abstract void |
onCancel()
Deprecated. called when a job is cancelled. |
abstract void |
onRun()
Deprecated. The actual method that should to the work It should finish w/o any exception. |
boolean |
requiresNetwork()
Deprecated. if job is set to require network, it will not be called unless NetworkUtil
reports that there is a network connection |
boolean |
safeRun(int currentRunCount)
Deprecated. Runs the job and catches any exception |
protected abstract boolean |
shouldReRunOnThrowable(java.lang.Throwable throwable)
Deprecated. if onRun method throws an exception, this method is called. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_RETRY_LIMIT
| Constructor Detail |
|---|
protected BaseJob(boolean requiresNetwork)
protected BaseJob(java.lang.String groupId)
protected BaseJob(boolean requiresNetwork,
java.lang.String groupId)
public BaseJob(boolean requiresNetwork,
boolean persistent)
protected BaseJob(boolean requiresNetwork,
boolean persistent,
java.lang.String groupId)
| Method Detail |
|---|
public final boolean isPersistent()
public abstract void onAdded()
onRun might be called without an onAdded call
public abstract void onRun()
throws java.lang.Throwable
shouldReRunOnThrowable will be called to
decide either to dismiss the job or re-run it.
java.lang.Throwableprotected abstract void onCancel()
protected abstract boolean shouldReRunOnThrowable(java.lang.Throwable throwable)
onRun method throws an exception, this method is called.
return true if you want to run your job again, return false if you want to dismiss it. If you return false,
onCancel will be called.
public final boolean safeRun(int currentRunCount)
currentRunCount -
protected int getCurrentRunCount()
onRun()
method
public final boolean requiresNetwork()
NetworkUtil
reports that there is a network connection
public final java.lang.String getRunGroupId()
protected int getRetryLimit()
DEFAULT_RETRY_LIMIT times.
If job fails this many times, onCancel will be called w/o calling shouldReRunOnThrowable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||