Package-level declarations

Types

Link copied to clipboard

Resolves the tenant, owner and space of a request. 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
class CountQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard()) : HandlerFunction<ServerResponse>
Link copied to clipboard
open 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
open 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
class ListQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Flux<ObjectNode>) -> Flux<ObjectNode>) : HandlerFunction<ServerResponse>
Link copied to clipboard
open 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
open 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 SingleQueryHandlerFunction(aggregateMetadata: AggregateMetadata<*, *>, queryGateway: QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<ObjectNode>) -> Mono<ObjectNode>) : HandlerFunction<ServerResponse>
Link copied to clipboard
open class SingleQueryHandlerFunctionFactory(handlerKey: String, queryGateway: (AggregateMetadata<*, *>) -> QueryGateway<*>, queryRequestScope: QueryRequestScope, exceptionHandler: RequestExceptionHandler, guard: HttpQueryGuard = HttpQueryGuard(), rewriteResult: (Mono<ObjectNode>) -> Mono<ObjectNode> = { it }) : QueryHandlerFunctionFactorySupport<QueryGateway<*>>