@Override
    public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> definition(DefinitionParams params) {
        return CompletableFutures.computeAsync((cancelChecker) -> {
    
            try {
    
                return Either.forLeft(SchemaDefinition.getDefinition(eventContextCreator.createContext(params)));
    
            } catch (InvalidContextException ex) {
                // ignore
            } catch (CancellationException ignore) {
                // Ignore
            } catch (Exception e) {
                logger.error(e);
            }
    
            return Either.forLeft(new ArrayList<Location>());
        });
    }
SchemaTextDocumentService handles incomming requests from the client.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/SchemaTextDocumentService.java