use of io.joynr.accesscontrol.AccessControlClientModule 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);
}
use of io.joynr.accesscontrol.AccessControlClientModule in project joynr by bmwcarit.
the class JeeHttpMessagingModule method configure.
@Override
protected void configure() {
messagingSkeletonFactory.addBinding(ChannelAddress.class).to(ChannelMessagingSkeleton.class);
messagingStubFactory.addBinding(ChannelAddress.class).to(ChannelMessagingStubFactory.class);
Multibinder<GlobalAddressFactory<? extends Address>> globalAddresses;
globalAddresses = Multibinder.newSetBinder(binder(), new TypeLiteral<GlobalAddressFactory<? extends Address>>() {
}, Names.named(GlobalAddressProvider.GLOBAL_ADDRESS_PROVIDER));
globalAddresses.addBinding().to(ServletHttpGlobalAddressFactory.class);
Multibinder<GlobalAddressFactory<? extends Address>> replyToAddresses;
replyToAddresses = Multibinder.newSetBinder(binder(), new TypeLiteral<GlobalAddressFactory<? extends Address>>() {
}, Names.named(ReplyToAddressProvider.REPLY_TO_ADDRESS_PROVIDER));
replyToAddresses.addBinding().to(ServletHttpGlobalAddressFactory.class);
install(new AccessControlClientModule());
bind(RequestConfig.class).toProvider(HttpDefaultRequestConfigProvider.class).in(Singleton.class);
bind(CloseableHttpClient.class).toProvider(HttpClientProvider.class).in(Singleton.class);
bind(HttpRequestFactory.class).to(ApacheHttpRequestFactory.class);
bind(MessageRouter.class).to(CcMessageRouter.class).in(Singleton.class);
bind(MessageSender.class).to(CcMessageSender.class);
bind(MessageReceiver.class).to(JeeServletMessageReceiver.class);
bind(ServletMessageReceiver.class).to(JeeServletMessageReceiver.class);
}
Aggregations