Interface Result
-
- All Known Subinterfaces:
FileResult,PrintResult,TextResult
- All Known Implementing Classes:
ByteArrayFileResult,LocalFileResult,StringTextResult
public interface ResultA result is one object which has been produced by aJoband is processed byactions.Currently there are two base types. A
FileResultand aPrintResult. Not allResultActioncan handle eachResult,resultflavorsdefine the kind of information/data aResultrepresents 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 voidcleanup()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 booleansupportsFlavor(ResultFlavor flavor)Check if the given flavor is supported from this result.default booleansupportsOneFlavorOf(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
ResultFlavorof 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.ExceptionWhen 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
ResultActionhandled this Result.- Throws:
java.lang.Exception- if there was an IO problem- Since:
- taskplanner 3.0
-
-