public interface Output<T extends Output<T>>
This is the base interface for all output interfaces. It exposes basic methods for grouping and sending messages.
| Modifier and Type | Method and Description |
|---|---|
T |
drainHandler(org.vertx.java.core.Handler<Void> handler)
Sets a drain handler on the output.
|
int |
getSendQueueMaxSize()
Returns the send queue max size.
|
T |
group(String name,
org.vertx.java.core.Handler<OutputGroup> handler)
Creates a named output group.
|
T |
send(Boolean message)
Sends a message on the output.
|
T |
send(org.vertx.java.core.buffer.Buffer message)
Sends a message on the output.
|
T |
send(Byte message)
Sends a message on the output.
|
T |
send(byte[] message)
Sends a message on the output.
|
T |
send(Character message)
Sends a message on the output.
|
T |
send(Double message)
Sends a message on the output.
|
T |
send(Float message)
Sends a message on the output.
|
T |
send(Integer message)
Sends a message on the output.
|
T |
send(org.vertx.java.core.json.JsonArray message)
Sends a message on the output.
|
T |
send(org.vertx.java.core.json.JsonObject message)
Sends a message on the output.
|
T |
send(Long message)
Sends a message on the output.
|
T |
send(Object message)
Sends a message on the output.
|
T |
send(Short message)
Sends a message on the output.
|
T |
send(String message)
Sends a message on the output.
|
boolean |
sendQueueFull()
Returns a boolean indicating whether the send queue is full.
|
T |
setSendQueueMaxSize(int maxSize)
Sets the send queue max size.
|
int |
size()
Returns the current connection send queue size.
|
org.vertx.java.core.Vertx |
vertx()
Returns the output's Vertx instance.
|
org.vertx.java.core.Vertx vertx()
int size()
T setSendQueueMaxSize(int maxSize)
maxSize - The send queue max size.int getSendQueueMaxSize()
boolean sendQueueFull()
T drainHandler(org.vertx.java.core.Handler<Void> handler)
When the output's send queue becomes full, the output will be temporarily paused while its output queue is empty. Once the queue size decreases back to 50% of the maximum queue size the drain handler will be called so that normal operation can resume.
handler - A handler to be called when the stream is prepared to accept
new messages.T send(Object message)
message - The message to send.T send(String message)
message - The message to send.T send(Short message)
message - The message to send.T send(Integer message)
message - The message to send.T send(Long message)
message - The message to send.T send(Float message)
message - The message to send.T send(Double message)
message - The message to send.T send(Boolean message)
message - The message to send.T send(Byte message)
message - The message to send.T send(byte[] message)
message - The message to send.T send(Character message)
message - The message to send.T send(org.vertx.java.core.buffer.Buffer message)
message - The message to send.T send(org.vertx.java.core.json.JsonArray message)
message - The message to send.T send(org.vertx.java.core.json.JsonObject message)
message - The message to send.T group(String name, org.vertx.java.core.Handler<OutputGroup> handler)
When creating an output group, the output will synchronize with any inputs to which it is connected prior to calling the group handler. This means that once the group handler has been called, messages sent to the group will be immediately sent to any output connections rather than queueing messages.
name - The output group name.handler - A handler to be called once the output group is created.Copyright © 2013-2014. All Rights Reserved.