Class GrpcClientContext
- java.lang.Object
-
- com.google.apphosting.runtime.grpc.GrpcClientContext
-
- All Implemented Interfaces:
AnyRpcClientContext
public class GrpcClientContext extends Object implements AnyRpcClientContext
AnAnyRpcClientContextthat will record the details of a gRPC call.
-
-
Constructor Summary
Constructors Constructor Description GrpcClientContext(Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ReqT,RespT>
voidcall(io.grpc.Channel channel, io.grpc.MethodDescriptor<ReqT,RespT> method, ReqT request, io.grpc.stub.StreamObserver<RespT> responseObserver)intgetApplicationError()StringgetErrorDetail()ThrowablegetException()longgetStartTimeMillis()com.google.apphosting.base.protos.Status.StatusProtogetStatus()voidsetDeadline(double seconds)Set the deadline that will be applied to the RPC call made using this context.voidstartCancel()
-
-
-
Constructor Detail
-
GrpcClientContext
public GrpcClientContext(Clock clock)
-
-
Method Detail
-
call
public <ReqT,RespT> void call(io.grpc.Channel channel, io.grpc.MethodDescriptor<ReqT,RespT> method, ReqT request, io.grpc.stub.StreamObserver<RespT> responseObserver)
-
getStartTimeMillis
public long getStartTimeMillis()
- Specified by:
getStartTimeMillisin interfaceAnyRpcClientContext
-
getException
public Throwable getException()
- Specified by:
getExceptionin interfaceAnyRpcClientContext
-
getApplicationError
public int getApplicationError()
- Specified by:
getApplicationErrorin interfaceAnyRpcClientContext
-
getErrorDetail
public String getErrorDetail()
- Specified by:
getErrorDetailin interfaceAnyRpcClientContext
-
getStatus
public com.google.apphosting.base.protos.Status.StatusProto getStatus()
- Specified by:
getStatusin interfaceAnyRpcClientContext
-
setDeadline
public void setDeadline(double seconds)
Description copied from interface:AnyRpcClientContextSet the deadline that will be applied to the RPC call made using this context. If this method is never called, there is no deadline.- Specified by:
setDeadlinein interfaceAnyRpcClientContext
-
startCancel
public void startCancel()
- Specified by:
startCancelin interfaceAnyRpcClientContext
-
-