IStatefulResponseHandler<ResultType,DeserializedType> Interface

Type Parameters

ResultType

the result to return

DeserializedType

the deserialize type for serializer

public interface IStatefulResponseHandler<ResultType,DeserializedType>

The handler interface for requests having stateful response from server. The handler will custom the HTTP connection if needed and generate request result based on the server HTTP response.

Method Summary

Modifier and Type Method and Description
abstract ResultType generateResult(IHttpRequest request, ResponseType response, ISerializer serializer, ILogger logger)

Generate result after receiving response

Method Details

generateResult

public abstract ResultType generateResult(IHttpRequest request, ResponseType response, ISerializer serializer, ILogger logger)

Generate result after receiving response

Parameters:

request - the HTTP request
response - the HTTP connection
serializer - the serializer for parsing response
logger - the logger

Returns:

the result generated by this handler

Throws:

java.lang.Exception - an exception occurs if the request was unable to complete for any reason

Applies to