public class DefaultConnectionOutputGroup extends Object implements ConnectionOutputGroup
This is the output group that handles actually sending grouped messages on the connection
| Constructor and Description |
|---|
DefaultConnectionOutputGroup(String id,
String name,
DefaultOutputConnection connection) |
DefaultConnectionOutputGroup(String id,
String name,
String parent,
DefaultOutputConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
OutputGroup |
drainHandler(org.vertx.java.core.Handler<Void> handler)
Sets a drain handler on the output.
|
OutputGroup |
end()
Ends the output group.
|
int |
getSendQueueMaxSize()
Returns the send queue max size.
|
DefaultConnectionOutputGroup |
group(String name,
org.vertx.java.core.Handler<OutputGroup> handler)
Creates a named output group.
|
String |
id()
Returns the unique group identifier.
|
String |
name()
Returns the group name.
|
OutputGroup |
send(Boolean message)
Sends a message on the output.
|
OutputGroup |
send(org.vertx.java.core.buffer.Buffer message)
Sends a message on the output.
|
OutputGroup |
send(Byte message)
Sends a message on the output.
|
OutputGroup |
send(byte[] message)
Sends a message on the output.
|
OutputGroup |
send(Character message)
Sends a message on the output.
|
OutputGroup |
send(Double message)
Sends a message on the output.
|
OutputGroup |
send(Float message)
Sends a message on the output.
|
OutputGroup |
send(Integer message)
Sends a message on the output.
|
OutputGroup |
send(org.vertx.java.core.json.JsonArray message)
Sends a message on the output.
|
OutputGroup |
send(org.vertx.java.core.json.JsonObject message)
Sends a message on the output.
|
OutputGroup |
send(Long message)
Sends a message on the output.
|
OutputGroup |
send(Object message)
Sends a message on the output.
|
OutputGroup |
send(Short message)
Sends a message on the output.
|
OutputGroup |
send(String message)
Sends a message on the output.
|
boolean |
sendQueueFull()
Returns a boolean indicating whether the send queue is full.
|
OutputGroup |
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.
|
public DefaultConnectionOutputGroup(String id, String name, DefaultOutputConnection connection)
public DefaultConnectionOutputGroup(String id, String name, String parent, DefaultOutputConnection connection)
public String id()
Groupid in interface Group<OutputGroup>public String name()
Groupname in interface Group<OutputGroup>public org.vertx.java.core.Vertx vertx()
Outputvertx in interface Output<OutputGroup>public OutputGroup setSendQueueMaxSize(int maxSize)
OutputsetSendQueueMaxSize in interface Output<OutputGroup>maxSize - The send queue max size.public int getSendQueueMaxSize()
OutputgetSendQueueMaxSize in interface Output<OutputGroup>public int size()
Outputsize in interface Output<OutputGroup>public boolean sendQueueFull()
OutputsendQueueFull in interface Output<OutputGroup>public OutputGroup drainHandler(org.vertx.java.core.Handler<Void> handler)
OutputWhen 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.
drainHandler in interface Output<OutputGroup>handler - A handler to be called when the stream is prepared to accept
new messages.public DefaultConnectionOutputGroup group(String name, org.vertx.java.core.Handler<OutputGroup> handler)
OutputGroupSupportMessages sent through groups will always be sent to the same connection(s). Groups can also be nested.
group in interface OutputGroupSupport<OutputGroup>name - The output group name.handler - A handler to be called once the group has been setup.public OutputGroup send(Object message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(String message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Boolean message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Character message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Short message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Integer message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Long message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Double message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Float message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(org.vertx.java.core.buffer.Buffer message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(org.vertx.java.core.json.JsonObject message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(org.vertx.java.core.json.JsonArray message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(Byte message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup send(byte[] message)
Outputsend in interface Output<OutputGroup>message - The message to send.public OutputGroup end()
OutputGroupend in interface OutputGroupCopyright © 2013-2014. All Rights Reserved.