All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kie.kogito.examples.sw.greeting.GreeterClient Maven / Gradle / Ivy

The newest version!
package org.kie.kogito.examples.sw.greeting;

import java.util.function.BiFunction;
import io.quarkus.grpc.MutinyClient;

@jakarta.annotation.Generated(value = "by Mutiny Grpc generator", comments = "Source: greeting.proto")
public class GreeterClient implements Greeter, MutinyClient {

    private final MutinyGreeterGrpc.MutinyGreeterStub stub;

    public GreeterClient(String name, io.grpc.Channel channel, BiFunction stubConfigurator) {
        this.stub = stubConfigurator.apply(name, MutinyGreeterGrpc.newMutinyStub(channel));
    }

    private GreeterClient(MutinyGreeterGrpc.MutinyGreeterStub stub) {
        this.stub = stub;
    }

    public GreeterClient newInstanceWithStub(MutinyGreeterGrpc.MutinyGreeterStub stub) {
        return new GreeterClient(stub);
    }

    @Override
    public MutinyGreeterGrpc.MutinyGreeterStub getStub() {
        return stub;
    }

    @Override
    public io.smallrye.mutiny.Uni sayHello(org.kie.kogito.examples.sw.greeting.HelloRequest request) {
        return stub.sayHello(request);
    }

    @Override
    public io.smallrye.mutiny.Uni doNothing(com.google.protobuf.Empty request) {
        return stub.doNothing(request);
    }

    @Override
    public io.smallrye.mutiny.Uni sayHelloArray(org.kie.kogito.examples.sw.greeting.HelloArrayRequest request) {
        return stub.sayHelloArray(request);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy