Search in sources :

Example 1 with ApnsServiceFactory

use of org.apache.camel.component.apns.factory.ApnsServiceFactory in project camel by apache.

the class ApnsConsumerIdleMessageTest method createCamelContext.

@Override
protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ApnsServiceFactory apnsServiceFactory = ApnsUtils.createDefaultTestConfiguration(camelContext);
    ApnsService apnsService = apnsServiceFactory.getApnsService();
    ApnsComponent apnsComponent = new ApnsComponent(apnsService);
    camelContext.addComponent("apns", apnsComponent);
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ApnsServiceFactory(org.apache.camel.component.apns.factory.ApnsServiceFactory) ApnsService(com.notnoop.apns.ApnsService)

Example 2 with ApnsServiceFactory

use of org.apache.camel.component.apns.factory.ApnsServiceFactory in project camel by apache.

the class ApnsConsumerTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ApnsServiceFactory apnsServiceFactory = ApnsUtils.createDefaultTestConfiguration(camelContext);
    ApnsService apnsService = apnsServiceFactory.getApnsService();
    ApnsComponent apnsComponent = new ApnsComponent(apnsService);
    camelContext.addComponent("apns", apnsComponent);
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ApnsServiceFactory(org.apache.camel.component.apns.factory.ApnsServiceFactory) ApnsService(com.notnoop.apns.ApnsService)

Example 3 with ApnsServiceFactory

use of org.apache.camel.component.apns.factory.ApnsServiceFactory in project camel by apache.

the class ApnsProducerWithoutTokensHeaderTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ApnsServiceFactory apnsServiceFactory = ApnsUtils.createDefaultTestConfiguration(camelContext);
    ApnsService apnsService = apnsServiceFactory.getApnsService();
    ApnsComponent apnsComponent = new ApnsComponent(apnsService);
    camelContext.addComponent("apns", apnsComponent);
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ApnsServiceFactory(org.apache.camel.component.apns.factory.ApnsServiceFactory) ApnsService(com.notnoop.apns.ApnsService)

Example 4 with ApnsServiceFactory

use of org.apache.camel.component.apns.factory.ApnsServiceFactory in project camel by apache.

the class ApnsUtils method createDefaultTestConfiguration.

public static ApnsServiceFactory createDefaultTestConfiguration(CamelContext camelContext) throws Exception {
    ApnsServiceFactory apnsServiceFactory = new ApnsServiceFactory(camelContext);
    apnsServiceFactory.setFeedbackHost(TestConstants.TEST_HOST);
    apnsServiceFactory.setFeedbackPort(TestConstants.TEST_FEEDBACK_PORT);
    apnsServiceFactory.setGatewayHost(TestConstants.TEST_HOST);
    apnsServiceFactory.setGatewayPort(TestConstants.TEST_GATEWAY_PORT);
    // apnsServiceFactory.setCertificatePath("classpath:/" +
    // FixedCertificates.CLIENT_STORE);
    // apnsServiceFactory.setCertificatePassword(FixedCertificates.CLIENT_PASSWD);
    apnsServiceFactory.setSslContextParameters(clientContext());
    return apnsServiceFactory;
}
Also used : ApnsServiceFactory(org.apache.camel.component.apns.factory.ApnsServiceFactory)

Example 5 with ApnsServiceFactory

use of org.apache.camel.component.apns.factory.ApnsServiceFactory in project camel by apache.

the class ApnsProducerTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ApnsServiceFactory apnsServiceFactory = ApnsUtils.createDefaultTestConfiguration(camelContext);
    ApnsService apnsService = apnsServiceFactory.getApnsService();
    ApnsComponent apnsComponent = new ApnsComponent(apnsService);
    camelContext.addComponent("apns", apnsComponent);
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ApnsServiceFactory(org.apache.camel.component.apns.factory.ApnsServiceFactory) ApnsService(com.notnoop.apns.ApnsService)

Aggregations

ApnsServiceFactory (org.apache.camel.component.apns.factory.ApnsServiceFactory)5 ApnsService (com.notnoop.apns.ApnsService)4 CamelContext (org.apache.camel.CamelContext)4