Package-level declarations

Types

Link copied to clipboard

Resolves the tenant, owner and space of a request, each from where the route's RouteIdentityBinding says (static tenant, path variable, header and its aliases). Values read from the request itself (path variables, headers) are declared; an aggregate's static tenant is a server fact and authenticated. Override the *Provenance functions when a trusted component (an authenticating gateway that owns these headers, say) vouches for them.

Link copied to clipboard
class AggregationQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : HandlerFunction<ServerResponse>

Handles an aggregation query body against the snapshot or event stream QueryGateway of an aggregate.

Link copied to clipboard
class AggregationQueryHandlerFunctionFactory<G : QueryGateway<*>>(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> G, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : QueryHandlerFunctionFactorySupport<G>

Creates the aggregation handler of the route identified by handlerKey, for snapshot and event stream alike.

Link copied to clipboard

The QueryRequestScope of the query routes: the host's identity scope (tenant, owner and space, see AbstractQueryRequestScope) followed by every contributor's, each half appended to the same half. Since 9.3.0.

Link copied to clipboard
class CountQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : HandlerFunction<ServerResponse>
Link copied to clipboard
class CountQueryHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : QueryHandlerFunctionFactorySupport<QueryGateway<*>>
Link copied to clipboard
class CursorQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<CursorPage<ObjectNode>>) -> Mono<CursorPage<ObjectNode>> = { it }) : HandlerFunction<ServerResponse>
Link copied to clipboard
class CursorQueryHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<CursorPage<ObjectNode>>) -> Mono<CursorPage<ObjectNode>> = { it }) : QueryHandlerFunctionFactorySupport<QueryGateway<*>>
Link copied to clipboard
class HttpQueryGuard(defaultListSize: Int = DEFAULT_LIST_SIZE, idleTimeout: Duration = Duration.ofSeconds(10), val strictCountFilter: Boolean = false)

The HTTP adapter's side of a query: what happens to the request before the gateway and to the response after it. The HTTP budget itself (sizes, filter nodes and values, expensive operators) belongs to the gateway's entry policy, which admission checks; of binds this guard to it, so the rows the guard lets through, the list default it applies and the descriptor limits all follow the budget admission enforces.

Link copied to clipboard

delegate with identityHeaderAliases (CoSec's, say) applied also to a request whose handler was invoked outside the router; a request the router dispatched already carries its route's aliases. Since 9.3.0.

Link copied to clipboard
class ListQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Flux<ObjectNode>) -> Flux<ObjectNode>) : HandlerFunction<ServerResponse>
Link copied to clipboard
class ListQueryHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Flux<ObjectNode>) -> Flux<ObjectNode> = { it }) : QueryHandlerFunctionFactorySupport<QueryGateway<*>>
Link copied to clipboard
class PagedQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<PagedList<ObjectNode>>) -> Mono<PagedList<ObjectNode>>) : HandlerFunction<ServerResponse>
Link copied to clipboard
class PagedQueryHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<PagedList<ObjectNode>>) -> Mono<PagedList<ObjectNode>> = { it }) : QueryHandlerFunctionFactorySupport<QueryGateway<*>>
Link copied to clipboard
class QueryBodyExtractor<Q : Any>(queryType: Class<Q>, requireRootOperator: Boolean = false) : BodyExtractor<Mono<Q>, ReactiveHttpInputMessage>

Reads a query request body strictly. With requireRootOperator, a body whose root object names neither op nor the legacy operator is rejected instead of being read as a legacy condition, whose operator defaults to ALL.

Link copied to clipboard
abstract class QueryHandlerFunctionFactorySupport<G : QueryGateway<*>>(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> G, handlerFunction: (AggregateMetadata<*, *>, G) -> HandlerFunction<ServerResponse>) : AggregateRouteHandlerFunctionFactorySupport

Base factory for aggregate query routes: resolves the aggregate's gateway once per route and hands both to handlerFunction.

Link copied to clipboard
fun interface QueryRequestScope

The HTTP adapter's scope provider: the caller scope of a query route, each part tagged with where it came from. Only an authenticated part is a security boundary; see me.ahoo.wow.query.QueryEntryPolicy.requireAuthenticatedScope.

Link copied to clipboard
class QuerySchemaHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : AggregateRouteHandlerFunctionFactorySupport

Creates the GET …/schema handler of the route identified by handlerKey, for snapshot and event stream alike.

Link copied to clipboard
class QuerySchemaRefreshHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, revalidate: (AggregateMetadata<*, *>) -> Mono<Void>, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : AggregateRouteHandlerFunctionFactorySupport

POST …/snapshot/schema/refresh and POST …/event/schema/refresh, the 9.1 routes that reloaded a model's schema. 9.2 revalidates schemas through the wowQuerySchema actuator endpoint (and periodically); these routes stay so operators' scripts do not answer 404: each revalidates the route's model of the aggregate (completing once it is reloaded; concurrent calls share the reload in flight), then answers as GET …/schema. The handler key is Snapshot.SCHEMA_REFRESH or Event.SCHEMA_REFRESH.

Link copied to clipboard
fun interface ScopeContributor

Adds one dimension to the caller scope of a query route: a restriction derived from the request, tagged with its provenance by the QueryScope half it is returned in. An embedded library (the view store's application, say) adds its dimension this way beside the host's QueryRequestScope, instead of replacing it.

Link copied to clipboard
class SingleQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<ObjectNode>) -> Mono<ObjectNode>) : HandlerFunction<ServerResponse>
Link copied to clipboard
class SingleQueryHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<ObjectNode>) -> Mono<ObjectNode> = { it }) : QueryHandlerFunctionFactorySupport<QueryGateway<*>>