Skip to content

KsqlServerEndpoints

KsqlServerEndpoints is an Endpoints.

Creating Instance

KsqlServerEndpoints takes the following to be created:

KsqlServerEndpoints is created when:

ClusterStatusResource

KsqlServerEndpoints can be given a ClusterStatusResource when created.

If given, the ClusterStatusResource is used in executeClusterStatus.

KsqlEngine

KsqlServerEndpoints is given a KsqlEngine when created.

The KsqlEngine is used when:

KsqlResource

KsqlServerEndpoints is given a KsqlResource when created.

KsqlResource is used when:

StreamedQueryResource

KsqlServerEndpoints is given a StreamedQueryResource when created.

The StreamedQueryResource is used to executeQueryRequest.

Creating InsertsStreamSubscriber

CompletableFuture<InsertsStreamSubscriber> createInsertsSubscriber(
  String target,
  JsonObject properties,
  Subscriber<InsertResult> acksSubscriber,
  Context context,
  WorkerExecutor workerExecutor,
  ApiSecurityContext apiSecurityContext)

createInsertsSubscriber is part of the Endpoints abstraction.


createInsertsSubscriber executes the following on the given WorkerExecutor:

Creating QueryPublisher

CompletableFuture<QueryPublisher> createQueryPublisher(
  String sql,
  Map<String, Object> properties,
  Map<String, Object> sessionVariables,
  Map<String, Object> requestProperties,
  Context context,
  WorkerExecutor workerExecutor,
  ApiSecurityContext apiSecurityContext,
  MetricsCallbackHolder metricsCallbackHolder,
  Optional<Boolean> isInternalRequest)

createQueryPublisher is part of the Endpoints abstraction.


createQueryPublisher executes the following on the given WorkerExecutor:

executeIsValidProperty

CompletableFuture<EndpointResponse> executeIsValidProperty(
  String property,
  WorkerExecutor workerExecutor,
  ApiSecurityContext apiSecurityContext)

executeIsValidProperty is part of the Endpoints abstraction.


executeIsValidProperty requests the KsqlResource to isValidProperty.

executeKsqlRequest

CompletableFuture<EndpointResponse> executeKsqlRequest(
  KsqlRequest request,
  WorkerExecutor workerExecutor,
  ApiSecurityContext apiSecurityContext)

executeKsqlRequest is part of the Endpoints abstraction.


executeKsqlRequest requests the KsqlResource to handle statements.

executeQueryRequest

CompletableFuture<EndpointResponse> executeQueryRequest(
  KsqlRequest request,
  WorkerExecutor workerExecutor,
  CompletableFuture<Void> connectionClosedFuture,
  ApiSecurityContext apiSecurityContext,
  Optional<Boolean> isInternalRequest,
  KsqlMediaType mediaType,
  MetricsCallbackHolder metricsCallbackHolder,
  Context context)

executeQueryRequest is part of the Endpoints abstraction.


executeQueryRequest requests the StreamedQueryResource to streamQuery.

executeTerminate

CompletableFuture<EndpointResponse> executeTerminate(
  ClusterTerminateRequest request,
  WorkerExecutor workerExecutor,
  ApiSecurityContext apiSecurityContext)

executeTerminate is part of the Endpoints abstraction.


executeTerminate requests the KsqlResource to terminateCluster.

executeWebsocketStream

void executeWebsocketStream(
  ServerWebSocket webSocket,
  MultiMap requestParams,
  WorkerExecutor workerExecutor,
  ApiSecurityContext apiSecurityContext,
  Context context)

executeWebsocketStream is part of the Endpoints abstraction.


executeWebsocketStream requests the WSQueryEndpoint to executeStreamQuery.

executeClusterStatus

CompletableFuture<EndpointResponse> executeClusterStatus(
  ApiSecurityContext apiSecurityContext)

executeClusterStatus is part of the Endpoints abstraction.


executeClusterStatus requests the ClusterStatusResource to checkClusterStatus.

In case ClusterStatusResource is not defined, executeClusterStatus returns NOT_FOUND HTTP response back.