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 classprivate final class(package private) final classprivate final classprivate static final classNested classes/interfaces inherited from class AbstractServerStream
AbstractServerStream.TransportState -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javax.servlet.AsyncContextprivate final Attributesprivate final Stringprivate static final Loggerprivate final InternalLogIdprivate final javax.servlet.http.HttpServletResponseprivate final ServletServerStream.Sinkprivate final ServletServerStream.ServletTransportStateprivate 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.SinkSink for transport to be called to perform outbound operations.Attributes describing stream.Gets the authority this stream is addressed to.intstreamId()The HTTP/2 stream id, or-1if not supported.(package private) static StringtoHexString(byte[] bytes, int length) Obtain the transport state corresponding to this stream.private voidwriteHeadersToServletResponse(Metadata metadata) Methods inherited from class AbstractServerStream
cancel, close, deliverFrame, framer, isReady, setDecompressor, setListener, setOnReadyThreshold, statsTraceContext, writeHeadersMethods inherited from class AbstractStream
endOfMessages, flush, onSendingBytes, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, writeMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:AbstractStreamObtain the transport state corresponding to this stream. Each stream must have its own unique transport state.- Specified by:
transportStatein classAbstractServerStream
-
getAttributes
Description copied from interface:ServerStreamAttributes describing stream. This is inherited from the transport attributes, and used as the basis ofServerCall.getAttributes().- Specified by:
getAttributesin interfaceServerStream- Overrides:
getAttributesin classAbstractServerStream- Returns:
- Attributes container
-
getAuthority
Description copied from interface:ServerStreamGets the authority this stream is addressed to.- Specified by:
getAuthorityin interfaceServerStream- Overrides:
getAuthorityin classAbstractServerStream- Returns:
- the authority string.
nullif not available.
-
streamId
public int streamId()Description copied from interface:ServerStreamThe HTTP/2 stream id, or-1if not supported. -
abstractServerStreamSink
Description copied from class:AbstractServerStreamSink for transport to be called to perform outbound operations. Each stream must have its own unique sink.- Specified by:
abstractServerStreamSinkin classAbstractServerStream
-
writeHeadersToServletResponse
-
toHexString
-