Package kos.api
Interface KosContext
-
- All Known Implementing Classes:
MutableKosContext
public interface KosContextThis object is read-only representation of all sensible configuration that have been previously defined at the Kos' application initialization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceKosContext.RunnerThatMightFailstatic interfaceKosContext.SupplierThatMightFail<T>
-
Method Summary
-
-
-
Method Detail
-
getImplementationLoader
@NonNull @NonNull ImplementationLoader getImplementationLoader()
- Returns:
- the defined
ImplementationLoader
-
getPayloadSerializationStrategy
@NonNull @NonNull PayloadSerializationStrategy getPayloadSerializationStrategy()
- Returns:
- the defined
PayloadSerializationStrategy
-
getDefaultStatusForEmptyResponses
int getDefaultStatusForEmptyResponses()
- Returns:
- the default HTTP Status code for empty responses. By default, it returns 204.
-
getDefaultSerializer
@NonNull @NonNull Serializer getDefaultSerializer()
- Returns:
- the default
Serializerused in case the expectedContent-Type(defined by theAcceptheader) was not provided in the request.
-
getDefaultRestClientSerializer
@NonNull @NonNull kos.core.client.RestClientSerializer getDefaultRestClientSerializer()
- Returns:
- the default
RestClientSerializerused to serialize Request Payloads used by Kos' Rest Clients.
-
getDefaultEventBusCodecFactory
@NonNull @NonNull EventBusMessageCodecFactory getDefaultEventBusCodecFactory()
- Returns:
- the default
RestClientSerializerused to serialize Request Payloads used by Kos' Rest Clients.
-
getDefaultVertx
@NonNull @NonNull io.vertx.core.Vertx getDefaultVertx()
- Returns:
- the
Vertxinstance used by the whole application.
-
getDefaultVertxWebClient
@NonNull @NonNull io.vertx.ext.web.client.WebClient getDefaultVertxWebClient()
- Returns:
- the
WebClientinstance used by the Rest Clients.
-
getStringConverter
@NonNull @NonNull StringConverter getStringConverter()
- Returns:
- the
StringConverterused to convert String into Objects.
-
getExceptionHandler
@NonNull @NonNull ExceptionHandler getExceptionHandler()
- Returns:
- the
ExceptionHandlerused to handle unhandled exceptions.
-
getDefaultValidation
@NonNull @NonNull Validation getDefaultValidation()
- Returns:
- the default
Validationused to assess classes subject to validation.
-
getConfigRetriever
@NonNull @NonNull io.vertx.config.ConfigRetriever getConfigRetriever()
- Returns:
- the default
ConfigRetrieverused to read the Vert.x configuration.
-
getApplicationConfig
@NonNull @NonNull io.vertx.core.json.JsonObject getApplicationConfig()
- Returns:
- the read Vert.x configuration object.
-
getSerializerForContentType
@NonNull @NonNull Serializer getSerializerForContentType(String contentType)
- Returns:
- the
Serializerconfigured for a givencontentType.
-
getHttpServerOptions
@NonNull @NonNull io.vertx.core.http.HttpServerOptions getHttpServerOptions()
The default server configuration. It will be triggered when the auto-discovery mechanism failed to find one in the classpath.
-
getSpi
@NonNull @NonNull ImplementationLoader getSpi()
-
runBlocking
io.vertx.core.Future<Void> runBlocking(KosContext.RunnerThatMightFail runner)
-
computeBlocking
<T> io.vertx.core.Future<T> computeBlocking(KosContext.SupplierThatMightFail<T> supplier)
-
-