T - output type.public class BaseSkillResponse<T> extends Object implements SkillResponse<T>
SkillResponse and provides utility methods to check existence of response, fetch
response and raw response.| Constructor and Description |
|---|
BaseSkillResponse(JsonMarshaller<T> marshaller,
T response)
Constructor to build an instance of BaseSkillResponse.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getRawResponse()
Returns the skill's response as a byte array.
|
T |
getResponse()
Returns the skill's response.
|
boolean |
isPresent()
Returns true if a response was produced by the skill.
|
void |
writeTo(OutputStream outputStream)
Writes the skill's response to an
OutputStream. |
public BaseSkillResponse(JsonMarshaller<T> marshaller, T response)
marshaller - JSON marshaller.response - response of type T.public boolean isPresent()
isPresent in interface SkillResponse<T>public T getResponse()
getResponse in interface SkillResponse<T>public byte[] getRawResponse()
getRawResponse in interface SkillResponse<T>public void writeTo(OutputStream outputStream)
OutputStream..writeTo in interface SkillResponse<T>outputStream - stream to write toCopyright © 2023. All rights reserved.