public final class QueryService
extends io.spine.client.grpc.QueryServiceGrpc.QueryServiceImplBase
implements io.spine.logging.Logging
QueryService
provides a synchronous way to fetch read-side state from the server.
For asynchronous read-side updates please see SubscriptionService
.
Modifier and Type | Class and Description |
---|---|
static class |
QueryService.Builder
The builder for a
QueryService . |
Modifier and Type | Method and Description |
---|---|
static QueryService.Builder |
newBuilder()
Creates a new builder for the service.
|
void |
read(io.spine.client.Query query,
io.grpc.stub.StreamObserver<io.spine.client.QueryResponse> responseObserver)
Executes the passed query returning results to the passed observer.
|
static QueryService |
withSingle(BoundedContext context)
Builds the service with a single Bounded Context.
|
public static QueryService.Builder newBuilder()
public static QueryService withSingle(BoundedContext context)
public void read(io.spine.client.Query query, io.grpc.stub.StreamObserver<io.spine.client.QueryResponse> responseObserver)
read
in class io.spine.client.grpc.QueryServiceGrpc.QueryServiceImplBase