public class UpgradeOutputSink extends Object
StreamOutputSink
implementation, which is used when upgrading
HTTP -> HTTP/2 connections.Constructor and Description |
---|
UpgradeOutputSink(Http2Connection connection) |
Modifier and Type | Method and Description |
---|---|
boolean |
canWrite() |
void |
close()
Closes the output sink by adding last DataFrame with the FIN flag to a queue.
|
void |
flush(CompletionHandler<Http2Stream> completionHandler)
Flush
Http2Stream output and notify CompletionHandler once
all output data has been flushed. |
int |
getUnflushedWritesCount() |
boolean |
isClosed() |
void |
notifyWritePossible(WriteHandler writeHandler) |
void |
onPeerWindowUpdate(int delta)
The method is called by HTTP2 Filter once WINDOW_UPDATE message comes
for this
Http2Stream . |
void |
terminate(Http2Stream.Termination termination)
Unlike
close() this method forces the output sink termination
by setting termination flag and canceling all the pending writes. |
<E> void |
writeDownStream(HttpPacket httpPacket,
FilterChainContext ctx,
CompletionHandler<WriteResult> completionHandler,
MessageCloner<Buffer> messageCloner) |
void |
writeDownStream(Source source,
FilterChainContext ctx) |
public UpgradeOutputSink(Http2Connection connection)
public boolean canWrite()
public void notifyWritePossible(WriteHandler writeHandler)
public void onPeerWindowUpdate(int delta) throws Http2StreamException
Http2Stream
.delta
- the delta.Http2StreamException
public <E> void writeDownStream(HttpPacket httpPacket, FilterChainContext ctx, CompletionHandler<WriteResult> completionHandler, MessageCloner<Buffer> messageCloner) throws IOException
IOException
public void writeDownStream(Source source, FilterChainContext ctx) throws IOException
IOException
public void flush(CompletionHandler<Http2Stream> completionHandler)
Http2Stream
output and notify CompletionHandler
once
all output data has been flushed.completionHandler
- CompletionHandler
to be notifiedpublic int getUnflushedWritesCount()
public void close()
public void terminate(Http2Stream.Termination termination)
close()
this method forces the output sink termination
by setting termination flag and canceling all the pending writes.public boolean isClosed()
Copyright © 2019 Oracle Corporation. All rights reserved.