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 class
ServerImpl.ServerTransportListenerImpl.ServerCallParameters<ReqT,RespT>
-
Field Summary
Fields Modifier and Type Field Description private Attributes
attributes
private java.util.concurrent.Future<?>
handshakeTimeoutFuture
private ServerTransport
transport
-
Constructor Summary
Constructors Constructor Description ServerTransportListenerImpl(ServerTransport transport)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Context.CancellableContext
createContext(Metadata headers, StatsTraceContext statsTraceCtx)
void
init()
private <WReqT,WRespT>
ServerStreamListenerstartWrappedCall(java.lang.String fullMethodName, ServerImpl.ServerTransportListenerImpl.ServerCallParameters<WReqT,WRespT> params, Metadata headers)
void
streamCreated(ServerStream stream, java.lang.String methodName, Metadata headers)
Called when a new stream was created by the remote client.private void
streamCreatedInternal(ServerStream stream, java.lang.String methodName, Metadata headers, io.perfmark.Tag tag)
Attributes
transportReady(Attributes attributes)
The transport has finished all handshakes and is ready to process streams.void
transportTerminated()
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:ServerTransportListener
The transport has finished all handshakes and is ready to process streams.- Specified by:
transportReady
in 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:ServerTransportListener
The transport completed shutting down. All resources have been released.- Specified by:
transportTerminated
in interfaceServerTransportListener
-
streamCreated
public void streamCreated(ServerStream stream, java.lang.String methodName, Metadata headers)
Description copied from interface:ServerTransportListener
Called when a new stream was created by the remote client.- Specified by:
streamCreated
in 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)
-
-