Package kos.api
Interface KosContext
- All Known Implementing Classes:
MutableKosContext
public interface KosContext
This object is read-only representation of all sensible configuration
that have been previously defined at the Kos' application initialization.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescription<T> io.vertx.core.Future<T>computeBlocking(KosContext.SupplierThatMightFail<T> supplier) @NonNull io.vertx.core.json.JsonObject@NonNull io.vertx.config.ConfigRetriever@NonNull EventBusMessageCodecFactory@NonNull kos.core.client.RestClientSerializer@NonNull Serializerint@NonNull Validation@NonNull io.vertx.core.Vertx@NonNull io.vertx.ext.web.client.WebClient@NonNull ExceptionHandler@NonNull io.vertx.core.http.HttpServerOptionsThe default server configuration.@NonNull ImplementationLoader@NonNull PayloadSerializationStrategy@NonNull SerializergetSerializerForContentType(String contentType) @NonNull ImplementationLoadergetSpi()@NonNull StringConverterio.vertx.core.Future<Void>
-
Method Details
-
getImplementationLoader
- Returns:
- the defined
ImplementationLoader
-
getPayloadSerializationStrategy
- Returns:
- the defined
PayloadSerializationStrategy
-
getDefaultStatusForEmptyResponses
int getDefaultStatusForEmptyResponses()- Returns:
- the default HTTP Status code for empty responses. By default, it returns 204.
-
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
- 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
- Returns:
- the
StringConverterused to convert String into Objects.
-
getExceptionHandler
- Returns:
- the
ExceptionHandlerused to handle unhandled exceptions.
-
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
- 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
-
runBlocking
-
computeBlocking
-