@Override public PrimitiveState getState() { return session.getState(); }
/** * Invokes a function on the underlying proxy. * * @param operation the operation to perform on the proxy * @param <T> the operation return type * @return the future result */ <T> CompletableFuture<T> apply(Function<S, T> operation) { operation.apply(proxy); return handler.getResultFuture(); } }
/** * Invokes a void method on the underlying proxy. * * @param operation the operation to perform on the proxy * @return the resulting void future */ CompletableFuture<Void> accept(Consumer<S> operation) { operation.accept(proxy); return handler.getResultFuture(); }