Interface Result
- All Known Subinterfaces:
FileResult
,PrintResult
,TextResult
- All Known Implementing Classes:
ByteArrayFileResult
,LocalFileResult
,StringTextResult
public interface Result
A result is one object which has been produced by a
Job
and is processed by
actions
.
Currently there are two base types. A FileResult
and a PrintResult
.
Not all ResultAction
can handle each Result
, resultflavors
define the kind of
information/data a Result
represents and actions will handle only results they support. A result can
be processed by more than one ResultAction
.
- Since:
- taskplanner 3.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
When result-handling is finished, then this method is called to clean up used system resources, i.e.Defined the types of data this Result contains.default boolean
supportsFlavor
(ResultFlavor flavor) Check if the given flavor is supported from this result.default boolean
supportsOneFlavorOf
(List<ResultFlavor> flavors) Check if one of the given flavors is supported.
-
Method Details
-
getFlavors
Defined the types of data this Result contains.- Returns:
- the
ResultFlavor
of this Result. - Since:
- taskplanner 3.0
-
supportsFlavor
Check if the given flavor is supported from this result.- Parameters:
flavor
- the flavor to check- Returns:
- true, if match
- Since:
- taskplanner 3.0
-
supportsOneFlavorOf
Check if one of the given flavors is supported.- Parameters:
flavors
- the flavors to check- Returns:
- true, if one match
- Since:
- taskplanner 3.0
-
cleanup
When result-handling is finished, then this method is called to clean up used system resources, i.e. to delete a created file.This is also called if no appropriate
ResultAction
handled this Result.- Throws:
Exception
- if there was an IO problem- Since:
- taskplanner 3.0
-