public class DefaultConnectionInputGroup extends Object implements ConnectionInputGroup
This input group is created directly by a DefaultInputConnection when
the connection receives a new group message.
| Constructor and Description |
|---|
DefaultConnectionInputGroup(String id,
String name,
DefaultInputConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
InputGroup |
endHandler(org.vertx.java.core.Handler<Void> handler)
Registers an end handler on the group.
|
InputGroup |
groupHandler(String group,
org.vertx.java.core.Handler<InputGroup> handler)
Registers a group handler.
|
String |
id()
Returns the unique group identifier.
|
InputGroup |
messageHandler(org.vertx.java.core.Handler handler)
Registers a message handler on the input.
|
String |
name()
Returns the group name.
|
InputGroup |
pause()
Pauses the input.
|
InputGroup |
resume()
Resumes receiving data on the input.
|
InputGroup |
startHandler(org.vertx.java.core.Handler<Void> handler)
Registers a start handler on the group.
|
org.vertx.java.core.Vertx |
vertx()
Returns the input's vertx instance.
|
public DefaultConnectionInputGroup(String id, String name, DefaultInputConnection connection)
public String id()
Groupid in interface Group<InputGroup>public String name()
Groupname in interface Group<InputGroup>public org.vertx.java.core.Vertx vertx()
Inputvertx in interface Input<InputGroup>public InputGroup pause()
InputWhen the input is paused, messages received by the input will be buffered, so it is important that inputs not be paused for too long if messages continue to flow.
pause in interface Input<InputGroup>public InputGroup resume()
InputWhen the input is resumed, any messages that were buffered during the pause will be processed first. Once the input's buffer is empty it will resume normal operation.
resume in interface Input<InputGroup>public InputGroup messageHandler(org.vertx.java.core.Handler handler)
InputThe message handler can accept any message type that is supported by the Vert.x event bus. Vertigo messages cannot be replied to and do not need to be acked. The input handles communicating and coordinating with outputs internally.
messageHandler in interface Input<InputGroup>handler - A message handler.public InputGroup groupHandler(String group, org.vertx.java.core.Handler<InputGroup> handler)
InputGroupSupportgroupHandler in interface InputGroupSupport<InputGroup>group - The name of the group for which to register the handler.handler - The handler to register. This handler will be called
whenever a group of the given name is started.public InputGroup startHandler(org.vertx.java.core.Handler<Void> handler)
InputGroupstartHandler in interface InputGrouphandler - A handler to be called when the group is started.public InputGroup endHandler(org.vertx.java.core.Handler<Void> handler)
InputGroupendHandler in interface InputGrouphandler - A handler to be called when the group is ended.Copyright © 2013-2014. All Rights Reserved.