Package io.grpc.internal
Class ServerImpl.ServerTransportListenerImpl
java.lang.Object
io.grpc.internal.ServerImpl.ServerTransportListenerImpl
- All Implemented Interfaces:
ServerTransportListener
- Enclosing class:
ServerImpl
private final class ServerImpl.ServerTransportListenerImpl
extends Object
implements ServerTransportListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Attributesprivate Future<?> private final ServerTransport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Context.CancellableContextcreateContext(Metadata headers, StatsTraceContext statsTraceCtx) voidinit()private <WReqT,WRespT>
ServerStreamListenerstartWrappedCall(String fullMethodName, ServerImpl.ServerTransportListenerImpl.ServerCallParameters<WReqT, WRespT> params, Metadata headers) voidstreamCreated(ServerStream stream, String methodName, Metadata headers) Called when a new stream was created by the remote client.private voidstreamCreatedInternal(ServerStream stream, String methodName, Metadata headers, io.perfmark.Tag tag) transportReady(Attributes attributes) The transport has finished all handshakes and is ready to process streams.voidThe transport completed shutting down.private <ReqT,RespT>
ServerMethodDefinition<?, ?> wrapMethod(ServerStream stream, ServerMethodDefinition<ReqT, RespT> methodDef, StatsTraceContext statsTraceCtx) Never returnsnull.
-
Field Details
-
transport
-
handshakeTimeoutFuture
-
attributes
-
-
Constructor Details
-
ServerTransportListenerImpl
ServerTransportListenerImpl(ServerTransport transport)
-
-
Method Details
-
init
public void init() -
transportReady
Description copied from interface:ServerTransportListenerThe transport has finished all handshakes and is ready to process streams.- Specified by:
transportReadyin interfaceServerTransportListener- Parameters:
attributes- transport attributes- Returns:
- the effective transport attributes that is used as the basis of call attributes
-
transportTerminated
public void transportTerminated()Description copied from interface:ServerTransportListenerThe transport completed shutting down. All resources have been released.- Specified by:
transportTerminatedin interfaceServerTransportListener
-
streamCreated
Description copied from interface:ServerTransportListenerCalled when a new stream was created by the remote client.- Specified by:
streamCreatedin interfaceServerTransportListener- Parameters:
stream- the newly created stream.methodName- the fully qualified method name being called on the server.headers- containing metadata for the call.
-
streamCreatedInternal
private void streamCreatedInternal(ServerStream stream, String methodName, Metadata headers, io.perfmark.Tag tag) -
createContext
-
wrapMethod
private <ReqT,RespT> ServerMethodDefinition<?,?> wrapMethod(ServerStream stream, ServerMethodDefinition<ReqT, RespT> methodDef, StatsTraceContext statsTraceCtx) Never returnsnull. -
startWrappedCall
private <WReqT,WRespT> ServerStreamListener startWrappedCall(String fullMethodName, ServerImpl.ServerTransportListenerImpl.ServerCallParameters<WReqT, WRespT> params, Metadata headers)
-