java.src.com.exactpro.th2.read.db.grpc.ReadDbDefaultAsyncImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-read-db Show documentation
Show all versions of grpc-read-db Show documentation
gRPC API for executing requests in read-db application
package com.exactpro.th2.read.db.grpc;
import com.exactpro.th2.service.AbstractGrpcService;
import com.exactpro.th2.service.RetryPolicy;
import com.exactpro.th2.service.StubStorage;
import com.google.protobuf.Empty;
import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.stub.StreamObserver;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
public class ReadDbDefaultAsyncImpl extends AbstractGrpcService implements AsyncReadDbService {
public ReadDbDefaultAsyncImpl() {
super();
}
public ReadDbDefaultAsyncImpl(RetryPolicy retryConfiguration,
StubStorage serviceConfiguration) {
super(retryConfiguration, serviceConfiguration);
}
public void execute(QueryRequest input, Map properties,
StreamObserver observer) {
com.exactpro.th2.read.db.grpc.ReadDbGrpc.ReadDbStub stub = getStub(input, properties);
createAsyncRequest(observer, (newObserver) -> stub.execute(input, newObserver));
}
public void execute(QueryRequest input, StreamObserver observer) {
execute(input, java.util.Collections.EMPTY_MAP, observer);
}
public void startPulling(DbPullRequest input, Map properties,
StreamObserver observer) {
com.exactpro.th2.read.db.grpc.ReadDbGrpc.ReadDbStub stub = getStub(input, properties);
createAsyncRequest(observer, (newObserver) -> stub.startPulling(input, newObserver));
}
public void startPulling(DbPullRequest input, StreamObserver observer) {
startPulling(input, java.util.Collections.EMPTY_MAP, observer);
}
public void stopPulling(StopPullingRequest input, Map properties,
StreamObserver observer) {
com.exactpro.th2.read.db.grpc.ReadDbGrpc.ReadDbStub stub = getStub(input, properties);
createAsyncRequest(observer, (newObserver) -> stub.stopPulling(input, newObserver));
}
public void stopPulling(StopPullingRequest input, StreamObserver observer) {
stopPulling(input, java.util.Collections.EMPTY_MAP, observer);
}
@Override
protected ReadDbGrpc.ReadDbStub createStub(Channel channel, CallOptions callOptions) {
return com.exactpro.th2.read.db.grpc.ReadDbGrpc.newStub(channel);
}
}