Interface | Description |
---|---|
Application |
An application is a sub-unit of a client, focused on handling data
|
Application.Builder | |
BinaryPayloadCodec |
A codec for BLOB based payload transports
|
Client |
A client connection
|
Client.Builder | |
Data |
An interface for control data
|
ErrorHandler<X extends Throwable> | |
MessageErrorHandler | |
MessageHandler | |
Module | |
ModuleContext | |
Sender<X extends Throwable> |
An interface to publish data
|
Transport |
A control interface on the underlying client transport
|
Transport.TransportEvents |
Class | Description |
---|---|
Credentials | |
Credentials.UserAndPassword | |
Errors | |
Payload |
Payload data
|
Payload.Builder | |
Topic |
A topic
|
Provides easy access to Eclipse Kapua, acting as a gateway device.
try (Client client = KuraMqttProfile.newProfile(FuseClient.Builder::new) .accountName("kapua-sys") .clientId("foo-bar-1") .brokerUrl("tcp://localhost:1883") .credentials(userAndPassword("kapua-broker", "kapua-password")) .build()) { try (Application application = client.buildApplication("app1").build()) { // subscribe to a topic application.data(Topic.of("my", "receiver")).subscribe(message->
{ System.out.format("Received: %s%n", message); }); // cache sender instanceSender<RuntimeException>
sender = application .data(Topic.of("my", "sender")) .errors(ignore()); int i = 0; while (true) { // send sender.send(Payload.of("counter", i++)); Thread.sleep(1000); } } }
Copyright © 2017. All rights reserved.