Package io.grpc.servlet
Class ServletServerStream
java.lang.Object
io.grpc.internal.AbstractStream
io.grpc.internal.AbstractServerStream
io.grpc.servlet.ServletServerStream
- All Implemented Interfaces:
MessageFramer.Sink
,ServerStream
,Stream
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private final class
(package private) final class
private final class
private static final class
Nested classes/interfaces inherited from class io.grpc.internal.AbstractServerStream
AbstractServerStream.TransportState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javax.servlet.AsyncContext
private final Attributes
private final String
private static final Logger
private final InternalLogId
private final javax.servlet.http.HttpServletResponse
private final ServletServerStream.Sink
private final ServletServerStream.ServletTransportState
private final AsyncServletOutputStreamWriter
-
Constructor Summary
ConstructorsConstructorDescriptionServletServerStream
(javax.servlet.AsyncContext asyncCtx, StatsTraceContext statsTraceCtx, int maxInboundMessageSize, Attributes attributes, String authority, InternalLogId logId) -
Method Summary
Modifier and TypeMethodDescriptionprotected ServletServerStream.Sink
Sink for transport to be called to perform outbound operations.Attributes describing stream.Gets the authority this stream is addressed to.int
streamId()
The HTTP/2 stream id, or-1
if not supported.(package private) static String
toHexString
(byte[] bytes, int length) Obtain the transport state corresponding to this stream.private void
writeHeadersToServletResponse
(Metadata metadata) Methods inherited from class io.grpc.internal.AbstractServerStream
cancel, close, deliverFrame, framer, isReady, setDecompressor, setListener, setOnReadyThreshold, statsTraceContext, writeHeaders
Methods inherited from class io.grpc.internal.AbstractStream
endOfMessages, flush, onSendingBytes, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, writeMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.grpc.internal.Stream
flush, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, writeMessage
-
Field Details
-
logger
-
transportState
-
sink
-
asyncCtx
private final javax.servlet.AsyncContext asyncCtx -
resp
private final javax.servlet.http.HttpServletResponse resp -
attributes
-
authority
-
logId
-
writer
-
-
Constructor Details
-
ServletServerStream
ServletServerStream(javax.servlet.AsyncContext asyncCtx, StatsTraceContext statsTraceCtx, int maxInboundMessageSize, Attributes attributes, String authority, InternalLogId logId) throws IOException - Throws:
IOException
-
-
Method Details
-
transportState
Description copied from class:AbstractStream
Obtain the transport state corresponding to this stream. Each stream must have its own unique transport state.- Specified by:
transportState
in classAbstractServerStream
-
getAttributes
Description copied from interface:ServerStream
Attributes describing stream. This is inherited from the transport attributes, and used as the basis ofServerCall.getAttributes()
.- Specified by:
getAttributes
in interfaceServerStream
- Overrides:
getAttributes
in classAbstractServerStream
- Returns:
- Attributes container
-
getAuthority
Description copied from interface:ServerStream
Gets the authority this stream is addressed to.- Specified by:
getAuthority
in interfaceServerStream
- Overrides:
getAuthority
in classAbstractServerStream
- Returns:
- the authority string.
null
if not available.
-
streamId
public int streamId()Description copied from interface:ServerStream
The HTTP/2 stream id, or-1
if not supported. -
abstractServerStreamSink
Description copied from class:AbstractServerStream
Sink for transport to be called to perform outbound operations. Each stream must have its own unique sink.- Specified by:
abstractServerStreamSink
in classAbstractServerStream
-
writeHeadersToServletResponse
-
toHexString
-