public class DefaultConnectionInputBatch extends Object implements ConnectionInputBatch
| Constructor and Description |
|---|
DefaultConnectionInputBatch(String id,
DefaultInputConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
InputBatch |
endHandler(org.vertx.java.core.Handler<Void> handler)
Registers an end handler on the batch.
|
InputBatch |
groupHandler(String group,
org.vertx.java.core.Handler<InputGroup> handler)
Registers a group handler.
|
String |
id()
Returns the unique batch ID.
|
InputBatch |
messageHandler(org.vertx.java.core.Handler handler)
Registers a message handler on the input.
|
InputBatch |
pause()
Pauses the input.
|
InputBatch |
resume()
Resumes receiving data on the input.
|
InputBatch |
startHandler(org.vertx.java.core.Handler<Void> handler)
Registers a start handler on the batch.
|
org.vertx.java.core.Vertx |
vertx()
Returns the input's vertx instance.
|
public DefaultConnectionInputBatch(String id, DefaultInputConnection connection)
public String id()
Batchid in interface Batch<InputBatch>public org.vertx.java.core.Vertx vertx()
Inputvertx in interface Input<InputBatch>public InputBatch 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<InputBatch>public InputBatch 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<InputBatch>public InputBatch startHandler(org.vertx.java.core.Handler<Void> handler)
InputBatchstartHandler in interface InputBatchhandler - A handler to be called when the batch is started.public InputBatch 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<InputBatch>handler - A message handler.public InputBatch groupHandler(String group, org.vertx.java.core.Handler<InputGroup> handler)
InputGroupSupportgroupHandler in interface InputGroupSupport<InputBatch>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 InputBatch endHandler(org.vertx.java.core.Handler<Void> handler)
InputBatchendHandler in interface InputBatchhandler - A handler to be called when the batch is ended.Copyright © 2013-2014. All Rights Reserved.