Package com.microsoft.graph.http
Interface IStatefulResponseHandler<ResultType,DeserializedType>
- Type Parameters:
ResultType- the result to returnDeserializedType- 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 TypeMethodDescription<ResponseType>
ResultTypegenerateResult(IHttpRequest request, ResponseType response, ISerializer serializer, ILogger logger)Generate result after receiving response
-
Method Details
-
generateResult
@Nullable <ResponseType> ResultType generateResult(@Nonnull IHttpRequest request, @Nonnull ResponseType response, @Nonnull ISerializer serializer, @Nonnull ILogger logger) throws ExceptionGenerate result after receiving response- Type Parameters:
ResponseType- the native http client response type- Parameters:
request- the HTTP requestresponse- the HTTP connectionserializer- the serializer for parsing responselogger- the logger- Returns:
- the result generated by this handler
- Throws:
Exception- an exception occurs if the request was unable to complete for any reason
-