public class MqttSource extends AbstractModuleFixture<MqttSource>
label
Constructor and Description |
---|
MqttSource(java.lang.String host) |
MqttSource(java.lang.String host,
int port) |
Modifier and Type | Method and Description |
---|---|
MqttSource |
ensureReady()
Ensure that the Mqtt broker socket is available by polling it for up to 2 seconds
|
void |
sendData(java.lang.String data)
Sends a string via Mqtt to a Rabbit Mqtt Broker.
|
protected java.lang.String |
toDSL()
Returns a representation of the module suitable for inclusion in a stream definition, e.g.
file --dir=xxxx --name=yyyy |
label, toString
public MqttSource(java.lang.String host)
public MqttSource(java.lang.String host, int port)
protected java.lang.String toDSL()
AbstractModuleFixture
file --dir=xxxx --name=yyyy
toDSL
in class AbstractModuleFixture<MqttSource>
public MqttSource ensureReady()
java.lang.IllegalStateException
- if can not connect in 2 seconds.public void sendData(java.lang.String data)
data
- String to be transmitted to the Mqtt Broker.