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 java.lang.Object implements ServerTransportListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classServerImpl.ServerTransportListenerImpl.ServerCallParameters<ReqT,RespT>
-
Field Summary
Fields Modifier and Type Field Description private Attributesattributesprivate java.util.concurrent.Future<?>handshakeTimeoutFutureprivate ServerTransporttransport
-
Constructor Summary
Constructors Constructor Description ServerTransportListenerImpl(ServerTransport transport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Context.CancellableContextcreateContext(Metadata headers, StatsTraceContext statsTraceCtx)voidinit()private <WReqT,WRespT>
ServerStreamListenerstartWrappedCall(java.lang.String fullMethodName, ServerImpl.ServerTransportListenerImpl.ServerCallParameters<WReqT,WRespT> params, Metadata headers)voidstreamCreated(ServerStream stream, java.lang.String methodName, Metadata headers)Called when a new stream was created by the remote client.private voidstreamCreatedInternal(ServerStream stream, java.lang.String methodName, Metadata headers, io.perfmark.Tag tag)AttributestransportReady(Attributes attributes)The transport has finished all handshakes and is ready to process streams.voidtransportTerminated()The transport completed shutting down.private <ReqT,RespT>
ServerMethodDefinition<?,?>wrapMethod(ServerStream stream, ServerMethodDefinition<ReqT,RespT> methodDef, StatsTraceContext statsTraceCtx)Never returnsnull.
-
-
-
Field Detail
-
transport
private final ServerTransport transport
-
handshakeTimeoutFuture
private java.util.concurrent.Future<?> handshakeTimeoutFuture
-
attributes
private Attributes attributes
-
-
Constructor Detail
-
ServerTransportListenerImpl
ServerTransportListenerImpl(ServerTransport transport)
-
-
Method Detail
-
init
public void init()
-
transportReady
public Attributes transportReady(Attributes attributes)
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
public void streamCreated(ServerStream stream, java.lang.String methodName, Metadata headers)
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, java.lang.String methodName, Metadata headers, io.perfmark.Tag tag)
-
createContext
private Context.CancellableContext createContext(Metadata headers, StatsTraceContext statsTraceCtx)
-
wrapMethod
private <ReqT,RespT> ServerMethodDefinition<?,?> wrapMethod(ServerStream stream, ServerMethodDefinition<ReqT,RespT> methodDef, StatsTraceContext statsTraceCtx)
Never returnsnull.
-
startWrappedCall
private <WReqT,WRespT> ServerStreamListener startWrappedCall(java.lang.String fullMethodName, ServerImpl.ServerTransportListenerImpl.ServerCallParameters<WReqT,WRespT> params, Metadata headers)
-
-