Search in sources :

Example 56 with MqttClient

use of org.eclipse.paho.client.mqttv3.MqttClient in project pinpoint by naver.

the class PahoMqttV3ClientIT method before.

@BeforeClass
public static void before() throws MqttException {
    container.start();
    mqttClient = new MqttAsyncClient(container.getBrokerUrl(), UUID.randomUUID().toString(), new MemoryPersistence());
    IMqttToken token = mqttClient.connect();
    token.waitForCompletion(WAIT_FOR_COMPLETION);
    subscribe();
}
Also used : MemoryPersistence(org.eclipse.paho.client.mqttv3.persist.MemoryPersistence) IMqttToken(org.eclipse.paho.client.mqttv3.IMqttToken) MqttAsyncClient(org.eclipse.paho.client.mqttv3.MqttAsyncClient) BeforeClass(org.junit.BeforeClass)

Aggregations

MqttClient (org.eclipse.paho.client.mqttv3.MqttClient)46 MqttException (org.eclipse.paho.client.mqttv3.MqttException)37 MqttConnectOptions (org.eclipse.paho.client.mqttv3.MqttConnectOptions)23 MemoryPersistence (org.eclipse.paho.client.mqttv3.persist.MemoryPersistence)23 MqttMessage (org.eclipse.paho.client.mqttv3.MqttMessage)18 Test (org.junit.Test)12 Properties (java.util.Properties)6 IMqttClient (org.eclipse.paho.client.mqttv3.IMqttClient)6 MqttDefaultFilePersistence (org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence)5 IOException (java.io.IOException)4 IMqttDeliveryToken (org.eclipse.paho.client.mqttv3.IMqttDeliveryToken)4 MqttCallback (org.eclipse.paho.client.mqttv3.MqttCallback)4 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)4 JsonArray (com.google.gson.JsonArray)3 JsonElement (com.google.gson.JsonElement)3 JsonObject (com.google.gson.JsonObject)3 SSLSecurityManager (it.unibo.arces.wot.sepa.commons.protocol.SSLSecurityManager)3 KeyManagementException (java.security.KeyManagementException)3 KeyStoreException (java.security.KeyStoreException)3 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)3