Interface Response

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject

public interface Response extends OsidObject

A Response represents a stuctured response from a service endpoint.

  • Method Details

    • ok

      boolean ok()
      Tests if the request was successful.
      Returns:
      true if the request was successful, false otherrwise
      Compliance:
      mandatory - This method must be implemented.
    • getStatusMessage

      DisplayText getStatusMessage()
      Gets a status message. The returned string may be empty or may contain an error message is an error occurred.
      Returns:
      an error message
      Compliance:
      mandatory - This method must be implemented.
    • getResponseRecord

      ResponseRecord getResponseRecord(Type responseRecordType) throws OperationFailedException
      Gets the response record. This method is used to retrieve an object implementing the requested message.
      Parameters:
      responseRecordType - a response record type
      Returns:
      the response record
      Throws:
      NullArgumentException - responseMessageType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(responseRecordType) is false
      Compliance:
      mandatory - This method must be implemented.