use of io.joynr.runtime.JoynrInjectorFactory in project joynr by bmwcarit.
the class ShutdownTest method setup.
@Before
public void setup() {
Properties factoryPropertiesProvider = new Properties();
factoryPropertiesProvider.put(AbstractJoynrApplication.PROPERTY_JOYNR_DOMAIN_LOCAL, "localdomain");
factoryPropertiesProvider.put(MessagingPropertyKeys.CHANNELID, "ShutdownTestChannelId");
MockitoAnnotations.initMocks(this);
Module runtimeModule = Modules.override(new CCInProcessRuntimeModule()).with(new TestGlobalAddressModule());
dummyApplication = (DummyJoynrApplication) new JoynrInjectorFactory(factoryPropertiesProvider, runtimeModule).createApplication(DummyJoynrApplication.class);
provider = new DefaulttestProvider();
providerQos = new ProviderQos();
providerQos.setScope(ProviderScope.LOCAL);
providerQos.setPriority(System.currentTimeMillis());
}
use of io.joynr.runtime.JoynrInjectorFactory in project joynr by bmwcarit.
the class SSLEnd2EndTest method getRuntime.
@Override
protected JoynrRuntime getRuntime(Properties joynrConfig, Module... modules) {
DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modules).createApplication(DummyJoynrApplication.class);
dummyApplications.add(application);
return application.getRuntime();
}
use of io.joynr.runtime.JoynrInjectorFactory in project joynr by bmwcarit.
the class HTTPProviderProxyEnd2EndTest method getRuntime.
@Override
protected JoynrRuntime getRuntime(Properties joynrConfig, Module... modules) {
Module runtimeModule = Modules.override(new CCInProcessRuntimeModule()).with(new AtmosphereMessagingModule());
Module modulesWithRuntime = Modules.override(modules).with(runtimeModule);
DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modulesWithRuntime).createApplication(DummyJoynrApplication.class);
return application.getRuntime();
}
use of io.joynr.runtime.JoynrInjectorFactory in project joynr by bmwcarit.
the class WebSocketProviderProxyEnd2EndTest method getRuntime.
@Override
protected JoynrRuntime getRuntime(final Properties joynrConfig, final Module... modules) {
if (ccJoynrRuntime == null) {
ccJoynrRuntime = createClusterController(webSocketConfig);
createdRuntimes.add(ccJoynrRuntime);
}
joynrConfig.putAll(webSocketConfig);
joynrConfig.putAll(baseTestConfig);
joynrConfig.setProperty(ConfigurableMessagingSettings.PROPERTY_CC_CONNECTION_TYPE, "WEBSOCKET");
Module modulesWithRuntime = Modules.override(modules).with(Modules.override(new LibjoynrWebSocketRuntimeModule()).with(new AbstractModule() {
@Override
protected void configure() {
// shorten reconnect delay to speed up tests
bind(long.class).annotatedWith(Names.named(WebsocketModule.PROPERTY_WEBSOCKET_MESSAGING_RECONNECT_DELAY)).toInstance(100L);
}
}));
DummyJoynrApplication application = (DummyJoynrApplication) new JoynrInjectorFactory(joynrConfig, modulesWithRuntime).createApplication(DummyJoynrApplication.class);
return application.getRuntime();
}
use of io.joynr.runtime.JoynrInjectorFactory in project joynr by bmwcarit.
the class AccessControllerEnd2EndTest method createRuntime.
private JoynrRuntime createRuntime() {
Properties properties = new Properties();
properties.put(MqttModule.PROPERTY_KEY_MQTT_BROKER_URI, "tcp://localhost:1883");
properties.put(MessagingPropertyKeys.PROPERTY_MESSAGING_PRIMARYGLOBALTRANSPORT, "mqtt");
Module module = Modules.override(new CCInProcessRuntimeModule()).with(new AbstractModule() {
@Override
protected void configure() {
bindConstant().annotatedWith(Names.named(ClusterControllerRuntimeModule.PROPERTY_ACCESSCONTROL_ENABLE)).to(true);
}
}, new MqttPahoModule());
DummyJoynrApplication app = (DummyJoynrApplication) new JoynrInjectorFactory(properties, module).createApplication(DummyJoynrApplication.class);
return app.getRuntime();
}
Aggregations