This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 7b2cc5f0c956aa86227d60aa1045308b7cd752db Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Sep 20 12:01:07 2020 +0200 CAMEL-15549: Api consumer to expose splitResults options and some more work needed --- .../apache/camel/catalog/docs/as2-component.adoc | 23 +- .../camel/component/as2/AS2EndpointConfigurer.java | 79 ---- .../org/apache/camel/component/as2/as2.json | 20 +- .../src/main/docs/as2-component.adoc | 23 +- .../camel/component/as2/AS2Configuration.java | 3 +- .../apache/camel/component/as2/AS2Consumer.java | 3 + .../apache/camel/component/as2/AS2Endpoint.java | 2 + .../src/generated/resources/metadata.json | 1 + .../endpoint/dsl/AS2EndpointBuilderFactory.java | 485 --------------------- .../modules/ROOT/pages/as2-component.adoc | 23 +- .../src/main/resources/endpoint-options.mvel | 8 - 11 files changed, 18 insertions(+), 652 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc index fb14a1c..7cbe651 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/as2-component.adoc @@ -84,7 +84,7 @@ with the following path and query parameters: |=== -=== Query Parameters (49 parameters): +=== Query Parameters (32 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -117,28 +117,11 @@ with the following path and query parameters: | *targetHostname* (common) | The host name (IP or DNS name) of target host. | | String | *targetPortNumber* (common) | The port number of target host. -1 indicates the scheme default port. | | Integer | *userAgent* (common) | The value included in the User-Agent message header identifying the AS2 user agent. | Camel AS2 Client Endpoint | 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 [...] | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean -| *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 |=== @@ -216,7 +199,7 @@ The client API method(s) has the following set of parameters listed in the table | send | *subject* | Message subject | String |=== -In addition to the parameters above, the client API can also use from the 49 endpoint query option +In addition to the parameters above, the client API can also use from the 32 endpoint query option which is listed in the _Query Parameters_ section. Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. @@ -261,7 +244,7 @@ The server API method(s) has the following set of parameters listed in the table | listen | *requestUriPattern* | | String |=== -In addition to the parameters above, the server API can also use from the 49 endpoint query option +In addition to the parameters above, the server API can also use from the 32 endpoint query option which is listed in the _Query Parameters_ section. Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. diff --git a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java index b3a0e26..a6cd4fa 100644 --- a/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java +++ b/components/camel-as2/camel-as2-component/src/generated/java/org/apache/camel/component/as2/AS2EndpointConfigurer.java @@ -27,23 +27,14 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements case "as2To": target.getConfiguration().setAs2To(property(camelContext, java.lang.String.class, value)); return true; case "as2version": case "as2Version": target.getConfiguration().setAs2Version(property(camelContext, java.lang.String.class, value)); return true; - case "backofferrorthreshold": - case "backoffErrorThreshold": target.setBackoffErrorThreshold(property(camelContext, int.class, value)); return true; - case "backoffidlethreshold": - case "backoffIdleThreshold": target.setBackoffIdleThreshold(property(camelContext, int.class, value)); return true; - case "backoffmultiplier": - case "backoffMultiplier": target.setBackoffMultiplier(property(camelContext, int.class, value)); return true; case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; - case "bridgeerrorhandler": - case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "clientfqdn": case "clientFqdn": target.getConfiguration().setClientFqdn(property(camelContext, java.lang.String.class, value)); return true; case "compressionalgorithm": case "compressionAlgorithm": target.getConfiguration().setCompressionAlgorithm(property(camelContext, org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class, value)); return true; case "decryptingprivatekey": case "decryptingPrivateKey": target.getConfiguration().setDecryptingPrivateKey(property(camelContext, java.security.PrivateKey.class, value)); return true; - case "delay": target.setDelay(property(camelContext, long.class, value)); return true; case "dispositionnotificationto": case "dispositionNotificationTo": target.getConfiguration().setDispositionNotificationTo(property(camelContext, java.lang.String.class, value)); return true; case "edimessagetransferencoding": @@ -59,30 +50,14 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements case "exchangepattern": case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true; case "from": target.getConfiguration().setFrom(property(camelContext, java.lang.String.class, value)); return true; - case "greedy": target.setGreedy(property(camelContext, boolean.class, value)); return true; case "inbody": case "inBody": target.setInBody(property(camelContext, java.lang.String.class, value)); return true; - case "initialdelay": - case "initialDelay": target.setInitialDelay(property(camelContext, long.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; case "mdnmessagetemplate": case "mdnMessageTemplate": target.getConfiguration().setMdnMessageTemplate(property(camelContext, java.lang.String.class, value)); return true; - case "pollstrategy": - case "pollStrategy": target.setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true; - case "repeatcount": - case "repeatCount": target.setRepeatCount(property(camelContext, long.class, value)); return true; case "requesturi": case "requestUri": target.getConfiguration().setRequestUri(property(camelContext, java.lang.String.class, value)); return true; - case "runlogginglevel": - case "runLoggingLevel": target.setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true; - case "scheduledexecutorservice": - case "scheduledExecutorService": target.setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true; - case "scheduler": target.setScheduler(property(camelContext, java.lang.Object.class, value)); return true; - case "schedulerproperties": - case "schedulerProperties": target.setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true; - case "sendemptymessagewhenidle": - case "sendEmptyMessageWhenIdle": target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true; case "server": target.getConfiguration().setServer(property(camelContext, java.lang.String.class, value)); return true; case "serverfqdn": case "serverFqdn": target.getConfiguration().setServerFqdn(property(camelContext, java.lang.String.class, value)); return true; @@ -96,18 +71,12 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements case "signingCertificateChain": target.getConfiguration().setSigningCertificateChain(property(camelContext, java.security.cert.Certificate[].class, value)); return true; case "signingprivatekey": case "signingPrivateKey": target.getConfiguration().setSigningPrivateKey(property(camelContext, java.security.PrivateKey.class, value)); return true; - case "startscheduler": - case "startScheduler": target.setStartScheduler(property(camelContext, boolean.class, value)); return true; case "subject": target.getConfiguration().setSubject(property(camelContext, java.lang.String.class, value)); return true; case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "targethostname": case "targetHostname": target.getConfiguration().setTargetHostname(property(camelContext, java.lang.String.class, value)); return true; case "targetportnumber": case "targetPortNumber": target.getConfiguration().setTargetPortNumber(property(camelContext, java.lang.Integer.class, value)); return true; - case "timeunit": - case "timeUnit": target.setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true; - case "usefixeddelay": - case "useFixedDelay": target.setUseFixedDelay(property(camelContext, boolean.class, value)); return true; case "useragent": case "userAgent": target.getConfiguration().setUserAgent(property(camelContext, java.lang.String.class, value)); return true; default: return false; @@ -121,15 +90,10 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements answer.put("as2MessageStructure", org.apache.camel.component.as2.api.AS2MessageStructure.class); answer.put("as2To", java.lang.String.class); answer.put("as2Version", java.lang.String.class); - answer.put("backoffErrorThreshold", int.class); - answer.put("backoffIdleThreshold", int.class); - answer.put("backoffMultiplier", int.class); answer.put("basicPropertyBinding", boolean.class); - answer.put("bridgeErrorHandler", boolean.class); answer.put("clientFqdn", java.lang.String.class); answer.put("compressionAlgorithm", org.apache.camel.component.as2.api.AS2CompressionAlgorithm.class); answer.put("decryptingPrivateKey", java.security.PrivateKey.class); - answer.put("delay", long.class); answer.put("dispositionNotificationTo", java.lang.String.class); answer.put("ediMessageTransferEncoding", java.lang.String.class); answer.put("ediMessageType", org.apache.http.entity.ContentType.class); @@ -138,19 +102,10 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements answer.put("exceptionHandler", org.apache.camel.spi.ExceptionHandler.class); answer.put("exchangePattern", org.apache.camel.ExchangePattern.class); answer.put("from", java.lang.String.class); - answer.put("greedy", boolean.class); answer.put("inBody", java.lang.String.class); - answer.put("initialDelay", long.class); answer.put("lazyStartProducer", boolean.class); answer.put("mdnMessageTemplate", java.lang.String.class); - answer.put("pollStrategy", org.apache.camel.spi.PollingConsumerPollStrategy.class); - answer.put("repeatCount", long.class); answer.put("requestUri", java.lang.String.class); - answer.put("runLoggingLevel", org.apache.camel.LoggingLevel.class); - answer.put("scheduledExecutorService", java.util.concurrent.ScheduledExecutorService.class); - answer.put("scheduler", java.lang.Object.class); - answer.put("schedulerProperties", java.util.Map.class); - answer.put("sendEmptyMessageWhenIdle", boolean.class); answer.put("server", java.lang.String.class); answer.put("serverFqdn", java.lang.String.class); answer.put("serverPortNumber", java.lang.Integer.class); @@ -158,13 +113,10 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements answer.put("signingAlgorithm", org.apache.camel.component.as2.api.AS2SignatureAlgorithm.class); answer.put("signingCertificateChain", java.security.cert.Certificate[].class); answer.put("signingPrivateKey", java.security.PrivateKey.class); - answer.put("startScheduler", boolean.class); answer.put("subject", java.lang.String.class); answer.put("synchronous", boolean.class); answer.put("targetHostname", java.lang.String.class); answer.put("targetPortNumber", java.lang.Integer.class); - answer.put("timeUnit", java.util.concurrent.TimeUnit.class); - answer.put("useFixedDelay", boolean.class); answer.put("userAgent", java.lang.String.class); return answer; } @@ -181,23 +133,14 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements case "as2To": return target.getConfiguration().getAs2To(); case "as2version": case "as2Version": return target.getConfiguration().getAs2Version(); - case "backofferrorthreshold": - case "backoffErrorThreshold": return target.getBackoffErrorThreshold(); - case "backoffidlethreshold": - case "backoffIdleThreshold": return target.getBackoffIdleThreshold(); - case "backoffmultiplier": - case "backoffMultiplier": return target.getBackoffMultiplier(); case "basicpropertybinding": case "basicPropertyBinding": return target.isBasicPropertyBinding(); - case "bridgeerrorhandler": - case "bridgeErrorHandler": return target.isBridgeErrorHandler(); case "clientfqdn": case "clientFqdn": return target.getConfiguration().getClientFqdn(); case "compressionalgorithm": case "compressionAlgorithm": return target.getConfiguration().getCompressionAlgorithm(); case "decryptingprivatekey": case "decryptingPrivateKey": return target.getConfiguration().getDecryptingPrivateKey(); - case "delay": return target.getDelay(); case "dispositionnotificationto": case "dispositionNotificationTo": return target.getConfiguration().getDispositionNotificationTo(); case "edimessagetransferencoding": @@ -213,30 +156,14 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements case "exchangepattern": case "exchangePattern": return target.getExchangePattern(); case "from": return target.getConfiguration().getFrom(); - case "greedy": return target.isGreedy(); case "inbody": case "inBody": return target.getInBody(); - case "initialdelay": - case "initialDelay": return target.getInitialDelay(); case "lazystartproducer": case "lazyStartProducer": return target.isLazyStartProducer(); case "mdnmessagetemplate": case "mdnMessageTemplate": return target.getConfiguration().getMdnMessageTemplate(); - case "pollstrategy": - case "pollStrategy": return target.getPollStrategy(); - case "repeatcount": - case "repeatCount": return target.getRepeatCount(); case "requesturi": case "requestUri": return target.getConfiguration().getRequestUri(); - case "runlogginglevel": - case "runLoggingLevel": return target.getRunLoggingLevel(); - case "scheduledexecutorservice": - case "scheduledExecutorService": return target.getScheduledExecutorService(); - case "scheduler": return target.getScheduler(); - case "schedulerproperties": - case "schedulerProperties": return target.getSchedulerProperties(); - case "sendemptymessagewhenidle": - case "sendEmptyMessageWhenIdle": return target.isSendEmptyMessageWhenIdle(); case "server": return target.getConfiguration().getServer(); case "serverfqdn": case "serverFqdn": return target.getConfiguration().getServerFqdn(); @@ -250,18 +177,12 @@ public class AS2EndpointConfigurer extends PropertyConfigurerSupport implements case "signingCertificateChain": return target.getConfiguration().getSigningCertificateChain(); case "signingprivatekey": case "signingPrivateKey": return target.getConfiguration().getSigningPrivateKey(); - case "startscheduler": - case "startScheduler": return target.isStartScheduler(); case "subject": return target.getConfiguration().getSubject(); case "synchronous": return target.isSynchronous(); case "targethostname": case "targetHostname": return target.getConfiguration().getTargetHostname(); case "targetportnumber": case "targetPortNumber": return target.getConfiguration().getTargetPortNumber(); - case "timeunit": - case "timeUnit": return target.getTimeUnit(); - case "usefixeddelay": - case "useFixedDelay": return target.isUseFixedDelay(); case "useragent": case "userAgent": return target.getConfiguration().getUserAgent(); default: return null; diff --git a/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json b/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json index e60d15c..18ceb7f 100644 --- a/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json +++ b/components/camel-as2/camel-as2-component/src/generated/resources/org/apache/camel/component/as2/as2.json @@ -5,6 +5,7 @@ "title": "AS2", "description": "Transfer data securely and reliably using the AS2 protocol (RFC4130).", "deprecated": false, + "deprecationNote": "", "firstVersion": "2.22.0", "label": "file", "javaType": "org.apache.camel.component.as2.AS2Component", @@ -58,28 +59,11 @@ "targetHostname": { "kind": "parameter", "displayName": "Target Hostname", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The host name (IP or DNS name) of target host." }, "targetPortNumber": { "kind": "parameter", "displayName": "Target Port Number", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The port number of target host. -1 indicates the scheme default port." }, "userAgent": { "kind": "parameter", "displayName": "User Agent", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "Camel AS2 Client Endpoint", "configurationClass": "org.apache.camel.component.as2.AS2Configuration", "configurationField": "configuration", "description": "The value included in the User-Agent message header identifying the AS2 user agent." }, - "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 message and handled b [...] - "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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, "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 consumer will deal with [...] "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, "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, "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 before an Exchange h [...] "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the [...] "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, - "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, - "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": 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, "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, "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 again. When this option [...] - "delay": { "kind": "parameter", "displayName": "Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": 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, "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, "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, "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, "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 for that." }, - "scheduledExecutorService": { "kind": "parameter", "displayName": "Scheduled Executor Service", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.ScheduledExecutorService", "deprecated": 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, "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, "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, "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, "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, "secret": false, "defaultValue": "true", "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." } + "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." } }, "apis": { "client": { "description": "Sends EDI Messages over HTTP", "methods": { "send": { "description": "Send ediMessage to trading partner", "signatures": [ "org.apache.http.protocol.HttpCoreContext send(String ediMessage, String requestUri, String subject, String from, String as2From, String as2To, org.apache.camel.component.as2.api.AS2MessageStructure as2MessageStructure, org.apache.http.entity.ContentType ediMessageContentType, String ediMessageTransferEncoding, org.apache.camel.compone [...] diff --git a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc index fb14a1c..7cbe651 100644 --- a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc +++ b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc @@ -84,7 +84,7 @@ with the following path and query parameters: |=== -=== Query Parameters (49 parameters): +=== Query Parameters (32 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -117,28 +117,11 @@ with the following path and query parameters: | *targetHostname* (common) | The host name (IP or DNS name) of target host. | | String | *targetPortNumber* (common) | The port number of target host. -1 indicates the scheme default port. | | Integer | *userAgent* (common) | The value included in the User-Agent message header identifying the AS2 user agent. | Camel AS2 Client Endpoint | 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 [...] | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean -| *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 |=== @@ -216,7 +199,7 @@ The client API method(s) has the following set of parameters listed in the table | send | *subject* | Message subject | String |=== -In addition to the parameters above, the client API can also use from the 49 endpoint query option +In addition to the parameters above, the client API can also use from the 32 endpoint query option which is listed in the _Query Parameters_ section. Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. @@ -261,7 +244,7 @@ The server API method(s) has the following set of parameters listed in the table | listen | *requestUriPattern* | | String |=== -In addition to the parameters above, the server API can also use from the 49 endpoint query option +In addition to the parameters above, the server API can also use from the 32 endpoint query option which is listed in the _Query Parameters_ section. Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java index 4883814..7d1f505 100644 --- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java +++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java @@ -30,7 +30,6 @@ import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriParams; import org.apache.camel.spi.UriPath; -import org.apache.camel.support.component.AbstractApiConfiguration; import org.apache.http.entity.ContentType; /** @@ -38,7 +37,7 @@ import org.apache.http.entity.ContentType; */ @UriParams @Configurer -public class AS2Configuration extends AbstractApiConfiguration { +public class AS2Configuration { @UriPath @Metadata(required = true, enums = "client,server") diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java index 6290661..7e767eb 100644 --- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java +++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Consumer.java @@ -45,6 +45,9 @@ import org.slf4j.LoggerFactory; /** * The AS2 consumer. + * + * Implementation detail. This AS2 consumer extends AbstractApiConsumer but its not scheduled polling based. Instead it + * uses a HTTP listener to connect to AS2 server and listen for events. */ public class AS2Consumer extends AbstractApiConsumer<AS2ApiName, AS2Configuration> implements HttpRequestHandler { diff --git a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java index 20704b5..5cc3249 100644 --- a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java +++ b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java @@ -40,6 +40,7 @@ import org.apache.camel.component.as2.internal.AS2ApiName; import org.apache.camel.component.as2.internal.AS2ConnectionHelper; import org.apache.camel.component.as2.internal.AS2Constants; import org.apache.camel.component.as2.internal.AS2PropertiesHelper; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.support.component.AbstractApiEndpoint; @@ -53,6 +54,7 @@ import org.apache.http.entity.ContentType; @UriEndpoint(scheme = "as2", firstVersion = "2.22.0", title = "AS2", syntax = "as2:apiName/methodName", apiSyntax = "apiName/methodName", category = { Category.FILE }) +@Metadata(excludeProperties = "startScheduler,initialDelay,delay,timeUnit,useFixedDelay,pollStrategy,runLoggingLevel,sendEmptyMessageWhenIdle,greedy,scheduler,schedulerProperties,scheduledExecutorService,backoffMultiplier,backoffIdleThreshold,backoffErrorThreshold,repeatCount,bridgeErrorHandler") public class AS2Endpoint extends AbstractApiEndpoint<AS2ApiName, AS2Configuration> { @UriParam diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json index 4e1a4eb..b5899cf 100644 --- a/core/camel-componentdsl/src/generated/resources/metadata.json +++ b/core/camel-componentdsl/src/generated/resources/metadata.json @@ -161,6 +161,7 @@ "title": "AS2", "description": "Transfer data securely and reliably using the AS2 protocol (RFC4130).", "deprecated": false, + "deprecationNote": "", "firstVersion": "2.22.0", "label": "file", "javaType": "org.apache.camel.component.as2.AS2Component", diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java index 43d064e..7a5f597 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AS2EndpointBuilderFactory.java @@ -18,17 +18,12 @@ package org.apache.camel.builder.endpoint.dsl; import java.security.PrivateKey; import java.security.cert.Certificate; -import java.util.Map; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; import javax.annotation.Generated; import org.apache.camel.ExchangePattern; -import org.apache.camel.LoggingLevel; import org.apache.camel.builder.EndpointConsumerBuilder; import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; import org.apache.camel.spi.ExceptionHandler; -import org.apache.camel.spi.PollingConsumerPollStrategy; /** * Transfer data securely and reliably using the AS2 protocol (RFC4130). @@ -545,454 +540,6 @@ public interface AS2EndpointBuilderFactory { doSetProperty("userAgent", userAgent); return this; } - /** - * 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. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: consumer - */ - default AS2EndpointConsumerBuilder bridgeErrorHandler( - boolean bridgeErrorHandler) { - doSetProperty("bridgeErrorHandler", bridgeErrorHandler); - return this; - } - /** - * 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. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: consumer - */ - default AS2EndpointConsumerBuilder bridgeErrorHandler( - String bridgeErrorHandler) { - doSetProperty("bridgeErrorHandler", bridgeErrorHandler); - return this; - } - /** - * If the polling consumer did not poll any files, you can enable this - * option to send an empty message (no body) instead. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: consumer - */ - default AS2EndpointConsumerBuilder sendEmptyMessageWhenIdle( - boolean sendEmptyMessageWhenIdle) { - doSetProperty("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle); - return this; - } - /** - * If the polling consumer did not poll any files, you can enable this - * option to send an empty message (no body) instead. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: consumer - */ - default AS2EndpointConsumerBuilder sendEmptyMessageWhenIdle( - String sendEmptyMessageWhenIdle) { - doSetProperty("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle); - return this; - } - /** - * The number of subsequent error polls (failed due some error) that - * should happen before the backoffMultipler should kick-in. - * - * The option is a: <code>int</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder backoffErrorThreshold( - int backoffErrorThreshold) { - doSetProperty("backoffErrorThreshold", backoffErrorThreshold); - return this; - } - /** - * The number of subsequent error polls (failed due some error) that - * should happen before the backoffMultipler should kick-in. - * - * The option will be converted to a <code>int</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder backoffErrorThreshold( - String backoffErrorThreshold) { - doSetProperty("backoffErrorThreshold", backoffErrorThreshold); - return this; - } - /** - * The number of subsequent idle polls that should happen before the - * backoffMultipler should kick-in. - * - * The option is a: <code>int</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder backoffIdleThreshold( - int backoffIdleThreshold) { - doSetProperty("backoffIdleThreshold", backoffIdleThreshold); - return this; - } - /** - * The number of subsequent idle polls that should happen before the - * backoffMultipler should kick-in. - * - * The option will be converted to a <code>int</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder backoffIdleThreshold( - String backoffIdleThreshold) { - doSetProperty("backoffIdleThreshold", backoffIdleThreshold); - return this; - } - /** - * 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. - * - * The option is a: <code>int</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder backoffMultiplier( - int backoffMultiplier) { - doSetProperty("backoffMultiplier", backoffMultiplier); - return this; - } - /** - * 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. - * - * The option will be converted to a <code>int</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder backoffMultiplier( - String backoffMultiplier) { - doSetProperty("backoffMultiplier", backoffMultiplier); - return this; - } - /** - * Milliseconds before the next poll. - * - * The option is a: <code>long</code> type. - * - * Default: 500 - * Group: scheduler - */ - default AS2EndpointConsumerBuilder delay(long delay) { - doSetProperty("delay", delay); - return this; - } - /** - * Milliseconds before the next poll. - * - * The option will be converted to a <code>long</code> type. - * - * Default: 500 - * Group: scheduler - */ - default AS2EndpointConsumerBuilder delay(String delay) { - doSetProperty("delay", delay); - return this; - } - /** - * If greedy is enabled, then the ScheduledPollConsumer will run - * immediately again, if the previous run polled 1 or more messages. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: scheduler - */ - default AS2EndpointConsumerBuilder greedy(boolean greedy) { - doSetProperty("greedy", greedy); - return this; - } - /** - * If greedy is enabled, then the ScheduledPollConsumer will run - * immediately again, if the previous run polled 1 or more messages. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: scheduler - */ - default AS2EndpointConsumerBuilder greedy(String greedy) { - doSetProperty("greedy", greedy); - return this; - } - /** - * Milliseconds before the first poll starts. - * - * The option is a: <code>long</code> type. - * - * Default: 1000 - * Group: scheduler - */ - default AS2EndpointConsumerBuilder initialDelay(long initialDelay) { - doSetProperty("initialDelay", initialDelay); - return this; - } - /** - * Milliseconds before the first poll starts. - * - * The option will be converted to a <code>long</code> type. - * - * Default: 1000 - * Group: scheduler - */ - default AS2EndpointConsumerBuilder initialDelay(String initialDelay) { - doSetProperty("initialDelay", initialDelay); - return this; - } - /** - * 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. - * - * The option is a: <code>long</code> type. - * - * Default: 0 - * Group: scheduler - */ - default AS2EndpointConsumerBuilder repeatCount(long repeatCount) { - doSetProperty("repeatCount", repeatCount); - return this; - } - /** - * 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. - * - * The option will be converted to a <code>long</code> type. - * - * Default: 0 - * Group: scheduler - */ - default AS2EndpointConsumerBuilder repeatCount(String repeatCount) { - doSetProperty("repeatCount", repeatCount); - return this; - } - /** - * The consumer logs a start/complete log line when it polls. This - * option allows you to configure the logging level for that. - * - * The option is a: <code>org.apache.camel.LoggingLevel</code> type. - * - * Default: TRACE - * Group: scheduler - */ - default AS2EndpointConsumerBuilder runLoggingLevel( - LoggingLevel runLoggingLevel) { - doSetProperty("runLoggingLevel", runLoggingLevel); - return this; - } - /** - * The consumer logs a start/complete log line when it polls. This - * option allows you to configure the logging level for that. - * - * The option will be converted to a - * <code>org.apache.camel.LoggingLevel</code> type. - * - * Default: TRACE - * Group: scheduler - */ - default AS2EndpointConsumerBuilder runLoggingLevel( - String runLoggingLevel) { - doSetProperty("runLoggingLevel", runLoggingLevel); - return this; - } - /** - * Allows for configuring a custom/shared thread pool to use for the - * consumer. By default each consumer has its own single threaded thread - * pool. - * - * The option is a: - * <code>java.util.concurrent.ScheduledExecutorService</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder scheduledExecutorService( - ScheduledExecutorService scheduledExecutorService) { - doSetProperty("scheduledExecutorService", scheduledExecutorService); - return this; - } - /** - * Allows for configuring a custom/shared thread pool to use for the - * consumer. By default each consumer has its own single threaded thread - * pool. - * - * The option will be converted to a - * <code>java.util.concurrent.ScheduledExecutorService</code> type. - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder scheduledExecutorService( - String scheduledExecutorService) { - doSetProperty("scheduledExecutorService", scheduledExecutorService); - return this; - } - /** - * To use a cron scheduler from either camel-spring or camel-quartz - * component. Use value spring or quartz for built in scheduler. - * - * The option is a: <code>java.lang.Object</code> type. - * - * Default: none - * Group: scheduler - */ - default AS2EndpointConsumerBuilder scheduler(Object scheduler) { - doSetProperty("scheduler", scheduler); - return this; - } - /** - * To use a cron scheduler from either camel-spring or camel-quartz - * component. Use value spring or quartz for built in scheduler. - * - * The option will be converted to a <code>java.lang.Object</code> type. - * - * Default: none - * Group: scheduler - */ - default AS2EndpointConsumerBuilder scheduler(String scheduler) { - doSetProperty("scheduler", scheduler); - return this; - } - /** - * To configure additional properties when using a custom scheduler or - * any of the Quartz, Spring based scheduler. - * - * The option is a: <code>java.util.Map<java.lang.String, - * java.lang.Object></code> type. - * The option is multivalued, and you can use the - * schedulerProperties(String, Object) method to add a value (call the - * method multiple times to set more values). - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder schedulerProperties( - String key, - Object value) { - doSetMultiValueProperty("schedulerProperties", "scheduler." + key, value); - return this; - } - /** - * To configure additional properties when using a custom scheduler or - * any of the Quartz, Spring based scheduler. - * - * The option is a: <code>java.util.Map<java.lang.String, - * java.lang.Object></code> type. - * The option is multivalued, and you can use the - * schedulerProperties(String, Object) method to add a value (call the - * method multiple times to set more values). - * - * Group: scheduler - */ - default AS2EndpointConsumerBuilder schedulerProperties(Map values) { - doSetMultiValueProperties("schedulerProperties", "scheduler.", values); - return this; - } - /** - * Whether the scheduler should be auto started. - * - * The option is a: <code>boolean</code> type. - * - * Default: true - * Group: scheduler - */ - default AS2EndpointConsumerBuilder startScheduler(boolean startScheduler) { - doSetProperty("startScheduler", startScheduler); - return this; - } - /** - * Whether the scheduler should be auto started. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: true - * Group: scheduler - */ - default AS2EndpointConsumerBuilder startScheduler(String startScheduler) { - doSetProperty("startScheduler", startScheduler); - return this; - } - /** - * Time unit for initialDelay and delay options. - * - * The option is a: <code>java.util.concurrent.TimeUnit</code> type. - * - * Default: MILLISECONDS - * Group: scheduler - */ - default AS2EndpointConsumerBuilder timeUnit(TimeUnit timeUnit) { - doSetProperty("timeUnit", timeUnit); - return this; - } - /** - * Time unit for initialDelay and delay options. - * - * The option will be converted to a - * <code>java.util.concurrent.TimeUnit</code> type. - * - * Default: MILLISECONDS - * Group: scheduler - */ - default AS2EndpointConsumerBuilder timeUnit(String timeUnit) { - doSetProperty("timeUnit", timeUnit); - return this; - } - /** - * Controls if fixed delay or fixed rate is used. See - * ScheduledExecutorService in JDK for details. - * - * The option is a: <code>boolean</code> type. - * - * Default: true - * Group: scheduler - */ - default AS2EndpointConsumerBuilder useFixedDelay(boolean useFixedDelay) { - doSetProperty("useFixedDelay", useFixedDelay); - return this; - } - /** - * Controls if fixed delay or fixed rate is used. See - * ScheduledExecutorService in JDK for details. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: true - * Group: scheduler - */ - default AS2EndpointConsumerBuilder useFixedDelay(String useFixedDelay) { - doSetProperty("useFixedDelay", useFixedDelay); - return this; - } } /** @@ -1062,38 +609,6 @@ public interface AS2EndpointBuilderFactory { return this; } /** - * 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. - * - * The option is a: - * <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. - * - * Group: consumer (advanced) - */ - default AdvancedAS2EndpointConsumerBuilder pollStrategy( - PollingConsumerPollStrategy pollStrategy) { - doSetProperty("pollStrategy", pollStrategy); - return this; - } - /** - * 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. - * - * The option will be converted to a - * <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. - * - * Group: consumer (advanced) - */ - default AdvancedAS2EndpointConsumerBuilder pollStrategy( - String pollStrategy) { - doSetProperty("pollStrategy", pollStrategy); - return this; - } - /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * diff --git a/docs/components/modules/ROOT/pages/as2-component.adoc b/docs/components/modules/ROOT/pages/as2-component.adoc index 03684ef..f49eced 100644 --- a/docs/components/modules/ROOT/pages/as2-component.adoc +++ b/docs/components/modules/ROOT/pages/as2-component.adoc @@ -86,7 +86,7 @@ with the following path and query parameters: |=== -=== Query Parameters (49 parameters): +=== Query Parameters (32 parameters): [width="100%",cols="2,5,^1,2",options="header"] @@ -119,28 +119,11 @@ with the following path and query parameters: | *targetHostname* (common) | The host name (IP or DNS name) of target host. | | String | *targetPortNumber* (common) | The port number of target host. -1 indicates the scheme default port. | | Integer | *userAgent* (common) | The value included in the User-Agent message header identifying the AS2 user agent. | Camel AS2 Client Endpoint | 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 [...] | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean -| *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 |=== @@ -218,7 +201,7 @@ The client API method(s) has the following set of parameters listed in the table | send | *subject* | Message subject | String |=== -In addition to the parameters above, the client API can also use from the 49 endpoint query option +In addition to the parameters above, the client API can also use from the 32 endpoint query option which is listed in the _Query Parameters_ section. Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. @@ -263,7 +246,7 @@ The server API method(s) has the following set of parameters listed in the table | listen | *requestUriPattern* | | String |=== -In addition to the parameters above, the server API can also use from the 49 endpoint query option +In addition to the parameters above, the server API can also use from the 32 endpoint query option which is listed in the _Query Parameters_ section. Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header. diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel index aab767a..904a7e7 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel +++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel @@ -97,14 +97,6 @@ The message header name must be of the format `Camel@{util.componentName(scheme) The `inBody` parameter overrides message header, i.e. the endpoint parameter `inBody=myParameterNameHere` would override a `Camel@{util.componentName(scheme)}.myParameterNameHere` header. -@if{!producerOnly} -Any of the producer endpoints can be used as a consumer endpoint. -Consumer endpoints can use Scheduled Poll Consumer Options to schedule endpoint invocation. -By default consumer endpoints that return an array or collection will generate one exchange per element, -and their routes will be executed once for each exchange. To change this behavior use the property `splitResults=false` -to return a single exchange for the entire list or array. -@end{} - @end{} @end{}