@Deprecated
public final class FirebaseJobDispatcher
extends java.lang.Object
FirebaseJobDispatcher(Driver),
Driver,
JobParameters| Modifier and Type | Class and Description |
|---|---|
static interface |
FirebaseJobDispatcher.CancelResult
Deprecated.
Results that can legally be returned from
cancel(String) or cancelAll()
calls. |
static class |
FirebaseJobDispatcher.ScheduleFailedException
Deprecated.
Thrown when a
schedule(com.firebase.jobdispatcher.Job) call
fails. |
static interface |
FirebaseJobDispatcher.ScheduleResult
Deprecated.
Results that can legally be returned from
schedule(Job) calls. |
| Modifier and Type | Field and Description |
|---|---|
static int |
CANCEL_RESULT_NO_DRIVER_AVAILABLE
Deprecated.
Indicates the cancel request failed because the driver was unavailable.
|
static int |
CANCEL_RESULT_SUCCESS
Deprecated.
Indicates the cancel request seems to have been successful.
|
static int |
CANCEL_RESULT_UNKNOWN_ERROR
Deprecated.
Indicates the cancel request encountered an unknown error.
|
static int |
SCHEDULE_RESULT_BAD_SERVICE
Deprecated.
Indicates the schedule request failed because the service is not exposed or configured
correctly.
|
static int |
SCHEDULE_RESULT_NO_DRIVER_AVAILABLE
Deprecated.
Indicates the schedule request failed because the driver was unavailable.
|
static int |
SCHEDULE_RESULT_SUCCESS
Deprecated.
Indicates the schedule request seems to have been successful.
|
static int |
SCHEDULE_RESULT_UNKNOWN_ERROR
Deprecated.
Indicates the schedule request encountered an unknown error.
|
static int |
SCHEDULE_RESULT_UNSUPPORTED_TRIGGER
Deprecated.
Indicates the schedule request failed because the Trigger was unsupported.
|
| Constructor and Description |
|---|
FirebaseJobDispatcher(Driver driver)
Deprecated.
Instantiates a new FirebaseJobDispatcher using the provided Driver.
|
| Modifier and Type | Method and Description |
|---|---|
int |
cancel(java.lang.String tag)
Deprecated.
Attempts to cancel the Job that matches the provided tag and endpoint.
|
int |
cancelAll()
Deprecated.
Attempts to cancel all Jobs registered for this package.
|
ValidationEnforcer |
getValidator()
Deprecated.
Returns a ValidationEnforcer configured for the current Driver.
|
void |
mustSchedule(Job job)
Deprecated.
Attempts to schedule the provided Job, throwing an exception if it fails.
|
Job.Builder |
newJobBuilder()
Deprecated.
Creates a new Job.Builder, configured with the current driver's validation settings.
|
RetryStrategy |
newRetryStrategy(int policy,
int initialBackoff,
int maximumBackoff)
Deprecated.
Creates a new RetryStrategy from the provided parameters, validated with the current driver's
JobValidator. |
int |
schedule(Job job)
Deprecated.
Attempts to schedule the provided Job.
|
public static final int SCHEDULE_RESULT_SUCCESS
public static final int SCHEDULE_RESULT_UNKNOWN_ERROR
public static final int SCHEDULE_RESULT_NO_DRIVER_AVAILABLE
public static final int SCHEDULE_RESULT_UNSUPPORTED_TRIGGER
public static final int SCHEDULE_RESULT_BAD_SERVICE
public static final int CANCEL_RESULT_SUCCESS
public static final int CANCEL_RESULT_UNKNOWN_ERROR
public static final int CANCEL_RESULT_NO_DRIVER_AVAILABLE
public FirebaseJobDispatcher(Driver driver)
public int schedule(Job job)
Returns one of the SCHEDULE_RESULT_ constants.
public int cancel(java.lang.String tag)
Returns one of the CANCEL_RESULT_ constants.
public int cancelAll()
Returns one of the CANCEL_RESULT_ constants.
public void mustSchedule(Job job)
public ValidationEnforcer getValidator()
public Job.Builder newJobBuilder()
public RetryStrategy newRetryStrategy(int policy, int initialBackoff, int maximumBackoff)
JobValidator.policy - the backoff policy to use. One of the RetryStrategy.RetryPolicy constants.initialBackoff - the initial backoff, in seconds.maximumBackoff - the maximum backoff, in seconds.ValidationEnforcer.ValidationExceptionRetryStrategy