Package io.grpc.internal
Class MetadataApplierImpl
- java.lang.Object
-
- io.grpc.CallCredentials.MetadataApplier
-
- io.grpc.internal.MetadataApplierImpl
-
final class MetadataApplierImpl extends CallCredentials.MetadataApplier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MetadataApplierImpl.MetadataApplierListener
-
Field Summary
Fields Modifier and Type Field Description private CallOptions
callOptions
private Context
ctx
(package private) DelayedStream
delayedStream
(package private) boolean
finalized
private MetadataApplierImpl.MetadataApplierListener
listener
private java.lang.Object
lock
private MethodDescriptor<?,?>
method
private Metadata
origHeaders
private ClientStream
returnedStream
private ClientStreamTracer[]
tracers
private ClientTransport
transport
-
Constructor Summary
Constructors Constructor Description MetadataApplierImpl(ClientTransport transport, MethodDescriptor<?,?> method, Metadata origHeaders, CallOptions callOptions, MetadataApplierImpl.MetadataApplierListener listener, ClientStreamTracer[] tracers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(Metadata headers)
Called when headers are successfully generated.void
fail(Status status)
Called when there has been an error when preparing the headers.private void
finalizeWith(ClientStream stream)
(package private) ClientStream
returnStream()
Return a stream on which the RPC will run on.
-
-
-
Field Detail
-
transport
private final ClientTransport transport
-
method
private final MethodDescriptor<?,?> method
-
origHeaders
private final Metadata origHeaders
-
callOptions
private final CallOptions callOptions
-
ctx
private final Context ctx
-
listener
private final MetadataApplierImpl.MetadataApplierListener listener
-
tracers
private final ClientStreamTracer[] tracers
-
lock
private final java.lang.Object lock
-
returnedStream
@Nullable private ClientStream returnedStream
-
finalized
boolean finalized
-
delayedStream
DelayedStream delayedStream
-
-
Constructor Detail
-
MetadataApplierImpl
MetadataApplierImpl(ClientTransport transport, MethodDescriptor<?,?> method, Metadata origHeaders, CallOptions callOptions, MetadataApplierImpl.MetadataApplierListener listener, ClientStreamTracer[] tracers)
-
-
Method Detail
-
apply
public void apply(Metadata headers)
Description copied from class:CallCredentials.MetadataApplier
Called when headers are successfully generated. They will be merged into the original headers.- Specified by:
apply
in classCallCredentials.MetadataApplier
-
fail
public void fail(Status status)
Description copied from class:CallCredentials.MetadataApplier
Called when there has been an error when preparing the headers. This will fail the RPC.- Specified by:
fail
in classCallCredentials.MetadataApplier
-
finalizeWith
private void finalizeWith(ClientStream stream)
-
returnStream
ClientStream returnStream()
Return a stream on which the RPC will run on.
-
-