use of edu.snu.mist.core.shared.MQTTSharedResource in project mist by snuspl.
the class MQTTSourceTest method setUp.
@Before
public void setUp() throws InjectionException, IOException {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
jcb.bindNamedParameter(TaskHostname.class, "127.0.0.1");
final Injector injector = Tang.Factory.getTang().newInjector(jcb.build());
mqttSharedResource = injector.getInstance(MQTTSharedResource.class);
// create local mqtt broker
mqttBroker = MqttUtils.createMqttBroker();
}
use of edu.snu.mist.core.shared.MQTTSharedResource in project mist by snuspl.
the class MqttSinkTest method setUp.
@Before
public void setUp() throws IOException, InjectionException, MqttException {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
jcb.bindNamedParameter(TaskHostname.class, "127.0.0.1");
final Injector injector = Tang.Factory.getTang().newInjector(jcb.build());
mqttSharedResource = injector.getInstance(MQTTSharedResource.class);
broker = MqttUtils.createMqttBroker();
subscriber = new MqttClient(MqttUtils.BROKER_URI, "mqttClient");
}
Aggregations