public class DefaultInputConnection extends Object implements InputConnection
| Constructor and Description |
|---|
DefaultInputConnection(org.vertx.java.core.Vertx vertx,
InputConnectionContext context) |
DefaultInputConnection(org.vertx.java.core.Vertx vertx,
String address) |
| Modifier and Type | Method and Description |
|---|---|
String |
address()
Returns the connection address.
|
InputConnection |
batchHandler(org.vertx.java.core.Handler<InputBatch> handler)
Registers an input batch handler.
|
void |
close()
Closes the stream.
|
void |
close(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Closes the stream.
|
InputConnection |
groupHandler(String group,
org.vertx.java.core.Handler<InputGroup> handler)
Registers a group handler.
|
InputConnection |
messageHandler(org.vertx.java.core.Handler handler)
Registers a message handler on the input.
|
InputConnection |
open()
Opens the stream.
|
InputConnection |
open(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Opens the stream.
|
InputConnection |
pause()
Pauses the input.
|
InputConnection |
resume()
Resumes receiving data on the input.
|
int |
size()
Returns the current connection size.
|
org.vertx.java.core.Vertx |
vertx()
Returns the input's vertx instance.
|
public DefaultInputConnection(org.vertx.java.core.Vertx vertx,
String address)
public DefaultInputConnection(org.vertx.java.core.Vertx vertx,
InputConnectionContext context)
public String address()
Connectionaddress in interface Connection<InputConnection>public org.vertx.java.core.Vertx vertx()
Inputvertx in interface Input<InputConnection>public int size()
Connectionsize in interface Connection<InputConnection>public InputConnection open()
Openableopen in interface Openable<InputConnection>public InputConnection open(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Openableopen in interface Openable<InputConnection>doneHandler - An asynchronous handler to be called once complete.public InputConnection 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<InputConnection>public InputConnection 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<InputConnection>public InputConnection 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<InputConnection>handler - A message handler.public InputConnection batchHandler(org.vertx.java.core.Handler<InputBatch> handler)
InputConnectionbatchHandler in interface InputConnectionbatchHandler in interface InputBatchSupport<InputConnection>handler - A handler to be called when an input batch is started.public InputConnection groupHandler(String group, org.vertx.java.core.Handler<InputGroup> handler)
InputGroupSupportgroupHandler in interface InputGroupSupport<InputConnection>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 void close()
Closeableclose in interface Closeable<InputConnection>public void close(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Void>> doneHandler)
Closeableclose in interface Closeable<InputConnection>doneHandler - An asynchronous handler to be called once complete.Copyright © 2013-2014. All Rights Reserved.