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 aJob
and is processed byactions
.Currently there are two base types. A
FileResult
and aPrintResult
. Not allResultAction
can handle eachResult
,resultflavors
define the kind of information/data aResult
represents and actions will handle only results they support. A result can be processed by more than oneResultAction
.- Since:
- taskplanner 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
cleanup()
When result-handling is finished, then this method is called to clean up used system resources, i.e.java.util.List<ResultFlavor>
getFlavors()
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(java.util.List<ResultFlavor> flavors)
Check if one of the given flavors is supported.
-
-
-
Method Detail
-
getFlavors
@Nonnull java.util.List<ResultFlavor> getFlavors()
Defined the types of data this Result contains.- Returns:
- the
ResultFlavor
of this Result. - Since:
- taskplanner 3.0
-
supportsFlavor
default boolean supportsFlavor(ResultFlavor flavor)
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
default boolean supportsOneFlavorOf(java.util.List<ResultFlavor> flavors)
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
void cleanup() throws java.lang.Exception
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:
java.lang.Exception
- if there was an IO problem- Since:
- taskplanner 3.0
-
-