Search in sources :

Example 1 with ExplicitCamelContextNameStrategy

use of org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy in project wildfly-camel by wildfly-extras.

the class SimpleRouteBuilder method configure.

@Override
public void configure() throws Exception {
    getContext().setNameStrategy(new ExplicitCamelContextNameStrategy("simple-camel-context"));
    from("direct:start").bean("helloBean");
}
Also used : ExplicitCamelContextNameStrategy(org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy)

Example 2 with ExplicitCamelContextNameStrategy

use of org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy in project wildfly-camel by wildfly-extras.

the class MailCdiRouteBuilder method configure.

@Override
public void configure() throws Exception {
    getContext().setNameStrategy(new ExplicitCamelContextNameStrategy("camel-mail-cdi-context"));
    from("direct:start").to("smtp://localhost:10025?session=#mailSession");
    from("pop3://user2@localhost:10110?delay=30000&session=#mailSession&delete=true").to("mock:result");
}
Also used : ExplicitCamelContextNameStrategy(org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy)

Example 3 with ExplicitCamelContextNameStrategy

use of org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy in project wildfly-camel by wildfly-extras.

the class HealthRouteBuilder method configure.

@Override
public void configure() throws Exception {
    getContext().setNameStrategy(new ExplicitCamelContextNameStrategy("health-context"));
    from("direct:start").to("log:end");
}
Also used : ExplicitCamelContextNameStrategy(org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy)

Example 4 with ExplicitCamelContextNameStrategy

use of org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy in project wildfly-camel by wildfly-extras.

the class SecureRouteBuilder method configure.

@Override
public void configure() throws Exception {
    getContext().setNameStrategy(new ExplicitCamelContextNameStrategy("secured-context"));
    from("direct:start").policy(new DomainAuthorizationPolicy().roles("Role2")).transform(body().prepend("Hello "));
}
Also used : ExplicitCamelContextNameStrategy(org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy) DomainAuthorizationPolicy(org.wildfly.extension.camel.security.DomainAuthorizationPolicy)

Example 5 with ExplicitCamelContextNameStrategy

use of org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy in project wildfly-camel by wildfly-extras.

the class MyRouteConfiguration method route.

@Override
public RouteBuilder route() {
    return new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            getContext().setNameStrategy(new ExplicitCamelContextNameStrategy("javaConfigContext"));
            from("direct:start").transform(body().prepend("Hello "));
        }
    };
}
Also used : ExplicitCamelContextNameStrategy(org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy) RouteBuilder(org.apache.camel.builder.RouteBuilder)

Aggregations

ExplicitCamelContextNameStrategy (org.apache.camel.impl.engine.ExplicitCamelContextNameStrategy)11 CamelContext (org.apache.camel.CamelContext)5 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)5 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 OutputStream (java.io.OutputStream)3 PrintStream (java.io.PrintStream)3 RouteBuilder (org.apache.camel.builder.RouteBuilder)3 Test (org.junit.Test)2 Properties (java.util.Properties)1 ValidationException (org.apache.camel.ValidationException)1 DefaultRuntimeEndpointRegistry (org.apache.camel.impl.engine.DefaultRuntimeEndpointRegistry)1 ContextCustomizer (org.apache.camel.k.ContextCustomizer)1 ExpressionDefinition (org.apache.camel.model.language.ExpressionDefinition)1 CustomValidatorDefinition (org.apache.camel.model.validator.CustomValidatorDefinition)1 EndpointValidatorDefinition (org.apache.camel.model.validator.EndpointValidatorDefinition)1 PredicateValidatorDefinition (org.apache.camel.model.validator.PredicateValidatorDefinition)1 Test (org.junit.jupiter.api.Test)1 Bean (org.springframework.context.annotation.Bean)1 Scope (org.springframework.context.annotation.Scope)1 DomainAuthorizationPolicy (org.wildfly.extension.camel.security.DomainAuthorizationPolicy)1