public class DefaultJoynrRuntimeFactory extends Object implements JoynrRuntimeFactory
JoynrRuntimeFactory, which will use information produced by
JoynrProperties and JoynrLocalDomain, if available, to configure
the joynr runtime and application with.
IMPORTANT: This class requires the EE runtime to have been configured with a ManagedScheduledExecutorService resource which has been given the name 'concurrent/joynrMessagingScheduledExecutor'.
| Constructor and Description |
|---|
DefaultJoynrRuntimeFactory(javax.enterprise.inject.Instance<Properties> joynrProperties,
javax.enterprise.inject.Instance<String> joynrLocalDomain,
javax.enterprise.inject.Instance<io.joynr.messaging.RawMessagingPreprocessor> rawMessagePreprocessor,
javax.enterprise.inject.Instance<MqttClientIdProvider> mqttClientIdProvider,
javax.enterprise.inject.Instance<io.joynr.messaging.persistence.MessagePersister> messagePersister,
javax.enterprise.inject.spi.BeanManager beanManager,
io.joynr.statusmetrics.StatusReceiver statusReceiver,
MqttStatusReceiver mqttStatusReceiver)
Constructor in which the JEE runtime injects the managed resources and the JEE joynr integration specific
configuration data (see
JoynrProperties and JoynrLocalDomain
). |
| Modifier and Type | Method and Description |
|---|---|
JoynrRuntime |
create(Set<Class<?>> providerInterfaceClasses)
Call this method in order to create or obtain an instance of the joynr application this factory provides.
|
com.google.inject.Injector |
getInjector()
Provides the guice injector to be used by the joynr runtime factory
|
String |
getLocalDomain()
Provides the name of the local domain with which all providers will be registered.
|
io.joynr.messaging.persistence.MessagePersister |
getMessagePersister() |
MqttClientIdProvider |
getMqttClientIdProvider() |
io.joynr.messaging.RawMessagingPreprocessor |
getRawMessagePreprocessor() |
@Inject public DefaultJoynrRuntimeFactory(@JoynrProperties javax.enterprise.inject.Instance<Properties> joynrProperties, @JoynrLocalDomain javax.enterprise.inject.Instance<String> joynrLocalDomain, @JoynrRawMessagingPreprocessor javax.enterprise.inject.Instance<io.joynr.messaging.RawMessagingPreprocessor> rawMessagePreprocessor, @JoynrMqttClientIdProvider javax.enterprise.inject.Instance<MqttClientIdProvider> mqttClientIdProvider, @JoynrMessagePersister javax.enterprise.inject.Instance<io.joynr.messaging.persistence.MessagePersister> messagePersister, javax.enterprise.inject.spi.BeanManager beanManager, io.joynr.statusmetrics.StatusReceiver statusReceiver, MqttStatusReceiver mqttStatusReceiver)
JoynrProperties and JoynrLocalDomain
).
Note that if the EJB which contains the producer methods implements an interface, then the producer methods also need to be declared in that interface, otherwise CDI won't recognise the method implementations as producers.
joynrProperties - the joynr properties, if present, by prepareJoynrProperties(Properties) to prepare the properties with which the injector is created.joynrLocalDomain - the joynr local domain name to use for the application.rawMessagePreprocessor - can be optionally provided to intercept incoming messages and inspect or modify themmqttClientIdProvider - can be optionally provided to generate custom mqtt client idmessagePersister - can be optionally provided to persist joynr messages and thus increase sudden crash resiliencebeanManager - statusReceiver - Is passed to POJO joynr and receives metrics about the status of the joynr instance.mqttStatusReceiver - Is passed to POJO joynr and receives metrics about the status of the mqtt connection.public JoynrRuntime create(Set<Class<?>> providerInterfaceClasses)
JoynrRuntimeFactorycreate in interface JoynrRuntimeFactoryproviderInterfaceClasses - the set of provider interface classes which will be provisioned for the joynr runtime. These are
required in order to set up the access control entries during startup.public com.google.inject.Injector getInjector()
JoynrRuntimeFactorygetInjector in interface JoynrRuntimeFactorypublic String getLocalDomain()
JoynrRuntimeFactorygetLocalDomain in interface JoynrRuntimeFactorypublic io.joynr.messaging.RawMessagingPreprocessor getRawMessagePreprocessor()
public MqttClientIdProvider getMqttClientIdProvider()
public io.joynr.messaging.persistence.MessagePersister getMessagePersister()
Copyright © 2019. All rights reserved.