T - The input type.public interface Input<T extends Input<T>>
| Modifier and Type | Method and Description |
|---|---|
T |
groupHandler(String group,
org.vertx.java.core.Handler<InputGroup> handler)
Registers a group handler on the input.
|
T |
messageHandler(org.vertx.java.core.Handler handler)
Registers a message handler on the input.
|
T |
pause()
Pauses the input.
|
T |
resume()
Resumes receiving data on the input.
|
org.vertx.java.core.Vertx |
vertx()
Returns the input's vertx instance.
|
org.vertx.java.core.Vertx vertx()
T pause()
When 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.
T resume()
When 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.
T messageHandler(org.vertx.java.core.Handler handler)
The 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.
handler - A message handler.T groupHandler(String group, org.vertx.java.core.Handler<InputGroup> handler)
The group handler will be called any time a group with the given name is received on the input on which the handler was registered. That means if the handler was registered on a port, the handler will only be called for a group that is received by the port. Alternatively, if the handler was registered on a group then the handler will only be called for a group that was received by the group on which the handler was registered. This means that group handlers are inherently hierarchical, and its important that users take care in how handlers are registered.
group - The name of the group for which to register the handler.handler - A handler to be called when the group is received.Copyright © 2013-2014. All Rights Reserved.