com.ibm.broker.rest

Interface Response



  • public interface Response
    An interface that describes a possible response for an operation in an API.
    Since:
    IBM Integration Bus v10
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      Response createSchema()
      Create a blank Schema object in the Response.
      java.lang.String getDescription()
      Get the description for this response.
      com.ibm.broker.rest.schema.Schema getSchema()
      Get the Schema for this response.
      java.lang.String getSchemaAsString(com.ibm.broker.rest.schema.SchemaType schemaType)
      Get the schema for this response as a string.
      int getStatusCode()
      Get the HTTP status code for this response.
      Response setDescription(java.lang.String description)
      Set the description for this response.
      Response setSchema(com.ibm.broker.rest.schema.Schema schema)
      Set the Schema for this repsonse.
      Response setSchema(com.ibm.broker.rest.schema.SchemaType schemaType, java.lang.String schema)
      Set the schema for this response.
      Response setStatusCode(int statusCode)
      Set the HTTP status code for this response.
    • Method Detail

      • getStatusCode

        int getStatusCode()
        Get the HTTP status code for this response.
        Returns:
        the HTTP status code for this response.
      • setStatusCode

        Response setStatusCode(int statusCode)
                        throws ApiException
        Set the HTTP status code for this response.
        Parameters:
        statusCode - the new HTTP status code for this response.
        Returns:
        this response.
        Throws:
        ApiException - if the HTTP status code could not be changed.
      • getDescription

        java.lang.String getDescription()
        Get the description for this response.
        Returns:
        the description for this response.
      • setDescription

        Response setDescription(java.lang.String description)
                         throws ApiException
        Set the description for this response.
        Parameters:
        description - the new description for this response.
        Returns:
        this response.
        Throws:
        ApiException - if the description could not be changed.
      • createSchema

        Response createSchema()
                       throws ApiException
        Create a blank Schema object in the Response.
        Returns:
        the current instance of the Response object.
        Throws:
        ApiException
      • getSchemaAsString

        java.lang.String getSchemaAsString(com.ibm.broker.rest.schema.SchemaType schemaType)
        Get the schema for this response as a string.
        Parameters:
        schemaType - the type of the schema to retrieve, for example JSON Schema.
        Returns:
        the schema for this response as a string, or null if no schema is available.
      • getSchema

        com.ibm.broker.rest.schema.Schema getSchema()
                                             throws ApiException
        Get the Schema for this response.
        Returns:
        the Schema for this response.
        Throws:
        ApiException
      • setSchema

        Response setSchema(com.ibm.broker.rest.schema.SchemaType schemaType,
                           java.lang.String schema)
                    throws ApiException
        Set the schema for this response.
        Parameters:
        schemaType - the type of the schema to set, for example JSON Schema.
        schema - the schema as a string.
        Returns:
        this response.
        Throws:
        ApiException - if the schema could not be changed.
      • setSchema

        Response setSchema(com.ibm.broker.rest.schema.Schema schema)
        Set the Schema for this repsonse.
        Parameters:
        schema - the desired Schema.
        Returns:
        this response.