Search in sources :

Example 1 with LocalCapabilitiesDirectoryModule

use of io.joynr.capabilities.LocalCapabilitiesDirectoryModule in project joynr by bmwcarit.

the class ClusterControllerRuntimeModule method configure.

@Override
protected void configure() {
    super.configure();
    install(new LocalCapabilitiesDirectoryModule());
    install(new NoBackendMessagingModule());
    install(new AccessControlClientModule());
    bind(RoutingProvider.class).to(RoutingProviderImpl.class);
    bind(Address.class).annotatedWith(Names.named(GLOBAL_ADDRESS)).toProvider(GlobalAddressProvider.class);
    bind(MessageSender.class).to(CcMessageSender.class);
    bind(MessageRouter.class).to(CcMessageRouter.class).in(Singleton.class);
    ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("joynr.scheduler.capabilities.freshness-%d").setDaemon(true).build();
    ScheduledExecutorService capabilitiesFreshnessUpdateExecutor = Executors.newSingleThreadScheduledExecutor(namedThreadFactory);
    bind(ScheduledExecutorService.class).annotatedWith(Names.named(LocalCapabilitiesDirectory.JOYNR_SCHEDULER_CAPABILITIES_FRESHNESS)).toInstance(capabilitiesFreshnessUpdateExecutor);
}
Also used : RoutingProvider(joynr.system.RoutingProvider) ThreadFactory(java.util.concurrent.ThreadFactory) NoBackendMessagingModule(io.joynr.messaging.NoBackendMessagingModule) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) MessageSender(io.joynr.messaging.sender.MessageSender) CcMessageSender(io.joynr.messaging.sender.CcMessageSender) CcMessageRouter(io.joynr.messaging.routing.CcMessageRouter) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) AccessControlClientModule(io.joynr.accesscontrol.AccessControlClientModule) LocalCapabilitiesDirectoryModule(io.joynr.capabilities.LocalCapabilitiesDirectoryModule)

Aggregations

ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 AccessControlClientModule (io.joynr.accesscontrol.AccessControlClientModule)1 LocalCapabilitiesDirectoryModule (io.joynr.capabilities.LocalCapabilitiesDirectoryModule)1 NoBackendMessagingModule (io.joynr.messaging.NoBackendMessagingModule)1 CcMessageRouter (io.joynr.messaging.routing.CcMessageRouter)1 CcMessageSender (io.joynr.messaging.sender.CcMessageSender)1 MessageSender (io.joynr.messaging.sender.MessageSender)1 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 ThreadFactory (java.util.concurrent.ThreadFactory)1 RoutingProvider (joynr.system.RoutingProvider)1