stub: avoid mocking stub classes

This commit is contained in:
Carl Mastrangelo 2017-10-05 11:01:57 -07:00 committed by GitHub
parent f56be5423e
commit 765a40c7e6
4 changed files with 8 additions and 0 deletions

View File

@ -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;

View File

@ -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> {
/**

View File

@ -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

View File

@ -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> {
/**