java.lang.Object
org.palladiosimulator.protocom.framework.java.ee.protocol.Response
Direct Known Subclasses:
JsonResponse, StringResponse

public class Response extends Object
A Response object represents an HTTP response.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    protected int
     
    static final int
     
    static final int
     
    protected static final com.fasterxml.jackson.databind.ObjectMapper
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new Response object.
    Response(int error)
    Constructs a new Response object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the error code of the response.
    void
    setError(int error)
    Sets the error code of the response.
    Converts the response to JSON.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Response

      public Response()
      Constructs a new Response object.
    • Response

      public Response(int error)
      Constructs a new Response object.
      Parameters:
      error - the error code of the response
  • Method Details

    • getError

      public int getError()
      Gets the error code of the response.
      Returns:
      the error code of the response
    • setError

      public void setError(int error)
      Sets the error code of the response.
      Parameters:
      error - the error code of the response
    • toJson

      public String toJson()
      Converts the response to JSON.
      Returns:
      a JSON object string representing the response