use of io.joynr.runtime.JoynrApplication in project joynr by bmwcarit.
the class ConsumerApplication method main.
public static void main(String[] args) {
try {
invocationParameters = new ConsumerInvocationParameters(args);
JoynrApplication consumerApp = createJoynrApplication();
consumerApp.run();
consumerApp.shutdown();
} catch (Exception exception) {
System.err.println(exception.getMessage());
System.exit(-1);
}
}
use of io.joynr.runtime.JoynrApplication in project joynr by bmwcarit.
the class ProviderApplication method main.
public static void main(String[] args) throws Exception {
if ((args.length != 1 && args.length != 2) || (args.length == 2 && !args[1].equals("runForever"))) {
LOG.error("\n\nUSAGE: java {} <local-domain> [runForever]\n\n NOTE: Providers are registered on the local domain.", ProviderApplication.class.getName());
return;
}
localDomain = args[0];
Properties joynrConfig = new Properties();
Module runtimeModule = getRuntimeModule(args, joynrConfig);
LOG.debug("Using the following runtime module: " + runtimeModule.getClass().getSimpleName());
LOG.debug("Registering provider on domain \"{}\"", localDomain);
joynrConfig.setProperty(MessagingPropertyKeys.PERSISTENCE_FILE, STATIC_PERSISTENCE_FILE);
joynrConfig.setProperty(PROPERTY_JOYNR_DOMAIN_LOCAL, localDomain);
Properties appConfig = new Properties();
// Use injected static provisioning of access control entries to allow access to anyone to this interface
provisionAccessControl(joynrConfig, localDomain);
JoynrApplication joynrApplication = new JoynrInjectorFactory(joynrConfig, runtimeModule, new StaticDomainAccessControlProvisioningModule()).createApplication(new JoynrApplicationModule(ProviderApplication.class, appConfig));
if (args.length == 2) {
runForever = true;
}
joynrApplication.run();
joynrApplication.shutdown();
}
use of io.joynr.runtime.JoynrApplication in project joynr by bmwcarit.
the class IltProviderApplication method main.
public static void main(String[] args) throws Exception {
if (args.length != 1 && args.length != 2) {
LOG.error("\n\nUSAGE: java {} <local-domain>\n\n NOTE: Providers are registered on the local domain.", IltProviderApplication.class.getName());
return;
}
String localDomain = args[0];
LOG.debug("Registering provider on domain \"{}\"", localDomain);
Properties joynrConfig = new Properties();
Module runtimeModule = getRuntimeModule(args, joynrConfig);
LOG.debug("Using the following runtime module: " + runtimeModule.getClass().getSimpleName());
LOG.debug("Registering provider on domain \"{}\"", localDomain);
joynrConfig.setProperty(MessagingPropertyKeys.PERSISTENCE_FILE, STATIC_PERSISTENCE_FILE);
joynrConfig.setProperty(PROPERTY_JOYNR_DOMAIN_LOCAL, localDomain);
Properties appConfig = new Properties();
// Use injected static provisioning of access control entries to allow access to anyone to this interface
provisionAccessControl(joynrConfig, localDomain);
JoynrApplication joynrApplication = new JoynrInjectorFactory(joynrConfig, runtimeModule, new StaticDomainAccessControlProvisioningModule()).createApplication(new JoynrApplicationModule(IltProviderApplication.class, appConfig));
joynrApplication.run();
joynrApplication.shutdown();
}
use of io.joynr.runtime.JoynrApplication in project joynr by bmwcarit.
the class EchoProviderApplication method createJoynrApplication.
private static JoynrApplication createJoynrApplication() throws Exception {
Module runtimeModule = Modules.override(getRuntimeModule()).with(getBackendModule());
Properties joynrConfig = createJoynrConfig();
Properties appConfig = createAppConfig();
JoynrInjectorFactory injectorFactory = new JoynrInjectorFactory(joynrConfig, runtimeModule, new StaticDomainAccessControlProvisioningModule());
JoynrApplication joynrApplication = injectorFactory.createApplication(new JoynrApplicationModule(EchoProviderApplication.class, appConfig));
return joynrApplication;
}
use of io.joynr.runtime.JoynrApplication in project joynr by bmwcarit.
the class EchoProviderApplication method main.
public static void main(String[] args) {
try {
invocationParams = new EchoProviderInvocationParameters(args);
JoynrApplication joynrApplication = createJoynrApplication();
joynrApplication.run();
joynrApplication.shutdown();
} catch (Exception exception) {
System.err.println(exception.getMessage());
System.exit(-1);
}
}
Aggregations