public static interface ServiceExporter.Builder
| Modifier and Type | Method and Description |
|---|---|
ServiceExporter |
build() |
ServiceExporter.Builder |
deserializer(java.lang.String contentType,
io.teris.kite.Deserializer deserializer)
Binds a content type specific deserializer used to deserialize data received in
response from the server based on the content type of the response.
|
ServiceExporter.Builder |
deserializers(java.util.Map<java.lang.String,io.teris.kite.Deserializer> deserializerMap)
Binds a collection of deserializers used to deserialize data received in response
from the server based on the content type of the response.
|
ServiceExporter.Builder |
executors(java.util.concurrent.ExecutorService executors)
Binds an executor service to asynchronously execute long synchronous service calls.
|
<S> ServiceExporter.Builder |
export(java.lang.Class<S> serviceClass,
S service)
Binds an implementation of a service and registers all dispatching routes.
|
ServiceExporter.Builder |
preprocessor(java.util.function.BiFunction<io.teris.kite.Context,java.util.Map.Entry<java.lang.String,byte[]>,java.util.concurrent.CompletableFuture<io.teris.kite.Context>> preprocessor)
Binds a preprocessor executed for each service method before dispatching to the
concrete implementation.
|
ServiceExporter.Builder |
uidGenerator(java.util.function.Supplier<java.lang.String> uidGenerator) |
@Nonnull ServiceExporter.Builder deserializer(@Nonnull java.lang.String contentType, @Nonnull io.teris.kite.Deserializer deserializer)
@Nonnull ServiceExporter.Builder deserializers(@Nonnull java.util.Map<java.lang.String,io.teris.kite.Deserializer> deserializerMap)
@Nonnull ServiceExporter.Builder executors(@Nonnull java.util.concurrent.ExecutorService executors)
@Nonnull ServiceExporter.Builder uidGenerator(@Nonnull java.util.function.Supplier<java.lang.String> uidGenerator)
@Nonnull ServiceExporter.Builder preprocessor(java.util.function.BiFunction<io.teris.kite.Context,java.util.Map.Entry<java.lang.String,byte[]>,java.util.concurrent.CompletableFuture<io.teris.kite.Context>> preprocessor)
@Nonnull <S> ServiceExporter.Builder export(@Nonnull java.lang.Class<S> serviceClass, @Nonnull S service) throws InvocationException
InvocationException@Nonnull ServiceExporter build()