-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class OkHttpRequestFactory extends RequestFactory implements Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classOkHttpRequestFactory.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Map<String, KClass<out ThrowableProblem>>registeredProblemTypesprivate final MediaTypeEncodersmediaTypeEncodersprivate final MediaTypeDecodersmediaTypeDecoders
-
Constructor Summary
Constructors Constructor Description OkHttpRequestFactory(URITemplate baseURI, OkHttpClient httpClient, OkHttpClient eventHttpClient, MediaTypeEncoders mediaTypeEncoders, MediaTypeDecoders mediaTypeDecoders)
-
Method Summary
Modifier and Type Method Description Map<String, KClass<out ThrowableProblem>>getRegisteredProblemTypes()MediaTypeEncodersgetMediaTypeEncoders()MediaTypeDecodersgetMediaTypeDecoders()UnitregisterProblem(String typeId, KClass<out ThrowableProblem> problemType)<B extends Any> Requestrequest(Method method, String pathTemplate, Map<String, Object> pathParameters, Map<String, Object> queryParameters, B body, List<MediaType> contentTypes, List<MediaType> acceptTypes, Map<String, Object> headers, RequestFactory.RequestPurpose purpose)Responseresponse(Request request)<B extends Any, R extends Any> ResultResponse<R>resultResponse(Method method, String pathTemplate, Map<String, Object> pathParameters, Map<String, Object> queryParameters, B body, List<MediaType> contentTypes, List<MediaType> acceptTypes, Map<String, Object> headers, KType resultType)Unitclose()Unitclose(Boolean cancelOutstandingRequests)-
Methods inherited from class io.outfoxx.sunday.RequestFactory
eventSource, eventSource, eventStream, eventStream, request, response, response, result, result, result, resultResponse, resultResponse -
Methods inherited from class kotlin.Any
equals, hashCode, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getRegisteredProblemTypes
Map<String, KClass<out ThrowableProblem>> getRegisteredProblemTypes()
-
getMediaTypeEncoders
MediaTypeEncoders getMediaTypeEncoders()
-
getMediaTypeDecoders
MediaTypeDecoders getMediaTypeDecoders()
-
registerProblem
Unit registerProblem(String typeId, KClass<out ThrowableProblem> problemType)
-
request
<B extends Any> Request request(Method method, String pathTemplate, Map<String, Object> pathParameters, Map<String, Object> queryParameters, B body, List<MediaType> contentTypes, List<MediaType> acceptTypes, Map<String, Object> headers, RequestFactory.RequestPurpose purpose)
-
response
Response response(Request request)
-
resultResponse
<B extends Any, R extends Any> ResultResponse<R> resultResponse(Method method, String pathTemplate, Map<String, Object> pathParameters, Map<String, Object> queryParameters, B body, List<MediaType> contentTypes, List<MediaType> acceptTypes, Map<String, Object> headers, KType resultType)
-
-
-
-