Class StringResponse
java.lang.Object
org.palladiosimulator.protocom.framework.java.ee.protocol.Response
org.palladiosimulator.protocom.framework.java.ee.protocol.StringResponse
A StringResponse object represents an HTTP response with a string payload.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs a new StringResponse object.StringResponse
(String payload) Constructs a new StringResponse object. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringResponse
Converts a serialized JSON response to a StringResponse object.Gets the payload of the response.void
setPayload
(String playload) Sets the payload of the response.
-
Constructor Details
-
StringResponse
public StringResponse()Constructs a new StringResponse object. -
StringResponse
Constructs a new StringResponse object.- Parameters:
payload
- the payload of the response
-
-
Method Details
-
getPayload
Gets the payload of the response.- Returns:
- the payload of the response
-
setPayload
Sets the payload of the response.- Parameters:
playload
- the payload of the response
-
fromJson
Converts a serialized JSON response to a StringResponse object.- Parameters:
serialized
- a JSON object string containing the response- Returns:
- the deserialized response
-