mirror of https://github.com/grpc/grpc-java.git
stub: avoid mocking stub classes
This commit is contained in:
parent
f56be5423e
commit
765a40c7e6
|
|
@ -18,6 +18,7 @@ package io.grpc.stub;
|
|||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.errorprone.annotations.DoNotMock;
|
||||
import io.grpc.CallCredentials;
|
||||
import io.grpc.CallOptions;
|
||||
import io.grpc.Channel;
|
||||
|
|
@ -42,6 +43,7 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* @param <S> the concrete type of this stub.
|
||||
*/
|
||||
@ThreadSafe
|
||||
@DoNotMock
|
||||
public abstract class AbstractStub<S extends AbstractStub<S>> {
|
||||
private final Channel channel;
|
||||
private final CallOptions callOptions;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package io.grpc.stub;
|
||||
|
||||
import com.google.errorprone.annotations.DoNotMock;
|
||||
import io.grpc.ExperimentalApi;
|
||||
|
||||
/**
|
||||
|
|
@ -36,6 +37,7 @@ import io.grpc.ExperimentalApi;
|
|||
*
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1788")
|
||||
@DoNotMock
|
||||
public abstract class CallStreamObserver<V> implements StreamObserver<V> {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package io.grpc.stub;
|
||||
|
||||
import com.google.errorprone.annotations.DoNotMock;
|
||||
import io.grpc.ExperimentalApi;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
|
@ -25,6 +26,7 @@ import javax.annotation.Nullable;
|
|||
* client calls.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1788")
|
||||
@DoNotMock
|
||||
public abstract class ClientCallStreamObserver<V> extends CallStreamObserver<V> {
|
||||
/**
|
||||
* Prevent any further processing for this {@code ClientCallStreamObserver}. No further messages
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package io.grpc.stub;
|
||||
|
||||
import com.google.errorprone.annotations.DoNotMock;
|
||||
import io.grpc.ExperimentalApi;
|
||||
|
||||
/**
|
||||
|
|
@ -23,6 +24,7 @@ import io.grpc.ExperimentalApi;
|
|||
* cancellation events on the server side.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1788")
|
||||
@DoNotMock
|
||||
public abstract class ServerCallStreamObserver<V> extends CallStreamObserver<V> {
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue