com.atlassian.scheduler.core.status
Class UnusableJobDetails
java.lang.Object
com.atlassian.scheduler.core.status.AbstractJobDetails
com.atlassian.scheduler.core.status.UnusableJobDetails
- All Implemented Interfaces:
- JobDetails
public class UnusableJobDetails
- extends AbstractJobDetails
Concrete implementation of JobDetails that always throws an exception when the
parameters are accessed. This can be used when the JobRunner is unavailable or
an exception occurs while trying to deserialize the parameters.
- Since:
- v1.0
UnusableJobDetails
public UnusableJobDetails(JobId jobId,
JobRunnerKey jobRunnerKey,
RunMode runMode,
Schedule schedule,
Date nextRunTime,
byte[] parameters,
Throwable cause)
- Parameters:
cause - the reason the parameters are unavailable. If left null, then
it is assumed that the JobRunner is not available.
getParameters
@Nonnull
public Map<String,Serializable> getParameters()
- The parameters are not available because the map could not be reconstructed.
- Returns:
- never returns normally
- Throws:
SchedulerRuntimeException - Unconditionally. The exception's cause will be
either a JobRunnerNotRegisteredException or the error that occurred during
deserialization.
isRunnable
public boolean isRunnable()
- Description copied from interface:
JobDetails
- Returns
true if this job could be successfully run at this time. This requires it to have
a registered JobRunner whose class loader can successfully reconstruct the job's
parameter map.
- Returns:
true if this job is currently runnable; false otherwise
appendToStringDetails
protected void appendToStringDetails(StringBuilder sb)
- Specified by:
appendToStringDetails in class AbstractJobDetails
Copyright © 2014 Atlassian. All Rights Reserved.