This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 81baeb5c5f09bc96e0cc3f28142b3d12e92b59f7 Author: Andrea Cosentino <[email protected]> AuthorDate: Tue Jun 8 14:19:33 2021 +0200 CAMEL-16519 - Remove Camel-APNS --- bom/camel-bom/pom.xml | 5 - .../org/apache/camel/catalog/components/apns.json | 54 ---- .../apache/camel/catalog/docs/apns-component.adoc | 323 --------------------- core/camel-allcomponents/pom.xml | 4 - parent/pom.xml | 5 - 5 files changed, 391 deletions(-) diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index 671a167..c7c7bfa 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -63,11 +63,6 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-apns</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> <artifactId>camel-arangodb</artifactId> <version>${project.version}</version> </dependency> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/apns.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/apns.json deleted file mode 100644 index 2bce4ae..0000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/apns.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "component": { - "kind": "component", - "name": "apns", - "title": "APNS", - "description": "Send notifications to Apple iOS devices.", - "deprecated": true, - "firstVersion": "2.8.0", - "label": "eventbus,mobile", - "javaType": "org.apache.camel.component.apns.ApnsComponent", - "supportLevel": "Stable", - "groupId": "org.apache.camel", - "artifactId": "camel-apns", - "version": "3.11.0-SNAPSHOT", - "scheme": "apns", - "extendsScheme": "", - "syntax": "apns:name", - "async": false, - "api": false, - "consumerOnly": false, - "producerOnly": false, - "lenientProperties": false - }, - "componentProperties": { - "apnsService": { "kind": "property", "displayName": "Apns Service", "group": "common", "label": "", "required": true, "type": "object", "javaType": "com.notnoop.apns.ApnsService", "deprecated": false, "autowired": false, "secret": false, "description": "The ApnsService to use. The org.apache.camel.component.apns.factory.ApnsServiceFactory can be used to build a ApnsService" }, - "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a me [...] - "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...] - "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...] - }, - "properties": { - "name": { "kind": "path", "displayName": "Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of the endpoint" }, - "tokens": { "kind": "parameter", "displayName": "Tokens", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Configure this property in case you want to statically declare tokens related to devices you want to notify. Tokens are separated by comma." }, - "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...] - "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, - "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...] - "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, - "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation [...] - "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...] - "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, - "backoffIdleThreshold": { "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, - "backoffMultiplier": { "kind": "parameter", "displayName": "Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening agai [...] - "delay": { "kind": "parameter", "displayName": "Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 500, "description": "Milliseconds before the next poll." }, - "greedy": { "kind": "parameter", "displayName": "Greedy", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages." }, - "initialDelay": { "kind": "parameter", "displayName": "Initial Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "Milliseconds before the first poll starts." }, - "repeatCount": { "kind": "parameter", "displayName": "Repeat Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "description": "Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever." }, - "runLoggingLevel": { "kind": "parameter", "displayName": "Run Logging Level", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "org.apache.camel.LoggingLevel", "enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRACE", "description": "The consumer logs a start\/complete log line when it polls. This option allows you to configure the logging level [...] - "scheduledExecutorService": { "kind": "parameter", "displayName": "Scheduled Executor Service", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.ScheduledExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "Allows for configuring a custom\/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool." }, - "scheduler": { "kind": "parameter", "displayName": "Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "none", "description": "To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler" }, - "schedulerProperties": { "kind": "parameter", "displayName": "Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler." }, - "startScheduler": { "kind": "parameter", "displayName": "Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started." }, - "timeUnit": { "kind": "parameter", "displayName": "Time Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and delay options." }, - "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." } - } -} diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/apns-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/apns-component.adoc deleted file mode 100644 index 3d3fdf4..0000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/apns-component.adoc +++ /dev/null @@ -1,323 +0,0 @@ -[[apns-component]] -= APNS Component (deprecated) -:docTitle: APNS -:artifactId: camel-apns -:description: Send notifications to Apple iOS devices. -:since: 2.8 -:supportLevel: Stable-deprecated -:deprecated: *deprecated* -:component-header: Both producer and consumer are supported -include::{cq-version}@camel-quarkus:ROOT:partial$reference/components/apns.adoc[opts=optional] - -*Since Camel {since}* - -*{component-header}* - -The APNS component is used for sending notifications to iOS devices. -The APNS components use https://github.com/notnoop/java-apns[javapns] -library. + - The component supports sending notifications to Apple Push Notification -Servers (APNS) and consuming feedback from the servers. - -The consumer is configured with 3600 seconds for polling by default -because it is a best practice to consume feedback stream from Apple Push -Notification Servers only from time to time. For example: every 1 hour -to avoid flooding the servers. - -The feedback stream gives informations about inactive devices. You only -need to get this informations every some hours if your mobile -application is not a heavily used one. - -Maven users will need to add the following dependency to their `pom.xml` -for this component: - -[source,xml] ------------------------------------------------------------- -<dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-apns</artifactId> - <version>x.x.x</version> - <!-- use the same version as your Camel core version --> -</dependency> ------------------------------------------------------------- - -== URI format - -To send notifications: - -[source,java] ---------------------- -apns:notify[?options] ---------------------- - -To consume feedback: - -[source,java] ------------------------ -apns:consumer[?options] ------------------------ - -== Options - - - -// component options: START -The APNS component supports 4 options, which are listed below. - - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *apnsService* (common) | *Required* The ApnsService to use. The org.apache.camel.component.apns.factory.ApnsServiceFactory can be used to build a ApnsService | | ApnsService -| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean -| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *autowiredEnabled* (advanced) | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean -|=== -// component options: END - - - - -// endpoint options: START -The APNS endpoint is configured using URI syntax: - ----- -apns:name ----- - -with the following path and query parameters: - -=== Path Parameters (1 parameters): - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *name* | Name of the endpoint | | String -|=== - - -=== Query Parameters (21 parameters): - - -[width="100%",cols="2,5,^1,2",options="header"] -|=== -| Name | Description | Default | Type -| *tokens* (common) | Configure this property in case you want to statically declare tokens related to devices you want to notify. Tokens are separated by comma. | | String -| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean -| *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. | false | boolean -| *exceptionHandler* (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | | ExceptionHandler -| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. There are 3 enums and the value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern -| *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. | | PollingConsumerPollStrategy -| *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] -| *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | | int -| *backoffIdleThreshold* (scheduler) | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | | int -| *backoffMultiplier* (scheduler) | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | | int -| *delay* (scheduler) | Milliseconds before the next poll. | 500 | long -| *greedy* (scheduler) | If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. | false | boolean -| *initialDelay* (scheduler) | Milliseconds before the first poll starts. | 1000 | long -| *repeatCount* (scheduler) | Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. | 0 | long -| *runLoggingLevel* (scheduler) | The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. There are 6 enums and the value can be one of: TRACE, DEBUG, INFO, WARN, ERROR, OFF | TRACE | LoggingLevel -| *scheduledExecutorService* (scheduler) | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. | | ScheduledExecutorService -| *scheduler* (scheduler) | To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler | none | Object -| *schedulerProperties* (scheduler) | To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. | | Map -| *startScheduler* (scheduler) | Whether the scheduler should be auto started. | true | boolean -| *timeUnit* (scheduler) | Time unit for initialDelay and delay options. There are 7 enums and the value can be one of: NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS | MILLISECONDS | TimeUnit -| *useFixedDelay* (scheduler) | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. | true | boolean -|=== -// endpoint options: END - - - -You can append query options to the URI in the following format, -`?option=value&option=value&...` - -=== Component - -The `ApnsComponent` must be configured with a -`com.notnoop.apns.ApnsService`. The service can be created and -configured using the -`org.apache.camel.component.apns.factory.ApnsServiceFactory`. See -further below for an example. And as well in the -https://github.com/apache/camel/tree/main/components/camel-apns[test -source code]. - -==== SSL Setting -In order to use secure connection, an instance of `org.apache.camel.support.jsse.SSLContextParameters` - should be injected to `org.apache.camel.component.apns.factory.ApnsServiceFactory` which is - used to configure the component. See the test resources for an example. - https://github.com/apache/camel/blob/main/components/camel-apns/src/test/resources/org/apache/camel/component/apns/spring/SpringApnsConsumerTest-context.xml[ssl example] - -== Exchange data format - -When Camel will fetch feedback data corresponding to inactive devices, -it will retrieve a List of InactiveDevice objects. Each InactiveDevice -object of the retrieved list will be setted as the In body, and then -processed by the consumer endpoint. - -== Message Headers - -Camel Apns uses these headers. - -[width="100%",cols="10%,10%,80%",options="header",] -|======================================================================= -|Property |Default |Description -|`CamelApnsTokens` | |Empty by default. -|`CamelApnsMessageType` |`STRING, PAYLOAD, APNS_NOTIFICATION` |In case you choose PAYLOAD for the message type, then the message will -be considered as a APNS payload and sent as is. In case you choose -STRING, message will be converted as a APNS payload. From *Camel 2.16* -onwards APNS_NOTIFICATION is used for sending message body as -com.notnoop.apns.ApnsNotification types. -|======================================================================= - -== ApnsServiceFactory builder callback - -`ApnsServiceFactory` comes with the empty callback method that could be -used to configure (or even replace) the default `ApnsServiceBuilder` -instance. The signature of the method could look as follows: - -[source,java] ----------------------------------------------------------------------------------------- -protected ApnsServiceBuilder configureServiceBuilder(ApnsServiceBuilder serviceBuilder); ----------------------------------------------------------------------------------------- - -And could be used like as follows: - -[source,java] -------------------------------------------------------------------------------------------- -ApnsServiceFactory proxiedApnsServiceFactory = new ApnsServiceFactory(){ - - @Override - protected ApnsServiceBuilder configureServiceBuilder(ApnsServiceBuilder serviceBuilder) { - return serviceBuilder.withSocksProxy("my.proxy.com", 6666); - } - -}; -------------------------------------------------------------------------------------------- - -== Samples - -=== Camel Xml route - -[source,xml] --------------------------------------------------------------------------------------------------------------------------------------------------------------------- -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:camel="http://camel.apache.org/schema/spring" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> - - <!-- Replace by desired values --> - <bean id="apnsServiceFactory" class="org.apache.camel.component.apns.factory.ApnsServiceFactory"> - - <!-- Optional configuration of feedback host and port --> - <!-- <property name="feedbackHost" value="localhost" /> --> - <!-- <property name="feedbackPort" value="7843" /> --> - - <!-- Optional configuration of gateway host and port --> - <!-- <property name="gatewayHost" value="localhost" /> --> - <!-- <property name="gatewayPort" value="7654" /> --> - - <!-- Declaration of certificate used --> - <!-- from Camel 2.11 onwards you can use prefix: classpath:, file: to refer to load the certificate from classpath or file. Default it classpath --> - <property name="certificatePath" value="certificate.p12" /> - <property name="certificatePassword" value="MyCertPassword" /> - - <!-- Optional connection strategy - By Default: No need to configure --> - <!-- Possible options: NON_BLOCKING, QUEUE, POOL or Nothing --> - <!-- <property name="connectionStrategy" value="POOL" /> --> - <!-- Optional pool size --> - <!-- <property name="poolSize" value="15" /> --> - - <!-- Optional connection strategy - By Default: No need to configure --> - <!-- Possible options: EVERY_HALF_HOUR, EVERY_NOTIFICATION or Nothing (Corresponds to NEVER javapns option) --> - <!-- <property name="reconnectionPolicy" value="EVERY_HALF_HOUR" /> --> - </bean> - - <bean id="apnsService" factory-bean="apnsServiceFactory" factory-method="getApnsService" /> - - <!-- Replace this declaration by wanted configuration --> - <bean id="apns" class="org.apache.camel.component.apns.ApnsComponent"> - <property name="apnsService" ref="apnsService" /> - </bean> - - <camelContext id="camel-apns-test" xmlns="http://camel.apache.org/schema/spring"> - <route id="apns-test"> - <from uri="apns:consumer?initialDelay=10&delay=3600&timeUnit=SECONDS" /> - <to uri="log:org.apache.camel.component.apns?showAll=true&multiline=true" /> - <to uri="mock:result" /> - </route> - </camelContext> - -</beans> --------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -=== Camel Java route - -[[APNS-Createcamelcontextanddeclareapnscomponentprogrammatically]] -Create camel context and declare apns component programmatically - -[source,java] ----------------------------------------------------------------------------------- - protected CamelContext createCamelContext() throws Exception { - CamelContext camelContext = super.createCamelContext(); - - ApnsServiceFactory apnsServiceFactory = new ApnsServiceFactory(); - apnsServiceFactory.setCertificatePath("classpath:/certificate.p12"); - apnsServiceFactory.setCertificatePassword("MyCertPassword"); - - ApnsService apnsService = apnsServiceFactory.getApnsService(camelContext); - - ApnsComponent apnsComponent = new ApnsComponent(apnsService); - camelContext.addComponent("apns", apnsComponent); - - return camelContext; - } ----------------------------------------------------------------------------------- - -[[APNS-ApnsProducer-iOStargetdevicedynamicallyconfiguredviaheader:CamelApnsTokens]] -ApnsProducer - iOS target device dynamically configured via header: -`"CamelApnsTokens"` - -[source,java] ---------------------------------------------------------------------------------------- - protected RouteBuilder createRouteBuilder() throws Exception { - return new RouteBuilder() { - public void configure() throws Exception { - from("direct:test") - .setHeader(ApnsConstants.HEADER_TOKENS, constant(IOS_DEVICE_TOKEN)) - .to("apns:notify"); - } - } - } ---------------------------------------------------------------------------------------- - -[[APNS-ApnsProducer-iOStargetdevicestaticallyconfiguredviauri]] -ApnsProducer - iOS target device statically configured via uri - -[source,java] ------------------------------------------------------------------- - protected RouteBuilder createRouteBuilder() throws Exception { - return new RouteBuilder() { - public void configure() throws Exception { - from("direct:test"). - to("apns:notify?tokens=" + IOS_DEVICE_TOKEN); - } - }; - } ------------------------------------------------------------------- - -[[APNS-ApnsConsumer]] -ApnsConsumer - -[source,java] --------------------------------------------------------------------------- -from("apns:consumer?initialDelay=10&delay=3600&timeUnit=SECONDS") - .to("log:com.apache.camel.component.apns?showAll=true&multiline=true") - .to("mock:result"); --------------------------------------------------------------------------- - - -include::{page-component-version}@camel-spring-boot::page$apns-starter.adoc[] diff --git a/core/camel-allcomponents/pom.xml b/core/camel-allcomponents/pom.xml index f8bdfba..b87d1c5 100644 --- a/core/camel-allcomponents/pom.xml +++ b/core/camel-allcomponents/pom.xml @@ -55,10 +55,6 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-apns</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> <artifactId>camel-arangodb</artifactId> </dependency> <dependency> diff --git a/parent/pom.xml b/parent/pom.xml index 84c9474..0fe629c 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -795,11 +795,6 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-apns</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> <artifactId>camel-arangodb</artifactId> <version>${project.version}</version> </dependency>
