Class JobStatus
java.lang.Object
com.polarion.platform.jobs.spi.service.JobStatus
- All Implemented Interfaces:
IJobMultiStatus
,IJobStatus
,Serializable
Implementation of
IJobMultiStatus
.
For simplicity non-multi status is not provided.
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.polarion.platform.jobs.IJobStatus
IJobStatus.JobStatusType
-
Constructor Summary
ConstructorDescriptionJobStatus
(IJobStatus.JobStatusType type, IJob job, String message, Throwable error) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNestedStatus
(IJobStatus status) Add nested status.getError()
Exception cause ofIJobStatus.JobStatusType.STATUS_TYPE_FAILED
(may be omitted).getJob()
Job.Status message.Return nestedIJobStatus
es.getType()
Status type.toString()
-
Constructor Details
-
JobStatus
Constructor.- Parameters:
type
- status typejob
- job (can benull
)message
- message (can benull
)error
- error (can benull
)- Throws:
IllegalArgumentException
- if type isnull
-
-
Method Details
-
getType
Description copied from interface:IJobStatus
Status type.- Specified by:
getType
in interfaceIJobStatus
- Returns:
IJobStatus.JobStatusType
(notnull
)
-
getJob
Description copied from interface:IJobStatus
Job.May return
null
if used post-mortem.- Specified by:
getJob
in interfaceIJobStatus
- Returns:
IJob
ornull
-
getMessage
Description copied from interface:IJobStatus
Status message.- Specified by:
getMessage
in interfaceIJobStatus
- Returns:
- message or
null
-
getError
Description copied from interface:IJobStatus
Exception cause ofIJobStatus.JobStatusType.STATUS_TYPE_FAILED
(may be omitted).- Specified by:
getError
in interfaceIJobStatus
- Returns:
- exception or
null
-
toString
-
addNestedStatus
Description copied from interface:IJobMultiStatus
Add nested status.- Specified by:
addNestedStatus
in interfaceIJobMultiStatus
- Parameters:
status
- status to nest
-
getNestedStatuses
Description copied from interface:IJobMultiStatus
Return nestedIJobStatus
es.- Specified by:
getNestedStatuses
in interfaceIJobMultiStatus
- Returns:
Collection
ofIJobStatus
es (notnull
)
-