Summarycamel-apns component connects to Apple Push Notification service. It supports producing notifications and consuming feedback informations Maven dependency<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-apns</artifactId>
<version>2.4.0</version>
</dependency>Maven repository<repositories>
<repository>
<id>camel-apns.repo-release</id>
<url>http://camel-apns.googlecode.com/svn/maven/public/repository/release/</url>
</repository>
</repositories>Camel Xml route<!-- Déclaration du context Camel, et de la route de test: 'apns-test' -->
<!-- Les message reçus par le flux feedback seront envoyés vers le endpoint mock:result -->
<camelContext id="camel-apns-test" xmlns="http://camel.apache.org/schema/spring">
<route id="apns-test">
<from uri="apns:consumer?initialDelay=500&delay=500&timeUnit=MILLISECONDS" />
<to uri="log:org.apache.camel.component.apns?showAll=true&multiline=true" />
<to uri="mock:result" />
</route>
</camelContext>
Camel Java routeApnsProducerfrom("direct:test")
.setHeader(ApnsConstants.HEADER_TOKENS, constant(FAKE_TOKEN))
.to("apns:notify");ApnsConsumerfrom("apns:consumer?initialDelay=500&delay=500&timeUnit=MILLISECONDS")
.to("log:com.apache.camel.component.apns?showAll=true&multiline=true")
.to("mock:result");
|