java.lang.Object
org.palladiosimulator.protocom.framework.java.ee.protocol.Response
org.palladiosimulator.protocom.framework.java.ee.protocol.StringResponse

public class StringResponse extends Response
A StringResponse object represents an HTTP response with a string payload.
  • Constructor Details

    • StringResponse

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

      public StringResponse(String payload)
      Constructs a new StringResponse object.
      Parameters:
      payload - the payload of the response
  • Method Details

    • getPayload

      public String getPayload()
      Gets the payload of the response.
      Returns:
      the payload of the response
    • setPayload

      public void setPayload(String playload)
      Sets the payload of the response.
      Parameters:
      playload - the payload of the response
    • fromJson

      public static StringResponse fromJson(String serialized)
      Converts a serialized JSON response to a StringResponse object.
      Parameters:
      serialized - a JSON object string containing the response
      Returns:
      the deserialized response