Interface GenericResponse<R>

All Superinterfaces:
FFDCResponse
All Known Implementing Classes:
SubjectAreaOMASAPIResponse

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 Details

    • 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
    • results

      List<R> results()
      Get all results of the response
      Returns:
      results
    • head

      default Optional<R> head()
      Get head element from result array. Needed when we know for sure that the answer is single object
      Returns:
      result