Interface GenericResponse<R>
-
- All Superinterfaces:
FFDCResponse
public interface GenericResponse<R> extends FFDCResponse
If an OMAS uses Generic types to implement it's Java API, then the responses can implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddAllResults(Collection<? extends R> results)Add several results for the responsevoidaddResult(R result)Add single result for the responsedefault Optional<R>head()Get head element from result array.List<R>results()Get all results of the response-
Methods inherited from interface org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse
getActionDescription, getExceptionCausedBy, getExceptionClassName, getExceptionErrorMessage, getExceptionErrorMessageId, getExceptionErrorMessageParameters, getExceptionProperties, getExceptionSystemAction, getExceptionUserAction, getRelatedHTTPCode, setActionDescription, setExceptionCausedBy, setExceptionClassName, setExceptionErrorMessage, setExceptionErrorMessageId, setExceptionErrorMessageParameters, setExceptionProperties, setExceptionSystemAction, setExceptionUserAction, setRelatedHTTPCode
-
-
-
-
Method Detail
-
addAllResults
void addAllResults(Collection<? extends R> results)
Add several results for the response- Parameters:
results- collection with results
-
addResult
void addResult(R result)
Add single result for the response- Parameters:
result- - one result
-
-