public class OkHttpClientHandler extends Object implements net.morimekta.providence.PServiceCallHandler
| Constructor and Description |
|---|
OkHttpClientHandler(Supplier<URL> urlSupplier)
Create a HTTP client with default transport, serialization and no instrumentation.
|
OkHttpClientHandler(Supplier<URL> urlSupplier,
okhttp3.OkHttpClient factory)
Create a HTTP client with default serialization and no instrumentation.
|
OkHttpClientHandler(Supplier<URL> urlSupplier,
okhttp3.OkHttpClient factory,
net.morimekta.providence.serializer.SerializerProvider serializerProvider)
Create a HTTP client with no instrumentation.
|
OkHttpClientHandler(Supplier<URL> urlSupplier,
okhttp3.OkHttpClient factory,
net.morimekta.providence.serializer.SerializerProvider serializerProvider,
net.morimekta.providence.PServiceCallInstrumentation instrumentation)
Create a HTTP client.
|
| Modifier and Type | Method and Description |
|---|---|
<Request extends net.morimekta.providence.PMessage<Request>,Response extends net.morimekta.providence.PMessage<Response>> |
handleCall(net.morimekta.providence.PServiceCall<Request> call,
net.morimekta.providence.descriptor.PService service) |
public OkHttpClientHandler(@Nonnull Supplier<URL> urlSupplier)
urlSupplier - The HTTP url supplier.public OkHttpClientHandler(@Nonnull Supplier<URL> urlSupplier, @Nonnull okhttp3.OkHttpClient factory)
urlSupplier - The HTTP url supplier.factory - The HTTP request factory.public OkHttpClientHandler(@Nonnull Supplier<URL> urlSupplier, @Nonnull okhttp3.OkHttpClient factory, @Nonnull net.morimekta.providence.serializer.SerializerProvider serializerProvider)
urlSupplier - The HTTP url supplier.factory - The HTTP request factory.serializerProvider - The serializer provider.public OkHttpClientHandler(@Nonnull Supplier<URL> urlSupplier, @Nonnull okhttp3.OkHttpClient factory, @Nonnull net.morimekta.providence.serializer.SerializerProvider serializerProvider, @Nonnull net.morimekta.providence.PServiceCallInstrumentation instrumentation)
urlSupplier - The HTTP url supplier.factory - The HTTP request factory.serializerProvider - The serializer provider.instrumentation - The service call instrumentation.public <Request extends net.morimekta.providence.PMessage<Request>,Response extends net.morimekta.providence.PMessage<Response>> net.morimekta.providence.PServiceCall<Response> handleCall(net.morimekta.providence.PServiceCall<Request> call,
net.morimekta.providence.descriptor.PService service)
throws IOException
handleCall in interface net.morimekta.providence.PServiceCallHandlerIOExceptionCopyright © 2015–2020 morimekta.net. All rights reserved.