@Test @DisplayName("execute queries") void executeQueries() { Query query = Given.AQuery.readAllProjects(); service.read(query, responseObserver); checkOkResponse(responseObserver); }
@Override public void read(Query query, StreamObserver<QueryResponse> responseObserver) { _debug().log("Incoming query: `%s`.", lazy(() -> shortDebugString(query))); TypeUrl type = query.targetType(); BoundedContext context = typeToContextMap.get(type); if (context == null) { handleUnsupported(type, responseObserver); } else { handleQuery(context, query, responseObserver); } }
QueryService extends QueryServiceGrpc.QueryServiceImplBase implements Logging { @Override public void read(Query query, StreamObserver<QueryResponse> responseObserver) { _debug().log("Incoming query: `%s`.", lazy(() -> shortDebugString(query))); TypeUrl type = query.targetType(); BoundedContext context = typeToContextMap.get(type); if (context == null) { handleUnsupported(type, responseObserver); } else { handleQuery(context, query, responseObserver); } } }
QueryService extends QueryServiceGrpc.QueryServiceImplBase implements Logging { @Override public void read(Query query, StreamObserver<QueryResponse> responseObserver) { _debug().log("Incoming query: `%s`.", lazy(() -> shortDebugString(query))); TypeUrl type = query.targetType(); BoundedContext context = typeToContextMap.get(type); if (context == null) { handleUnsupported(type, responseObserver); } else { handleQuery(context, query, responseObserver); } } private  QueryService(Map<TypeUrl, BoundedContext> map); }
QueryService extends QueryServiceGrpc.QueryServiceImplBase implements Logging { @Override public void read(Query query, StreamObserver<QueryResponse> responseObserver) { _debug().log("Incoming query: `%s`.", lazy(() -> shortDebugString(query))); TypeUrl type = query.targetType(); BoundedContext context = typeToContextMap.get(type); if (context == null) { handleUnsupported(type, responseObserver); } else { handleQuery(context, query, responseObserver); } } private  QueryService(Map<TypeUrl, BoundedContext> map); static Builder newBuilder(); @Override void read(Query query, StreamObserver<QueryResponse> responseObserver); }
QueryService extends QueryServiceGrpc.QueryServiceImplBase implements Logging { @Override public void read(Query query, StreamObserver<QueryResponse> responseObserver) { _debug().log("Incoming query: `%s`.", lazy(() -> shortDebugString(query))); TypeUrl type = query.targetType(); BoundedContext context = typeToContextMap.get(type); if (context == null) { handleUnsupported(type, responseObserver); } else { handleQuery(context, query, responseObserver); } } private  QueryService(Map<TypeUrl, BoundedContext> map); static Builder newBuilder(); @Override void read(Query query, StreamObserver<QueryResponse> responseObserver);  }