Search in sources :

Example 1 with HipchatComponent

use of org.apache.camel.component.hipchat.HipchatComponent in project camel by apache.

the class HipchatComponentAutoConfiguration method configureHipchatComponent.

@Lazy
@Bean(name = "hipchat-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HipchatComponent.class)
public HipchatComponent configureHipchatComponent(CamelContext camelContext) throws Exception {
    HipchatComponent component = new HipchatComponent();
    component.setCamelContext(camelContext);
    return component;
}
Also used : HipchatComponent(org.apache.camel.component.hipchat.HipchatComponent) Lazy(org.springframework.context.annotation.Lazy) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnClass(org.springframework.boot.autoconfigure.condition.ConditionalOnClass) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with HipchatComponent

use of org.apache.camel.component.hipchat.HipchatComponent in project wildfly-camel by wildfly-extras.

the class HipchatProducerIntegrationTest method createCamelContext.

private CamelContext createCamelContext() throws Exception {
    final CamelContext context = new DefaultCamelContext();
    HipchatComponent component = new HipchatComponent(context) {

        @Override
        protected HipchatEndpoint getHipchatEndpoint(String uri) {
            return new HipchatEPSuccessTestSupport(uri, this, callback, null);
        }
    };
    context.addComponent("hipchat", component);
    context.addRoutes(new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            from("direct:start").to("hipchat:http:api.hipchat.com?authToken=anything").to("mock:result");
        }
    });
    return context;
}
Also used : CamelContext(org.apache.camel.CamelContext) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) HipchatComponent(org.apache.camel.component.hipchat.HipchatComponent) RouteBuilder(org.apache.camel.builder.RouteBuilder) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext)

Example 3 with HipchatComponent

use of org.apache.camel.component.hipchat.HipchatComponent in project wildfly-camel by wildfly-extras.

the class HipchatConsumerIntegrationTest method createCamelContext.

private CamelContext createCamelContext() throws Exception {
    final CamelContext context = new DefaultCamelContext();
    HipchatComponent component = new HipchatComponent(context) {

        @Override
        protected HipchatEndpoint getHipchatEndpoint(String uri) {
            return new HipchatEPSuccessTestSupport(uri, this, null, closeableHttpResponse);
        }
    };
    context.addComponent("hipchat", component);
    context.addRoutes(new RouteBuilder() {

        @Override
        public void configure() throws Exception {
            from("hipchat:http://api.hipchat.com?authToken=anything&consumeUsers=@AUser").to("mock:result");
        }
    });
    return context;
}
Also used : DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext) CamelContext(org.apache.camel.CamelContext) HipchatComponent(org.apache.camel.component.hipchat.HipchatComponent) RouteBuilder(org.apache.camel.builder.RouteBuilder) DefaultCamelContext(org.apache.camel.impl.DefaultCamelContext)

Aggregations

HipchatComponent (org.apache.camel.component.hipchat.HipchatComponent)3 CamelContext (org.apache.camel.CamelContext)2 RouteBuilder (org.apache.camel.builder.RouteBuilder)2 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)2 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnClass (org.springframework.boot.autoconfigure.condition.ConditionalOnClass)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1 Lazy (org.springframework.context.annotation.Lazy)1