-
- All Known Implementing Classes:
SourceResponse.SourceResponseBuilder
public interface SourceResponseClass to hold the response from a source.The response consists of a status.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSourceResponse.SourceResponseBuilderstatic classSourceResponse.StatusResponse status returned by the source
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SourceResponse.SourceResponseBuilderdone()Source is now out of itemsstatic SourceResponse.SourceResponseBuilderempty()The Source is currently emptyCollection<Exception>getExceptions()Return any exceptions associated with this responseSourceResponse.StatusgetStatus()Return the status associated with this responsedefault booleanhasExceptions()Does this response has exceptions associated with it?static SourceResponse.SourceResponseBuilderok()Create source read items normallystatic SourceResponse.SourceResponseBuildersourceError()There was an error reading from the Sourcestatic SourceResponse.SourceResponseBuildersourceError(Exception... exceptions)There was an error reading from the Source with one or more exceptionstatic SourceResponse.SourceResponseBuildersourceError(Collection<Exception> exceptions)There was an error reading from the Source with a collection of exceptions
-
-
-
Method Detail
-
ok
static SourceResponse.SourceResponseBuilder ok()
Create source read items normally- Returns:
- builder for continuation
-
done
static SourceResponse.SourceResponseBuilder done()
Source is now out of items- Returns:
- builder for continuation
-
sourceError
static SourceResponse.SourceResponseBuilder sourceError()
There was an error reading from the Source- Returns:
- builder for continuation
-
sourceError
static SourceResponse.SourceResponseBuilder sourceError(Collection<Exception> exceptions)
There was an error reading from the Source with a collection of exceptions- Parameters:
exceptions- exception for information- Returns:
- builder for continuation
-
sourceError
static SourceResponse.SourceResponseBuilder sourceError(Exception... exceptions)
There was an error reading from the Source with one or more exception- Parameters:
exceptions- exception for information- Returns:
- builder for continuation
-
empty
static SourceResponse.SourceResponseBuilder empty()
The Source is currently empty- Returns:
- builder for continuation
-
getStatus
SourceResponse.Status getStatus()
Return the status associated with this response- Returns:
- status
-
getExceptions
Collection<Exception> getExceptions()
Return any exceptions associated with this response- Returns:
- list of exceptions during read
-
hasExceptions
default boolean hasExceptions()
Does this response has exceptions associated with it?- Returns:
- true is has exceptions
-
-