Top Methods
io.vertx.core.http.impl

public Interface HttpClientStream

extends WriteStream<Buffer>
Known Direct Implementers
io.vertx.core.http.impl.Http2ClientConnection.StreamImpl, io.vertx.core.http.impl.Http2UpgradeClientConnection.DelegatingStream, io.vertx.core.http.impl.Http2UpgradeClientConnection.UpgradingStream, io.vertx.core.http.impl.Http1xClientConnection.StreamImpl
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.vertx.core.AsyncResult, .Future, .Handler, .MultiMap, io.vertx.core.buffer.Buffer, io.vertx.core.http.HttpFrame, .HttpVersion, .StreamPriority, io.vertx.core.impl.ContextInternal, io.vertx.core.impl.future.PromiseInternal, io.vertx.core.streams.WriteStream

Author
Julien Viet

Method Summary

Modifier and TypeMethod and Description
public void
public void
public HttpClientConnection
public void
public void
doFetch(long amount)

public void
public void
public void
public default Future<Void>
end(Buffer
the data to write
data
)

Overrides default io.vertx.core.streams.WriteStream.end.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Same as end() but writes some data to the stream before ending.

public default void
end(Buffer data, Handler<AsyncResult<Void>> handler)

Overrides default io.vertx.core.streams.WriteStream.end.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Same as end(T) but with an handler called when the operation completes

public default Future<Void>
end()

Overrides default io.vertx.core.streams.WriteStream.end.

Ends the stream.

public default void
end(Handler<AsyncResult<Void>> handler)

Overrides default io.vertx.core.streams.WriteStream.end.

Implements io.vertx.core.streams.WriteStream.end.

Same as end() but with an handler called when the operation completes

public void
public ContextInternal
public void
public int

Returns:

the stream id, 1 denotes the first stream, HTTP/1 is a simple sequence, HTTP/2 is the actual stream identifier.
id
()

public boolean
public Object
public StreamPriority
public void
public void
public void
public Object
public void
public void
public HttpVersion

Returns:

the stream version or null if it's not yet determined
version
()

public default Future<Void>
write(Buffer
the data to write
data
)

Implements io.vertx.core.streams.WriteStream.write.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Write some data to the stream.

public default void
write(Buffer data, Handler<AsyncResult<Void>> handler)

Implements io.vertx.core.streams.WriteStream.write.

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Same as write(T) but with an handler called when the operation completes

public void
writeBuffer(ByteBuf buf, boolean end, Handler<AsyncResult<Void>> listener)

public void
writeFrame(int type, int flags, ByteBuf payload)

public void
writeHead(HttpRequestHead request, boolean chunked, ByteBuf buf, boolean end, StreamPriority priority, boolean connect, Handler<AsyncResult<Void>> handler)

Inherited from io.vertx.core.streams.WriteStream:
drainHandlerexceptionHandlersetWriteQueueMaxSizewriteQueueFull

Method Detail

chunkHandlerback to summary
public void chunkHandler(Handler<Buffer> handler)
closeHandlerback to summary
public void closeHandler(Handler<Void> handler)
connectionback to summary
public HttpClientConnection connection()
continueHandlerback to summary
public void continueHandler(Handler<Void> handler)
doFetchback to summary
public void doFetch(long amount)
doPauseback to summary
public void doPause()
doSetWriteQueueMaxSizeback to summary
public void doSetWriteQueueMaxSize(int size)
earlyHintsHandlerback to summary
public void earlyHintsHandler(Handler<MultiMap> handler)
endback to summary
public default Future<Void> end(Buffer data)

Overrides default io.vertx.core.streams.WriteStream.end.

Doc from io.vertx.core.streams.WriteStream.end.

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Same as end() but writes some data to the stream before ending.

Parameters
data:Buffer

the data to write

Returns:Future<Void>

a future completed with the result

Annotations
@Override
endback to summary
public default void end(Buffer data, Handler<AsyncResult<Void>> handler)

Overrides default io.vertx.core.streams.WriteStream.end.

Doc from io.vertx.core.streams.WriteStream.end.

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Same as end(T) but with an handler called when the operation completes

Annotations
@Override
endback to summary
public default Future<Void> end()

Overrides default io.vertx.core.streams.WriteStream.end.

Doc from io.vertx.core.streams.WriteStream.end.

Ends the stream.

Once the stream has ended, it cannot be used any more.

Returns:Future<Void>

a future completed with the result

Annotations
@Override
endback to summary
public default void end(Handler<AsyncResult<Void>> handler)

Overrides default io.vertx.core.streams.WriteStream.end.

Implements io.vertx.core.streams.WriteStream.end.

Doc from io.vertx.core.streams.WriteStream.end.

Same as end() but with an handler called when the operation completes

Annotations
@Override
endHandlerback to summary
public void endHandler(Handler<MultiMap> handler)
getContextback to summary
public ContextInternal getContext()
headHandlerback to summary
public void headHandler(Handler<HttpResponseHead> handler)
idback to summary
public int id()
Returns:int

the stream id, 1 denotes the first stream, HTTP/1 is a simple sequence, HTTP/2 is the actual stream identifier.

isNotWritableback to summary
public boolean isNotWritable()
metricback to summary
public Object metric()
priorityback to summary
public StreamPriority priority()
priorityHandlerback to summary
public void priorityHandler(Handler<StreamPriority> handler)
pushHandlerback to summary
public void pushHandler(Handler<HttpClientPush> handler)
resetback to summary
public void reset(Throwable cause)
traceback to summary
public Object trace()
unknownFrameHandlerback to summary
public void unknownFrameHandler(Handler<HttpFrame> handler)
updatePriorityback to summary
public void updatePriority(StreamPriority streamPriority)
versionback to summary
public HttpVersion version()
Returns:HttpVersion

the stream version or null if it's not yet determined

writeback to summary
public default Future<Void> write(Buffer data)

Implements io.vertx.core.streams.WriteStream.write.

Doc from io.vertx.core.streams.WriteStream.write.

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Write some data to the stream.

The data is usually put on an internal write queue, and the write actually happens asynchronously. To avoid running out of memory by putting too much on the write queue, check the writeQueueFull method before writing. This is done automatically if using a Pipe.

When the data is moved from the queue to the actual medium, the returned Future will be completed with the write result, e.g the future is succeeded when a server HTTP response buffer is written to the socket and failed if the remote client has closed the socket while the data was still pending for write.

Parameters
data:Buffer

the data to write

Returns:Future<Void>

a future completed with the write result

Annotations
@Override
writeback to summary
public default void write(Buffer data, Handler<AsyncResult<Void>> handler)

Implements io.vertx.core.streams.WriteStream.write.

Doc from io.vertx.core.streams.WriteStream.write.

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Same as write(T) but with an handler called when the operation completes

Annotations
@Override
writeBufferback to summary
public void writeBuffer(ByteBuf buf, boolean end, Handler<AsyncResult<Void>> listener)
writeFrameback to summary
public void writeFrame(int type, int flags, ByteBuf payload)
writeHeadback to summary
public void writeHead(HttpRequestHead request, boolean chunked, ByteBuf buf, boolean end, StreamPriority priority, boolean connect, Handler<AsyncResult<Void>> handler)