Search in sources :

Example 51 with Named

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;
}
Also used : Router(org.forgerock.json.resource.Router) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 52 with Named

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;
}
Also used : FilterChain(org.forgerock.json.resource.FilterChain) Router(org.forgerock.json.resource.Router) Named(javax.inject.Named) Singleton(javax.inject.Singleton) Provides(com.google.inject.Provides)

Example 53 with Named

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;
}
Also used : Properties(java.util.Properties) PropertiesComponent(org.apache.camel.component.properties.PropertiesComponent) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Example 54 with Named

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;
}
Also used : Properties(java.util.Properties) PropertiesComponent(org.apache.camel.component.properties.PropertiesComponent) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Example 55 with Named

use of javax.inject.Named in project camel by apache.

the class PropertyEndpointTest method configuration.

@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
    Properties properties = new Properties();
    properties.put("from", "inbound");
    properties.put("to", "mock:outbound");
    PropertiesComponent component = new PropertiesComponent();
    component.setInitialProperties(properties);
    return component;
}
Also used : Properties(java.util.Properties) PropertiesComponent(org.apache.camel.component.properties.PropertiesComponent) Named(javax.inject.Named) Produces(javax.enterprise.inject.Produces) ApplicationScoped(javax.enterprise.context.ApplicationScoped)

Aggregations

Named (javax.inject.Named)73 Produces (javax.enterprise.inject.Produces)32 ApplicationScoped (javax.enterprise.context.ApplicationScoped)20 Provides (com.google.inject.Provides)17 Singleton (javax.inject.Singleton)14 Properties (java.util.Properties)12 PropertiesComponent (org.apache.camel.component.properties.PropertiesComponent)12 Annotation (java.lang.annotation.Annotation)7 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)6 Inject (javax.inject.Inject)5 Provides (dagger.Provides)4 Test (org.junit.Test)4 Type (java.lang.reflect.Type)3 NamedLiteral (org.apache.deltaspike.core.api.literal.NamedLiteral)3 MetadataHealthCheck (uk.gov.ida.saml.metadata.MetadataHealthCheck)3 Bundle (android.os.Bundle)2 MovieFragment (com.dev.base.mvp.view.fragment.MovieFragment)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 Gson (com.google.gson.Gson)2