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 interfaceMetadataApplierImpl.MetadataApplierListener
-
Field Summary
Fields Modifier and Type Field Description private CallOptionscallOptionsprivate Contextctx(package private) DelayedStreamdelayedStream(package private) booleanfinalizedprivate MetadataApplierImpl.MetadataApplierListenerlistenerprivate java.lang.Objectlockprivate MethodDescriptor<?,?>methodprivate MetadataorigHeadersprivate ClientStreamreturnedStreamprivate ClientStreamTracer[]tracersprivate ClientTransporttransport
-
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 voidapply(Metadata headers)Called when headers are successfully generated.voidfail(Status status)Called when there has been an error when preparing the headers.private voidfinalizeWith(ClientStream stream)(package private) ClientStreamreturnStream()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.MetadataApplierCalled when headers are successfully generated. They will be merged into the original headers.- Specified by:
applyin classCallCredentials.MetadataApplier
-
fail
public void fail(Status status)
Description copied from class:CallCredentials.MetadataApplierCalled when there has been an error when preparing the headers. This will fail the RPC.- Specified by:
failin classCallCredentials.MetadataApplier
-
finalizeWith
private void finalizeWith(ClientStream stream)
-
returnStream
ClientStream returnStream()
Return a stream on which the RPC will run on.
-
-