| Constructor and Description |
|---|
DefaultInputPort(org.vertx.java.core.Vertx vertx,
InputPortContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
void |
close(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Closes the stream.
|
InputPort |
groupHandler(String group,
org.vertx.java.core.Handler<InputGroup> handler)
Registers a group handler on the input.
|
InputPort |
messageHandler(org.vertx.java.core.Handler handler)
Registers a message handler on the input.
|
String |
name()
Returns the port name.
|
InputPort |
open()
Opens the stream.
|
InputPort |
open(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Opens the stream.
|
InputPort |
pause()
Pauses the input.
|
InputPort |
resume()
Resumes receiving data on the input.
|
void |
update(InputPortContext update) |
org.vertx.java.core.Vertx |
vertx()
Returns the input's vertx instance.
|
public DefaultInputPort(org.vertx.java.core.Vertx vertx,
InputPortContext context)
public org.vertx.java.core.Vertx vertx()
Inputpublic void update(InputPortContext update)
update in interface Observer<InputPortContext>public InputPort 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.
public InputPort 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.
public InputPort 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<InputPort>handler - A message handler.public InputPort groupHandler(String group, org.vertx.java.core.Handler<InputGroup> handler)
InputThe 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.
groupHandler in interface Input<InputPort>group - The name of the group for which to register the handler.handler - A handler to be called when the group is received.public InputPort open(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Openablepublic void close()
CloseableCopyright © 2013-2014. All Rights Reserved.