public interface HttpResponseParser<MessageFormatT>Interface for classes that parse parts of HTTP responses into the parameterized message type.
Type Parameter |
|
|---|---|
| Name | Description |
MessageFormatT |
|
Methods
parse(InputStream httpContent)
public abstract MessageFormatT parse(InputStream httpContent)Parse the http body content JSON stream into the MessageFormatT.
| Parameter | |
|---|---|
| Name | Description |
httpContent |
InputStreamthe body of an HTTP response |
| Returns | |
|---|---|
| Type | Description |
MessageFormatT |
|
parse(InputStream httpContent, TypeRegistry registry)
public abstract MessageFormatT parse(InputStream httpContent, TypeRegistry registry)Parse the http body content JSON stream into the MessageFormatT.
| Parameters | |
|---|---|
| Name | Description |
httpContent |
InputStreamthe body of an HTTP response, represented as an InputStream |
registry |
TypeRegistrytype registry with Any fields descriptors |
| Returns | |
|---|---|
| Type | Description |
MessageFormatT |
|
parse(Reader httpContent, TypeRegistry registry)
public abstract MessageFormatT parse(Reader httpContent, TypeRegistry registry)Parse the http body content JSON reader into the MessageFormatT.
| Parameters | |
|---|---|
| Name | Description |
httpContent |
Readerthe body of an HTTP response, represented as a Reader |
registry |
TypeRegistrytype registry with Any fields descriptors |
| Returns | |
|---|---|
| Type | Description |
MessageFormatT |
|
serialize(MessageFormatT response)
public abstract String serialize(MessageFormatT response)Serialize an object into an HTTP body, which is written out to output.
| Parameter | |
|---|---|
| Name | Description |
response |
MessageFormatTthe object to serialize |
| Returns | |
|---|---|
| Type | Description |
String |
|