Class StringResponse
- 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 Summary
Constructors Constructor Description StringResponse()
Constructs a new StringResponse object.StringResponse(String payload)
Constructs a new StringResponse object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringResponse
fromJson(String serialized)
Converts a serialized JSON response to a StringResponse object.String
getPayload()
Gets the payload of the response.void
setPayload(String playload)
Sets the payload of the response.
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-