Search in sources :

Example 1 with JeeMqttMessageSendingModule

use of io.joynr.jeeintegration.messaging.JeeMqttMessageSendingModule in project joynr by bmwcarit.

the class JeeJoynrIntegrationModule method configure.

@Override
protected void configure() {
    bind(ScheduledExecutorService.class).annotatedWith(Names.named(MessageRouter.SCHEDULEDTHREADPOOL)).toInstance(scheduledExecutorService);
    bind(ScheduledExecutorService.class).annotatedWith(Names.named(JoynrInjectionConstants.JOYNR_SCHEDULER_CLEANUP)).toInstance(scheduledExecutorService);
    bind(ScheduledExecutorService.class).annotatedWith(Names.named(LocalCapabilitiesDirectory.JOYNR_SCHEDULER_CAPABILITIES_FRESHNESS)).toInstance(scheduledExecutorService);
    bind(ExecutorService.class).toInstance(scheduledExecutorService);
    MapBinder<Class<? extends Address>, IMessagingSkeleton> messagingSkeletonFactory;
    messagingSkeletonFactory = MapBinder.newMapBinder(binder(), new TypeLiteral<Class<? extends Address>>() {
    }, new TypeLiteral<IMessagingSkeleton>() {
    }, Names.named(MessagingSkeletonFactory.MIDDLEWARE_MESSAGING_SKELETONS));
    MapBinder<Class<? extends Address>, AbstractMiddlewareMessagingStubFactory<? extends IMessagingStub, ? extends Address>> messagingStubFactory;
    messagingStubFactory = MapBinder.newMapBinder(binder(), new TypeLiteral<Class<? extends Address>>() {
    }, new TypeLiteral<AbstractMiddlewareMessagingStubFactory<? extends IMessagingStub, ? extends Address>>() {
    }, Names.named(MessagingStubFactory.MIDDLEWARE_MESSAGING_STUB_FACTORIES));
    Multibinder.newSetBinder(binder(), JoynrMessageProcessor.class);
    install(new JeeHttpMessagingModule(messagingSkeletonFactory, messagingStubFactory));
    install(new HttpBridgeEndpointRegistryClientModule());
    install(new JeeMqttMessageSendingModule(messagingSkeletonFactory, messagingStubFactory));
}
Also used : AbstractMiddlewareMessagingStubFactory(io.joynr.messaging.AbstractMiddlewareMessagingStubFactory) JeeHttpMessagingModule(io.joynr.jeeintegration.messaging.JeeHttpMessagingModule) IMessagingSkeleton(io.joynr.messaging.IMessagingSkeleton) Address(joynr.system.RoutingTypes.Address) TypeLiteral(com.google.inject.TypeLiteral) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) ExecutorService(java.util.concurrent.ExecutorService) JeeMqttMessageSendingModule(io.joynr.jeeintegration.messaging.JeeMqttMessageSendingModule) IMessagingStub(io.joynr.messaging.IMessagingStub) HttpBridgeEndpointRegistryClientModule(io.joynr.jeeintegration.httpbridge.HttpBridgeEndpointRegistryClientModule)

Aggregations

TypeLiteral (com.google.inject.TypeLiteral)1 HttpBridgeEndpointRegistryClientModule (io.joynr.jeeintegration.httpbridge.HttpBridgeEndpointRegistryClientModule)1 JeeHttpMessagingModule (io.joynr.jeeintegration.messaging.JeeHttpMessagingModule)1 JeeMqttMessageSendingModule (io.joynr.jeeintegration.messaging.JeeMqttMessageSendingModule)1 AbstractMiddlewareMessagingStubFactory (io.joynr.messaging.AbstractMiddlewareMessagingStubFactory)1 IMessagingSkeleton (io.joynr.messaging.IMessagingSkeleton)1 IMessagingStub (io.joynr.messaging.IMessagingStub)1 ExecutorService (java.util.concurrent.ExecutorService)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 Address (joynr.system.RoutingTypes.Address)1