interface WriteStream<T : Any> : StreamBase
Represents a stream of data that can be written to.
Any class that implements this interface can be used by a io.vertx.reactivex.core.streams.Pump to pump data from a ReadStream to it.
abstract fun drainHandler(handler: Handler<Void>): WriteStream<T>
Set a drain handler on the stream. If the write queue is full, then the handler will be called when the write queue is ready to accept buffers again. See io.vertx.reactivex.core.streams.Pump for an example of this being used. The stream implementation defines when the drain handler, for example it could be when the queue size has been reduced to |
|
abstract fun end(): Unit
Ends the stream. Once the stream has ended, it cannot be used any more. abstract fun end(t: T): Unit
Same as |
|
abstract fun exceptionHandler(handler: Handler<Throwable>): WriteStream<T>
Set an exception handler on the write stream. |
|
abstract fun getDelegate(): WriteStream<Any> |
|
open static fun <T : Any> newInstance(arg: WriteStream<Any>): WriteStream<T>open static fun <T : Any> newInstance(arg: WriteStream<Any>, __typeArg_T: TypeArg<T>): WriteStream<T> |
|
abstract fun setWriteQueueMaxSize(maxSize: Int): WriteStream<T>
Set the maximum size of the write queue to |
|
abstract fun write(data: T): WriteStream<T>
Write some data to the stream. The data is 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 |
|
abstract fun writeQueueFull(): Boolean
This will return |
open class AsyncFile : ReadStream<Buffer>, WriteStream<Buffer>
Represents a file on the file-system which can be read from, or written to asynchronously. This class also implements io.vertx.reactivex.core.streams.ReadStream and io.vertx.reactivex.core.streams.WriteStream. This allows the data to be pumped to and from other streams, e.g. an io.vertx.reactivex.core.http.HttpClientRequest instance, using the io.vertx.reactivex.core.streams.Pump class NOTE: This class has been automatically generated from the io.vertx.core.file.AsyncFile non RX-ified interface using Vert.x codegen. |
|
open class HttpClientRequest : WriteStream<Buffer>, ReadStream<HttpClientResponse>
Represents a client-side HTTP request. Instances are created by an io.vertx.reactivex.core.http.HttpClient instance, via one of the methods corresponding to the specific HTTP methods, or the generic request methods. On creation the request will not have been written to the wire. Once a request has been obtained, headers can be set on it, and data can be written to its body if required. Once you are ready to send the request, one of the Nothing is actually sent until the request has been internally assigned an HTTP connection. The io.vertx.reactivex.core.http.HttpClient instance will return an instance of this class immediately, even if there are no HTTP connections available in the pool. Any requests sent before a connection is assigned will be queued internally and actually sent when an HTTP connection becomes available from the pool. The headers of the request are queued for writing either when the This class supports both chunked and non-chunked HTTP. It implements io.vertx.reactivex.core.streams.WriteStream so it can be used with io.vertx.reactivex.core.streams.Pump to pump data with flow control. An example of using this class is as follows: NOTE: This class has been automatically generated from the io.vertx.core.http.HttpClientRequest non RX-ified interface using Vert.x codegen. |
|
open class HttpServerResponse : WriteStream<Buffer>
Represents a server-side HTTP response. An instance of this is created and associated to every instance of io.vertx.reactivex.core.http.HttpServerRequest that. It allows the developer to control the HTTP response that is sent back to the client for a particular HTTP request. It contains methods that allow HTTP headers and trailers to be set, and for a body to be written out to the response. It also allows files to be streamed by the kernel directly from disk to the outgoing HTTP connection, bypassing user space altogether (where supported by the underlying operating system). This is a very efficient way of serving files from the server since buffers do not have to be read one by one from the file and written to the outgoing socket. It implements io.vertx.reactivex.core.streams.WriteStream so it can be used with io.vertx.reactivex.core.streams.Pump to pump data with flow control. NOTE: This class has been automatically generated from the io.vertx.core.http.HttpServerResponse non RX-ified interface using Vert.x codegen. |
|
open class KafkaProducer<K : Any, V : Any> : WriteStream<KafkaProducerRecord<K, V>>
Vert.x Kafka producer. The provides global control over writing a record. NOTE: This class has been automatically generated from the io.vertx.kafka.client.producer.KafkaProducer non RX-ified interface using Vert.x codegen. |
|
open class MessageProducer<T : Any> : WriteStream<T>
Represents a stream of message that can be written to. NOTE: This class has been automatically generated from the io.vertx.core.eventbus.MessageProducer non RX-ified interface using Vert.x codegen. |
|
open class NetSocket : ReadStream<Buffer>, WriteStream<Buffer>
Represents a socket-like interface to a TCP connection on either the client or the server side. Instances of this class are created on the client side by an io.vertx.reactivex.core.net.NetClient when a connection to a server is made, or on the server side by a io.vertx.reactivex.core.net.NetServer when a server accepts a connection. It implements both and so it can be used with io.vertx.reactivex.core.streams.Pump to pump data with flow control. NOTE: This class has been automatically generated from the io.vertx.core.net.NetSocket non RX-ified interface using Vert.x codegen. |
|
interface WebSocketBase : ReadStream<Buffer>, WriteStream<Buffer>
Base WebSocket implementation. It implements both and so it can be used with io.vertx.reactivex.core.streams.Pump to pump data with flow control. NOTE: This class has been automatically generated from the io.vertx.core.http.WebSocketBase non RX-ified interface using Vert.x codegen. |