use of javax.inject.Named in project OpenAM by OpenRock.
the class OAuth2GuiceModule method getOAuth2AuditContextProviders.
@Inject
@Provides
@Singleton
@Named(OAUTH2_AUDIT_CONTEXT_PROVIDERS)
Set<OAuth2AuditContextProvider> getOAuth2AuditContextProviders(TokenStore tokenStore, OAuth2RequestFactory<?, Request> requestFactory) {
Set<OAuth2AuditContextProvider> set = new HashSet<>();
set.add(new OAuth2AuditAccessTokenContextProvider(tokenStore, requestFactory));
set.add(new OAuth2AuditRefreshTokenContextProvider(tokenStore, requestFactory));
set.add(new OAuth2AuditSSOTokenContextProvider());
return set;
}
use of javax.inject.Named in project OpenAM by OpenRock.
the class RestGuiceModule method getCrestRootRouter.
@Provides
@Named("CrestRootRouter")
@Singleton
Router getCrestRootRouter(@Named("CrestRealmRouter") Router crestRealmRouter) {
Router crestRootRouter = new Router();
crestRootRouter.setDefaultRoute(crestRealmRouter);
return crestRealmRouter;
}
use of javax.inject.Named in project OpenAM by OpenRock.
the class RestGuiceModule method getChfRealmRouter.
@Provides
@Named("ChfRealmRouter")
@Singleton
org.forgerock.http.routing.Router getChfRealmRouter(@Named("CrestRealmHandler") RequestHandler crestRealmHandler, ContextFilter contextFilter, CrestProtocolEnforcementFilter crestProtocolEnforcementFilter) {
org.forgerock.http.routing.Router chfRealmRouter = new org.forgerock.http.routing.Router();
chfRealmRouter.setDefaultRoute(Handlers.chainOf(newHttpHandler(new FilterChain(crestRealmHandler, contextFilter)), crestProtocolEnforcementFilter));
return chfRealmRouter;
}
use of javax.inject.Named in project camel by apache.
the class AdvisedRouteTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("from", "inbound");
properties.put("to", "direct:outbound");
properties.put("header.message", "n/a");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
use of javax.inject.Named in project camel by apache.
the class BeanInjectTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("property", "value");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
Aggregations