blob: 9fa9bc4929fd5b09fb3ac885725e8ec2e20e7f6d [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.builder.endpoint.dsl;
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.HeaderFilterStrategy;
/**
* The sjms2 component (simple jms) allows messages to be sent to (or consumed
* from) a JMS Queue or Topic (uses JMS 2.x API).
*
* Generated by camel-package-maven-plugin - do not edit this file!
*/
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface Sjms2EndpointBuilderFactory {
/**
* Builder for endpoint consumers for the Simple JMS2 component.
*/
public interface Sjms2EndpointConsumerBuilder
extends
EndpointConsumerBuilder {
default AdvancedSjms2EndpointConsumerBuilder advanced() {
return (AdvancedSjms2EndpointConsumerBuilder) this;
}
/**
* Sets topic consumer to durable.
*
* The option is a: <code>boolean</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder durable(boolean durable) {
setProperty("durable", durable);
return this;
}
/**
* Sets topic consumer to durable.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder durable(String durable) {
setProperty("durable", durable);
return this;
}
/**
* Sets the consumer to shared.
*
* The option is a: <code>boolean</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder shared(boolean shared) {
setProperty("shared", shared);
return this;
}
/**
* Sets the consumer to shared.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder shared(String shared) {
setProperty("shared", shared);
return this;
}
/**
* Sets the subscription Id, required for durable or shared topics.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder subscriptionId(
String subscriptionId) {
setProperty("subscriptionId", subscriptionId);
return this;
}
/**
* The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
* CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> type.
*
* Group: common
*/
default Sjms2EndpointConsumerBuilder acknowledgementMode(
SessionAcknowledgementType acknowledgementMode) {
setProperty("acknowledgementMode", acknowledgementMode);
return this;
}
/**
* The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
* CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> type.
*
* Group: common
*/
default Sjms2EndpointConsumerBuilder acknowledgementMode(
String acknowledgementMode) {
setProperty("acknowledgementMode", acknowledgementMode);
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.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder bridgeErrorHandler(
boolean bridgeErrorHandler) {
setProperty("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.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder bridgeErrorHandler(
String bridgeErrorHandler) {
setProperty("bridgeErrorHandler", bridgeErrorHandler);
return this;
}
/**
* Sets the number of consumer listeners used for this endpoint.
*
* The option is a: <code>int</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder consumerCount(int consumerCount) {
setProperty("consumerCount", consumerCount);
return this;
}
/**
* Sets the number of consumer listeners used for this endpoint.
*
* The option will be converted to a <code>int</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder consumerCount(String consumerCount) {
setProperty("consumerCount", consumerCount);
return this;
}
/**
* Sets the durable subscription Id required for durable topics.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder durableSubscriptionId(
String durableSubscriptionId) {
setProperty("durableSubscriptionId", durableSubscriptionId);
return this;
}
/**
* Sets whether synchronous processing should be strictly used or Camel
* is allowed to use asynchronous processing (if supported).
*
* The option is a: <code>boolean</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder synchronous(boolean synchronous) {
setProperty("synchronous", synchronous);
return this;
}
/**
* Sets whether synchronous processing should be strictly used or Camel
* is allowed to use asynchronous processing (if supported).
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: consumer
*/
default Sjms2EndpointConsumerBuilder synchronous(String synchronous) {
setProperty("synchronous", synchronous);
return this;
}
/**
* Allows to configure the default errorHandler logging level for
* logging uncaught exceptions.
*
* The option is a: <code>org.apache.camel.LoggingLevel</code> type.
*
* Group: logging
*/
default Sjms2EndpointConsumerBuilder errorHandlerLoggingLevel(
LoggingLevel errorHandlerLoggingLevel) {
setProperty("errorHandlerLoggingLevel", errorHandlerLoggingLevel);
return this;
}
/**
* Allows to configure the default errorHandler logging level for
* logging uncaught exceptions.
*
* The option will be converted to a
* <code>org.apache.camel.LoggingLevel</code> type.
*
* Group: logging
*/
default Sjms2EndpointConsumerBuilder errorHandlerLoggingLevel(
String errorHandlerLoggingLevel) {
setProperty("errorHandlerLoggingLevel", errorHandlerLoggingLevel);
return this;
}
/**
* Allows to control whether stacktraces should be logged or not, by the
* default errorHandler.
*
* The option is a: <code>boolean</code> type.
*
* Group: logging
*/
default Sjms2EndpointConsumerBuilder errorHandlerLogStackTrace(
boolean errorHandlerLogStackTrace) {
setProperty("errorHandlerLogStackTrace", errorHandlerLogStackTrace);
return this;
}
/**
* Allows to control whether stacktraces should be logged or not, by the
* default errorHandler.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: logging
*/
default Sjms2EndpointConsumerBuilder errorHandlerLogStackTrace(
String errorHandlerLogStackTrace) {
setProperty("errorHandlerLogStackTrace", errorHandlerLogStackTrace);
return this;
}
/**
* Specifies whether to use transacted mode.
*
* The option is a: <code>boolean</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transacted(boolean transacted) {
setProperty("transacted", transacted);
return this;
}
/**
* Specifies whether to use transacted mode.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transacted(String transacted) {
setProperty("transacted", transacted);
return this;
}
/**
* If transacted sets the number of messages to process before
* committing a transaction.
*
* The option is a: <code>int</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transactionBatchCount(
int transactionBatchCount) {
setProperty("transactionBatchCount", transactionBatchCount);
return this;
}
/**
* If transacted sets the number of messages to process before
* committing a transaction.
*
* The option will be converted to a <code>int</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transactionBatchCount(
String transactionBatchCount) {
setProperty("transactionBatchCount", transactionBatchCount);
return this;
}
/**
* Sets timeout (in millis) for batch transactions, the value should be
* 1000 or higher.
*
* The option is a: <code>long</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transactionBatchTimeout(
long transactionBatchTimeout) {
setProperty("transactionBatchTimeout", transactionBatchTimeout);
return this;
}
/**
* Sets timeout (in millis) for batch transactions, the value should be
* 1000 or higher.
*
* The option will be converted to a <code>long</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transactionBatchTimeout(
String transactionBatchTimeout) {
setProperty("transactionBatchTimeout", transactionBatchTimeout);
return this;
}
/**
* Sets the commit strategy.
*
* The option is a:
* <code>org.apache.camel.component.sjms.TransactionCommitStrategy</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transactionCommitStrategy(
Object transactionCommitStrategy) {
setProperty("transactionCommitStrategy", transactionCommitStrategy);
return this;
}
/**
* Sets the commit strategy.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.TransactionCommitStrategy</code> type.
*
* Group: transaction
*/
default Sjms2EndpointConsumerBuilder transactionCommitStrategy(
String transactionCommitStrategy) {
setProperty("transactionCommitStrategy", transactionCommitStrategy);
return this;
}
}
/**
* Advanced builder for endpoint consumers for the Simple JMS2 component.
*/
public interface AdvancedSjms2EndpointConsumerBuilder
extends
EndpointConsumerBuilder {
default Sjms2EndpointConsumerBuilder basic() {
return (Sjms2EndpointConsumerBuilder) this;
}
/**
* 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.
*
* The option is a: <code>org.apache.camel.spi.ExceptionHandler</code>
* type.
*
* Group: consumer (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder exceptionHandler(
ExceptionHandler exceptionHandler) {
setProperty("exceptionHandler", exceptionHandler);
return this;
}
/**
* 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.
*
* The option will be converted to a
* <code>org.apache.camel.spi.ExceptionHandler</code> type.
*
* Group: consumer (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder exceptionHandler(
String exceptionHandler) {
setProperty("exceptionHandler", exceptionHandler);
return this;
}
/**
* Sets the exchange pattern when the consumer creates an exchange.
*
* The option is a: <code>org.apache.camel.ExchangePattern</code> type.
*
* Group: consumer (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder exchangePattern(
ExchangePattern exchangePattern) {
setProperty("exchangePattern", exchangePattern);
return this;
}
/**
* Sets the exchange pattern when the consumer creates an exchange.
*
* The option will be converted to a
* <code>org.apache.camel.ExchangePattern</code> type.
*
* Group: consumer (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder exchangePattern(
String exchangePattern) {
setProperty("exchangePattern", exchangePattern);
return this;
}
/**
* Sets the JMS Message selector syntax.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: consumer (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder messageSelector(
String messageSelector) {
setProperty("messageSelector", messageSelector);
return this;
}
/**
* Whether to startup the consumer message listener asynchronously, when
* starting a route. For example if a JmsConsumer cannot get a
* connection to a remote JMS broker, then it may block while retrying
* and/or failover. This will cause Camel to block while starting
* routes. By setting this option to true, you will let routes startup,
* while the JmsConsumer connects to the JMS broker using a dedicated
* thread in asynchronous mode. If this option is used, then beware that
* if the connection could not be established, then an exception is
* logged at WARN level, and the consumer will not be able to receive
* messages; You can then restart the route to retry.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder asyncStartListener(
boolean asyncStartListener) {
setProperty("asyncStartListener", asyncStartListener);
return this;
}
/**
* Whether to startup the consumer message listener asynchronously, when
* starting a route. For example if a JmsConsumer cannot get a
* connection to a remote JMS broker, then it may block while retrying
* and/or failover. This will cause Camel to block while starting
* routes. By setting this option to true, you will let routes startup,
* while the JmsConsumer connects to the JMS broker using a dedicated
* thread in asynchronous mode. If this option is used, then beware that
* if the connection could not be established, then an exception is
* logged at WARN level, and the consumer will not be able to receive
* messages; You can then restart the route to retry.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder asyncStartListener(
String asyncStartListener) {
setProperty("asyncStartListener", asyncStartListener);
return this;
}
/**
* Whether to stop the consumer message listener asynchronously, when
* stopping a route.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder asyncStopListener(
boolean asyncStopListener) {
setProperty("asyncStopListener", asyncStopListener);
return this;
}
/**
* Whether to stop the consumer message listener asynchronously, when
* stopping a route.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder asyncStopListener(
String asyncStopListener) {
setProperty("asyncStopListener", asyncStopListener);
return this;
}
/**
* Whether the endpoint should use basic property binding (Camel 2.x) or
* the newer property binding with additional capabilities.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder basicPropertyBinding(
boolean basicPropertyBinding) {
setProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* Whether the endpoint should use basic property binding (Camel 2.x) or
* the newer property binding with additional capabilities.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder basicPropertyBinding(
String basicPropertyBinding) {
setProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* The maximum number of connections available to this endpoint.
*
* The option is a: <code>java.lang.Integer</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder connectionCount(
Integer connectionCount) {
setProperty("connectionCount", connectionCount);
return this;
}
/**
* The maximum number of connections available to this endpoint.
*
* The option will be converted to a <code>java.lang.Integer</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder connectionCount(
String connectionCount) {
setProperty("connectionCount", connectionCount);
return this;
}
/**
* Initializes the connectionFactory for the endpoint, which takes
* precedence over the component's connectionFactory, if any.
*
* The option is a: <code>javax.jms.ConnectionFactory</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder connectionFactory(
Object connectionFactory) {
setProperty("connectionFactory", connectionFactory);
return this;
}
/**
* Initializes the connectionFactory for the endpoint, which takes
* precedence over the component's connectionFactory, if any.
*
* The option will be converted to a
* <code>javax.jms.ConnectionFactory</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder connectionFactory(
String connectionFactory) {
setProperty("connectionFactory", connectionFactory);
return this;
}
/**
* Initializes the connectionResource for the endpoint, which takes
* precedence over the component's connectionResource, if any.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.ConnectionResource</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder connectionResource(
Object connectionResource) {
setProperty("connectionResource", connectionResource);
return this;
}
/**
* Initializes the connectionResource for the endpoint, which takes
* precedence over the component's connectionResource, if any.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.ConnectionResource</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder connectionResource(
String connectionResource) {
setProperty("connectionResource", connectionResource);
return this;
}
/**
* To use a custom DestinationCreationStrategy.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder destinationCreationStrategy(
Object destinationCreationStrategy) {
setProperty("destinationCreationStrategy", destinationCreationStrategy);
return this;
}
/**
* To use a custom DestinationCreationStrategy.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder destinationCreationStrategy(
String destinationCreationStrategy) {
setProperty("destinationCreationStrategy", destinationCreationStrategy);
return this;
}
/**
* Specifies the JMS Exception Listener that is to be notified of any
* underlying JMS exceptions.
*
* The option is a: <code>javax.jms.ExceptionListener</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder exceptionListener(
Object exceptionListener) {
setProperty("exceptionListener", exceptionListener);
return this;
}
/**
* Specifies the JMS Exception Listener that is to be notified of any
* underlying JMS exceptions.
*
* The option will be converted to a
* <code>javax.jms.ExceptionListener</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder exceptionListener(
String exceptionListener) {
setProperty("exceptionListener", exceptionListener);
return this;
}
/**
* To use a custom HeaderFilterStrategy to filter header to and from
* Camel message.
*
* The option is a:
* <code>org.apache.camel.spi.HeaderFilterStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder headerFilterStrategy(
HeaderFilterStrategy headerFilterStrategy) {
setProperty("headerFilterStrategy", headerFilterStrategy);
return this;
}
/**
* To use a custom HeaderFilterStrategy to filter header to and from
* Camel message.
*
* The option will be converted to a
* <code>org.apache.camel.spi.HeaderFilterStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder headerFilterStrategy(
String headerFilterStrategy) {
setProperty("headerFilterStrategy", headerFilterStrategy);
return this;
}
/**
* Whether to include all JMSXxxx properties when mapping from JMS to
* Camel Message. Setting this to true will include properties such as
* JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
* headerFilterStrategy then this option does not apply.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder includeAllJMSXProperties(
boolean includeAllJMSXProperties) {
setProperty("includeAllJMSXProperties", includeAllJMSXProperties);
return this;
}
/**
* Whether to include all JMSXxxx properties when mapping from JMS to
* Camel Message. Setting this to true will include properties such as
* JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
* headerFilterStrategy then this option does not apply.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder includeAllJMSXProperties(
String includeAllJMSXProperties) {
setProperty("includeAllJMSXProperties", includeAllJMSXProperties);
return this;
}
/**
* Pluggable strategy for encoding and decoding JMS keys so they can be
* compliant with the JMS specification. Camel provides two
* implementations out of the box: default and passthrough. The default
* strategy will safely marshal dots and hyphens (. and -). The
* passthrough strategy leaves the key as is. Can be used for JMS
* brokers which do not care whether JMS header keys contain illegal
* characters. You can provide your own implementation of the
* org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
* using the # notation.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder jmsKeyFormatStrategy(
Object jmsKeyFormatStrategy) {
setProperty("jmsKeyFormatStrategy", jmsKeyFormatStrategy);
return this;
}
/**
* Pluggable strategy for encoding and decoding JMS keys so they can be
* compliant with the JMS specification. Camel provides two
* implementations out of the box: default and passthrough. The default
* strategy will safely marshal dots and hyphens (. and -). The
* passthrough strategy leaves the key as is. Can be used for JMS
* brokers which do not care whether JMS header keys contain illegal
* characters. You can provide your own implementation of the
* org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
* using the # notation.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder jmsKeyFormatStrategy(
String jmsKeyFormatStrategy) {
setProperty("jmsKeyFormatStrategy", jmsKeyFormatStrategy);
return this;
}
/**
* Specifies whether Camel should auto map the received JMS message to a
* suited payload type, such as javax.jms.TextMessage to a String etc.
* See section about how mapping works below for more details.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder mapJmsMessage(
boolean mapJmsMessage) {
setProperty("mapJmsMessage", mapJmsMessage);
return this;
}
/**
* Specifies whether Camel should auto map the received JMS message to a
* suited payload type, such as javax.jms.TextMessage to a String etc.
* See section about how mapping works below for more details.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder mapJmsMessage(
String mapJmsMessage) {
setProperty("mapJmsMessage", mapJmsMessage);
return this;
}
/**
* To use the given MessageCreatedStrategy which are invoked when Camel
* creates new instances of javax.jms.Message objects when Camel is
* sending a JMS message.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder messageCreatedStrategy(
Object messageCreatedStrategy) {
setProperty("messageCreatedStrategy", messageCreatedStrategy);
return this;
}
/**
* To use the given MessageCreatedStrategy which are invoked when Camel
* creates new instances of javax.jms.Message objects when Camel is
* sending a JMS message.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointConsumerBuilder messageCreatedStrategy(
String messageCreatedStrategy) {
setProperty("messageCreatedStrategy", messageCreatedStrategy);
return this;
}
/**
* Specifies whether to share JMS session with other SJMS endpoints.
* Turn this off if your route is accessing to multiple JMS providers.
* If you need transaction against multiple JMS providers, use jms
* component to leverage XA transaction.
*
* The option is a: <code>boolean</code> type.
*
* Group: transaction (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder sharedJMSSession(
boolean sharedJMSSession) {
setProperty("sharedJMSSession", sharedJMSSession);
return this;
}
/**
* Specifies whether to share JMS session with other SJMS endpoints.
* Turn this off if your route is accessing to multiple JMS providers.
* If you need transaction against multiple JMS providers, use jms
* component to leverage XA transaction.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: transaction (advanced)
*/
default AdvancedSjms2EndpointConsumerBuilder sharedJMSSession(
String sharedJMSSession) {
setProperty("sharedJMSSession", sharedJMSSession);
return this;
}
}
/**
* Builder for endpoint producers for the Simple JMS2 component.
*/
public interface Sjms2EndpointProducerBuilder
extends
EndpointProducerBuilder {
default AdvancedSjms2EndpointProducerBuilder advanced() {
return (AdvancedSjms2EndpointProducerBuilder) this;
}
/**
* The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
* CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> type.
*
* Group: common
*/
default Sjms2EndpointProducerBuilder acknowledgementMode(
SessionAcknowledgementType acknowledgementMode) {
setProperty("acknowledgementMode", acknowledgementMode);
return this;
}
/**
* The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
* CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> type.
*
* Group: common
*/
default Sjms2EndpointProducerBuilder acknowledgementMode(
String acknowledgementMode) {
setProperty("acknowledgementMode", acknowledgementMode);
return this;
}
/**
* 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 starting the
* producer may take a little time and prolong the total processing time
* of the processing.
*
* The option is a: <code>boolean</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder lazyStartProducer(
boolean lazyStartProducer) {
setProperty("lazyStartProducer", lazyStartProducer);
return this;
}
/**
* 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 starting the
* producer may take a little time and prolong the total processing time
* of the processing.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder lazyStartProducer(
String lazyStartProducer) {
setProperty("lazyStartProducer", lazyStartProducer);
return this;
}
/**
* Sets the reply to destination name used for InOut producer endpoints.
* The type of the reply to destination can be determined by the
* starting prefix (topic: or queue:) in its name.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder namedReplyTo(String namedReplyTo) {
setProperty("namedReplyTo", namedReplyTo);
return this;
}
/**
* Flag used to enable/disable message persistence.
*
* The option is a: <code>boolean</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder persistent(boolean persistent) {
setProperty("persistent", persistent);
return this;
}
/**
* Flag used to enable/disable message persistence.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder persistent(String persistent) {
setProperty("persistent", persistent);
return this;
}
/**
* Sets the number of producers used for this endpoint.
*
* The option is a: <code>int</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder producerCount(int producerCount) {
setProperty("producerCount", producerCount);
return this;
}
/**
* Sets the number of producers used for this endpoint.
*
* The option will be converted to a <code>int</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder producerCount(String producerCount) {
setProperty("producerCount", producerCount);
return this;
}
/**
* Flag used to adjust the Time To Live value of produced messages.
*
* The option is a: <code>long</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder ttl(long ttl) {
setProperty("ttl", ttl);
return this;
}
/**
* Flag used to adjust the Time To Live value of produced messages.
*
* The option will be converted to a <code>long</code> type.
*
* Group: producer
*/
default Sjms2EndpointProducerBuilder ttl(String ttl) {
setProperty("ttl", ttl);
return this;
}
/**
* Sets the commit strategy.
*
* The option is a:
* <code>org.apache.camel.component.sjms.TransactionCommitStrategy</code> type.
*
* Group: transaction
*/
default Sjms2EndpointProducerBuilder transactionCommitStrategy(
Object transactionCommitStrategy) {
setProperty("transactionCommitStrategy", transactionCommitStrategy);
return this;
}
/**
* Sets the commit strategy.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.TransactionCommitStrategy</code> type.
*
* Group: transaction
*/
default Sjms2EndpointProducerBuilder transactionCommitStrategy(
String transactionCommitStrategy) {
setProperty("transactionCommitStrategy", transactionCommitStrategy);
return this;
}
}
/**
* Advanced builder for endpoint producers for the Simple JMS2 component.
*/
public interface AdvancedSjms2EndpointProducerBuilder
extends
EndpointProducerBuilder {
default Sjms2EndpointProducerBuilder basic() {
return (Sjms2EndpointProducerBuilder) this;
}
/**
* Whether to allow sending messages with no body. If this option is
* false and the message body is null, then an JMSException is thrown.
*
* The option is a: <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder allowNullBody(
boolean allowNullBody) {
setProperty("allowNullBody", allowNullBody);
return this;
}
/**
* Whether to allow sending messages with no body. If this option is
* false and the message body is null, then an JMSException is thrown.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder allowNullBody(
String allowNullBody) {
setProperty("allowNullBody", allowNullBody);
return this;
}
/**
* Whether to prefill the producer connection pool on startup, or create
* connections lazy when needed.
*
* The option is a: <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder prefillPool(
boolean prefillPool) {
setProperty("prefillPool", prefillPool);
return this;
}
/**
* Whether to prefill the producer connection pool on startup, or create
* connections lazy when needed.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: producer (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder prefillPool(
String prefillPool) {
setProperty("prefillPool", prefillPool);
return this;
}
/**
* Sets the amount of time we should wait before timing out a InOut
* response.
*
* The option is a: <code>long</code> type.
*
* Group: producer (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder responseTimeOut(
long responseTimeOut) {
setProperty("responseTimeOut", responseTimeOut);
return this;
}
/**
* Sets the amount of time we should wait before timing out a InOut
* response.
*
* The option will be converted to a <code>long</code> type.
*
* Group: producer (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder responseTimeOut(
String responseTimeOut) {
setProperty("responseTimeOut", responseTimeOut);
return this;
}
/**
* Whether to startup the consumer message listener asynchronously, when
* starting a route. For example if a JmsConsumer cannot get a
* connection to a remote JMS broker, then it may block while retrying
* and/or failover. This will cause Camel to block while starting
* routes. By setting this option to true, you will let routes startup,
* while the JmsConsumer connects to the JMS broker using a dedicated
* thread in asynchronous mode. If this option is used, then beware that
* if the connection could not be established, then an exception is
* logged at WARN level, and the consumer will not be able to receive
* messages; You can then restart the route to retry.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder asyncStartListener(
boolean asyncStartListener) {
setProperty("asyncStartListener", asyncStartListener);
return this;
}
/**
* Whether to startup the consumer message listener asynchronously, when
* starting a route. For example if a JmsConsumer cannot get a
* connection to a remote JMS broker, then it may block while retrying
* and/or failover. This will cause Camel to block while starting
* routes. By setting this option to true, you will let routes startup,
* while the JmsConsumer connects to the JMS broker using a dedicated
* thread in asynchronous mode. If this option is used, then beware that
* if the connection could not be established, then an exception is
* logged at WARN level, and the consumer will not be able to receive
* messages; You can then restart the route to retry.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder asyncStartListener(
String asyncStartListener) {
setProperty("asyncStartListener", asyncStartListener);
return this;
}
/**
* Whether to stop the consumer message listener asynchronously, when
* stopping a route.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder asyncStopListener(
boolean asyncStopListener) {
setProperty("asyncStopListener", asyncStopListener);
return this;
}
/**
* Whether to stop the consumer message listener asynchronously, when
* stopping a route.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder asyncStopListener(
String asyncStopListener) {
setProperty("asyncStopListener", asyncStopListener);
return this;
}
/**
* Whether the endpoint should use basic property binding (Camel 2.x) or
* the newer property binding with additional capabilities.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder basicPropertyBinding(
boolean basicPropertyBinding) {
setProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* Whether the endpoint should use basic property binding (Camel 2.x) or
* the newer property binding with additional capabilities.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder basicPropertyBinding(
String basicPropertyBinding) {
setProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* The maximum number of connections available to this endpoint.
*
* The option is a: <code>java.lang.Integer</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder connectionCount(
Integer connectionCount) {
setProperty("connectionCount", connectionCount);
return this;
}
/**
* The maximum number of connections available to this endpoint.
*
* The option will be converted to a <code>java.lang.Integer</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder connectionCount(
String connectionCount) {
setProperty("connectionCount", connectionCount);
return this;
}
/**
* Initializes the connectionFactory for the endpoint, which takes
* precedence over the component's connectionFactory, if any.
*
* The option is a: <code>javax.jms.ConnectionFactory</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder connectionFactory(
Object connectionFactory) {
setProperty("connectionFactory", connectionFactory);
return this;
}
/**
* Initializes the connectionFactory for the endpoint, which takes
* precedence over the component's connectionFactory, if any.
*
* The option will be converted to a
* <code>javax.jms.ConnectionFactory</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder connectionFactory(
String connectionFactory) {
setProperty("connectionFactory", connectionFactory);
return this;
}
/**
* Initializes the connectionResource for the endpoint, which takes
* precedence over the component's connectionResource, if any.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.ConnectionResource</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder connectionResource(
Object connectionResource) {
setProperty("connectionResource", connectionResource);
return this;
}
/**
* Initializes the connectionResource for the endpoint, which takes
* precedence over the component's connectionResource, if any.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.ConnectionResource</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder connectionResource(
String connectionResource) {
setProperty("connectionResource", connectionResource);
return this;
}
/**
* To use a custom DestinationCreationStrategy.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder destinationCreationStrategy(
Object destinationCreationStrategy) {
setProperty("destinationCreationStrategy", destinationCreationStrategy);
return this;
}
/**
* To use a custom DestinationCreationStrategy.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder destinationCreationStrategy(
String destinationCreationStrategy) {
setProperty("destinationCreationStrategy", destinationCreationStrategy);
return this;
}
/**
* Specifies the JMS Exception Listener that is to be notified of any
* underlying JMS exceptions.
*
* The option is a: <code>javax.jms.ExceptionListener</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder exceptionListener(
Object exceptionListener) {
setProperty("exceptionListener", exceptionListener);
return this;
}
/**
* Specifies the JMS Exception Listener that is to be notified of any
* underlying JMS exceptions.
*
* The option will be converted to a
* <code>javax.jms.ExceptionListener</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder exceptionListener(
String exceptionListener) {
setProperty("exceptionListener", exceptionListener);
return this;
}
/**
* To use a custom HeaderFilterStrategy to filter header to and from
* Camel message.
*
* The option is a:
* <code>org.apache.camel.spi.HeaderFilterStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder headerFilterStrategy(
HeaderFilterStrategy headerFilterStrategy) {
setProperty("headerFilterStrategy", headerFilterStrategy);
return this;
}
/**
* To use a custom HeaderFilterStrategy to filter header to and from
* Camel message.
*
* The option will be converted to a
* <code>org.apache.camel.spi.HeaderFilterStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder headerFilterStrategy(
String headerFilterStrategy) {
setProperty("headerFilterStrategy", headerFilterStrategy);
return this;
}
/**
* Whether to include all JMSXxxx properties when mapping from JMS to
* Camel Message. Setting this to true will include properties such as
* JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
* headerFilterStrategy then this option does not apply.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder includeAllJMSXProperties(
boolean includeAllJMSXProperties) {
setProperty("includeAllJMSXProperties", includeAllJMSXProperties);
return this;
}
/**
* Whether to include all JMSXxxx properties when mapping from JMS to
* Camel Message. Setting this to true will include properties such as
* JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
* headerFilterStrategy then this option does not apply.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder includeAllJMSXProperties(
String includeAllJMSXProperties) {
setProperty("includeAllJMSXProperties", includeAllJMSXProperties);
return this;
}
/**
* Pluggable strategy for encoding and decoding JMS keys so they can be
* compliant with the JMS specification. Camel provides two
* implementations out of the box: default and passthrough. The default
* strategy will safely marshal dots and hyphens (. and -). The
* passthrough strategy leaves the key as is. Can be used for JMS
* brokers which do not care whether JMS header keys contain illegal
* characters. You can provide your own implementation of the
* org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
* using the # notation.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder jmsKeyFormatStrategy(
Object jmsKeyFormatStrategy) {
setProperty("jmsKeyFormatStrategy", jmsKeyFormatStrategy);
return this;
}
/**
* Pluggable strategy for encoding and decoding JMS keys so they can be
* compliant with the JMS specification. Camel provides two
* implementations out of the box: default and passthrough. The default
* strategy will safely marshal dots and hyphens (. and -). The
* passthrough strategy leaves the key as is. Can be used for JMS
* brokers which do not care whether JMS header keys contain illegal
* characters. You can provide your own implementation of the
* org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
* using the # notation.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder jmsKeyFormatStrategy(
String jmsKeyFormatStrategy) {
setProperty("jmsKeyFormatStrategy", jmsKeyFormatStrategy);
return this;
}
/**
* Specifies whether Camel should auto map the received JMS message to a
* suited payload type, such as javax.jms.TextMessage to a String etc.
* See section about how mapping works below for more details.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder mapJmsMessage(
boolean mapJmsMessage) {
setProperty("mapJmsMessage", mapJmsMessage);
return this;
}
/**
* Specifies whether Camel should auto map the received JMS message to a
* suited payload type, such as javax.jms.TextMessage to a String etc.
* See section about how mapping works below for more details.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder mapJmsMessage(
String mapJmsMessage) {
setProperty("mapJmsMessage", mapJmsMessage);
return this;
}
/**
* To use the given MessageCreatedStrategy which are invoked when Camel
* creates new instances of javax.jms.Message objects when Camel is
* sending a JMS message.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder messageCreatedStrategy(
Object messageCreatedStrategy) {
setProperty("messageCreatedStrategy", messageCreatedStrategy);
return this;
}
/**
* To use the given MessageCreatedStrategy which are invoked when Camel
* creates new instances of javax.jms.Message objects when Camel is
* sending a JMS message.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointProducerBuilder messageCreatedStrategy(
String messageCreatedStrategy) {
setProperty("messageCreatedStrategy", messageCreatedStrategy);
return this;
}
/**
* Specifies whether to share JMS session with other SJMS endpoints.
* Turn this off if your route is accessing to multiple JMS providers.
* If you need transaction against multiple JMS providers, use jms
* component to leverage XA transaction.
*
* The option is a: <code>boolean</code> type.
*
* Group: transaction (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder sharedJMSSession(
boolean sharedJMSSession) {
setProperty("sharedJMSSession", sharedJMSSession);
return this;
}
/**
* Specifies whether to share JMS session with other SJMS endpoints.
* Turn this off if your route is accessing to multiple JMS providers.
* If you need transaction against multiple JMS providers, use jms
* component to leverage XA transaction.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: transaction (advanced)
*/
default AdvancedSjms2EndpointProducerBuilder sharedJMSSession(
String sharedJMSSession) {
setProperty("sharedJMSSession", sharedJMSSession);
return this;
}
}
/**
* Builder for endpoint for the Simple JMS2 component.
*/
public interface Sjms2EndpointBuilder
extends
Sjms2EndpointConsumerBuilder, Sjms2EndpointProducerBuilder {
default AdvancedSjms2EndpointBuilder advanced() {
return (AdvancedSjms2EndpointBuilder) this;
}
/**
* The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
* CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> type.
*
* Group: common
*/
default Sjms2EndpointBuilder acknowledgementMode(
SessionAcknowledgementType acknowledgementMode) {
setProperty("acknowledgementMode", acknowledgementMode);
return this;
}
/**
* The JMS acknowledgement name, which is one of: SESSION_TRANSACTED,
* CLIENT_ACKNOWLEDGE, AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> type.
*
* Group: common
*/
default Sjms2EndpointBuilder acknowledgementMode(
String acknowledgementMode) {
setProperty("acknowledgementMode", acknowledgementMode);
return this;
}
/**
* Sets the commit strategy.
*
* The option is a:
* <code>org.apache.camel.component.sjms.TransactionCommitStrategy</code> type.
*
* Group: transaction
*/
default Sjms2EndpointBuilder transactionCommitStrategy(
Object transactionCommitStrategy) {
setProperty("transactionCommitStrategy", transactionCommitStrategy);
return this;
}
/**
* Sets the commit strategy.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.TransactionCommitStrategy</code> type.
*
* Group: transaction
*/
default Sjms2EndpointBuilder transactionCommitStrategy(
String transactionCommitStrategy) {
setProperty("transactionCommitStrategy", transactionCommitStrategy);
return this;
}
}
/**
* Advanced builder for endpoint for the Simple JMS2 component.
*/
public interface AdvancedSjms2EndpointBuilder
extends
AdvancedSjms2EndpointConsumerBuilder, AdvancedSjms2EndpointProducerBuilder {
default Sjms2EndpointBuilder basic() {
return (Sjms2EndpointBuilder) this;
}
/**
* Whether to startup the consumer message listener asynchronously, when
* starting a route. For example if a JmsConsumer cannot get a
* connection to a remote JMS broker, then it may block while retrying
* and/or failover. This will cause Camel to block while starting
* routes. By setting this option to true, you will let routes startup,
* while the JmsConsumer connects to the JMS broker using a dedicated
* thread in asynchronous mode. If this option is used, then beware that
* if the connection could not be established, then an exception is
* logged at WARN level, and the consumer will not be able to receive
* messages; You can then restart the route to retry.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder asyncStartListener(
boolean asyncStartListener) {
setProperty("asyncStartListener", asyncStartListener);
return this;
}
/**
* Whether to startup the consumer message listener asynchronously, when
* starting a route. For example if a JmsConsumer cannot get a
* connection to a remote JMS broker, then it may block while retrying
* and/or failover. This will cause Camel to block while starting
* routes. By setting this option to true, you will let routes startup,
* while the JmsConsumer connects to the JMS broker using a dedicated
* thread in asynchronous mode. If this option is used, then beware that
* if the connection could not be established, then an exception is
* logged at WARN level, and the consumer will not be able to receive
* messages; You can then restart the route to retry.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder asyncStartListener(
String asyncStartListener) {
setProperty("asyncStartListener", asyncStartListener);
return this;
}
/**
* Whether to stop the consumer message listener asynchronously, when
* stopping a route.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder asyncStopListener(
boolean asyncStopListener) {
setProperty("asyncStopListener", asyncStopListener);
return this;
}
/**
* Whether to stop the consumer message listener asynchronously, when
* stopping a route.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder asyncStopListener(
String asyncStopListener) {
setProperty("asyncStopListener", asyncStopListener);
return this;
}
/**
* Whether the endpoint should use basic property binding (Camel 2.x) or
* the newer property binding with additional capabilities.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder basicPropertyBinding(
boolean basicPropertyBinding) {
setProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* Whether the endpoint should use basic property binding (Camel 2.x) or
* the newer property binding with additional capabilities.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder basicPropertyBinding(
String basicPropertyBinding) {
setProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* The maximum number of connections available to this endpoint.
*
* The option is a: <code>java.lang.Integer</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder connectionCount(
Integer connectionCount) {
setProperty("connectionCount", connectionCount);
return this;
}
/**
* The maximum number of connections available to this endpoint.
*
* The option will be converted to a <code>java.lang.Integer</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder connectionCount(
String connectionCount) {
setProperty("connectionCount", connectionCount);
return this;
}
/**
* Initializes the connectionFactory for the endpoint, which takes
* precedence over the component's connectionFactory, if any.
*
* The option is a: <code>javax.jms.ConnectionFactory</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder connectionFactory(
Object connectionFactory) {
setProperty("connectionFactory", connectionFactory);
return this;
}
/**
* Initializes the connectionFactory for the endpoint, which takes
* precedence over the component's connectionFactory, if any.
*
* The option will be converted to a
* <code>javax.jms.ConnectionFactory</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder connectionFactory(
String connectionFactory) {
setProperty("connectionFactory", connectionFactory);
return this;
}
/**
* Initializes the connectionResource for the endpoint, which takes
* precedence over the component's connectionResource, if any.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.ConnectionResource</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder connectionResource(
Object connectionResource) {
setProperty("connectionResource", connectionResource);
return this;
}
/**
* Initializes the connectionResource for the endpoint, which takes
* precedence over the component's connectionResource, if any.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.ConnectionResource</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder connectionResource(
String connectionResource) {
setProperty("connectionResource", connectionResource);
return this;
}
/**
* To use a custom DestinationCreationStrategy.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder destinationCreationStrategy(
Object destinationCreationStrategy) {
setProperty("destinationCreationStrategy", destinationCreationStrategy);
return this;
}
/**
* To use a custom DestinationCreationStrategy.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder destinationCreationStrategy(
String destinationCreationStrategy) {
setProperty("destinationCreationStrategy", destinationCreationStrategy);
return this;
}
/**
* Specifies the JMS Exception Listener that is to be notified of any
* underlying JMS exceptions.
*
* The option is a: <code>javax.jms.ExceptionListener</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder exceptionListener(
Object exceptionListener) {
setProperty("exceptionListener", exceptionListener);
return this;
}
/**
* Specifies the JMS Exception Listener that is to be notified of any
* underlying JMS exceptions.
*
* The option will be converted to a
* <code>javax.jms.ExceptionListener</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder exceptionListener(
String exceptionListener) {
setProperty("exceptionListener", exceptionListener);
return this;
}
/**
* To use a custom HeaderFilterStrategy to filter header to and from
* Camel message.
*
* The option is a:
* <code>org.apache.camel.spi.HeaderFilterStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder headerFilterStrategy(
HeaderFilterStrategy headerFilterStrategy) {
setProperty("headerFilterStrategy", headerFilterStrategy);
return this;
}
/**
* To use a custom HeaderFilterStrategy to filter header to and from
* Camel message.
*
* The option will be converted to a
* <code>org.apache.camel.spi.HeaderFilterStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder headerFilterStrategy(
String headerFilterStrategy) {
setProperty("headerFilterStrategy", headerFilterStrategy);
return this;
}
/**
* Whether to include all JMSXxxx properties when mapping from JMS to
* Camel Message. Setting this to true will include properties such as
* JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
* headerFilterStrategy then this option does not apply.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder includeAllJMSXProperties(
boolean includeAllJMSXProperties) {
setProperty("includeAllJMSXProperties", includeAllJMSXProperties);
return this;
}
/**
* Whether to include all JMSXxxx properties when mapping from JMS to
* Camel Message. Setting this to true will include properties such as
* JMSXAppID, and JMSXUserID etc. Note: If you are using a custom
* headerFilterStrategy then this option does not apply.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder includeAllJMSXProperties(
String includeAllJMSXProperties) {
setProperty("includeAllJMSXProperties", includeAllJMSXProperties);
return this;
}
/**
* Pluggable strategy for encoding and decoding JMS keys so they can be
* compliant with the JMS specification. Camel provides two
* implementations out of the box: default and passthrough. The default
* strategy will safely marshal dots and hyphens (. and -). The
* passthrough strategy leaves the key as is. Can be used for JMS
* brokers which do not care whether JMS header keys contain illegal
* characters. You can provide your own implementation of the
* org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
* using the # notation.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder jmsKeyFormatStrategy(
Object jmsKeyFormatStrategy) {
setProperty("jmsKeyFormatStrategy", jmsKeyFormatStrategy);
return this;
}
/**
* Pluggable strategy for encoding and decoding JMS keys so they can be
* compliant with the JMS specification. Camel provides two
* implementations out of the box: default and passthrough. The default
* strategy will safely marshal dots and hyphens (. and -). The
* passthrough strategy leaves the key as is. Can be used for JMS
* brokers which do not care whether JMS header keys contain illegal
* characters. You can provide your own implementation of the
* org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it
* using the # notation.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code>
* type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder jmsKeyFormatStrategy(
String jmsKeyFormatStrategy) {
setProperty("jmsKeyFormatStrategy", jmsKeyFormatStrategy);
return this;
}
/**
* Specifies whether Camel should auto map the received JMS message to a
* suited payload type, such as javax.jms.TextMessage to a String etc.
* See section about how mapping works below for more details.
*
* The option is a: <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder mapJmsMessage(boolean mapJmsMessage) {
setProperty("mapJmsMessage", mapJmsMessage);
return this;
}
/**
* Specifies whether Camel should auto map the received JMS message to a
* suited payload type, such as javax.jms.TextMessage to a String etc.
* See section about how mapping works below for more details.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder mapJmsMessage(String mapJmsMessage) {
setProperty("mapJmsMessage", mapJmsMessage);
return this;
}
/**
* To use the given MessageCreatedStrategy which are invoked when Camel
* creates new instances of javax.jms.Message objects when Camel is
* sending a JMS message.
*
* The option is a:
* <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder messageCreatedStrategy(
Object messageCreatedStrategy) {
setProperty("messageCreatedStrategy", messageCreatedStrategy);
return this;
}
/**
* To use the given MessageCreatedStrategy which are invoked when Camel
* creates new instances of javax.jms.Message objects when Camel is
* sending a JMS message.
*
* The option will be converted to a
* <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type.
*
* Group: advanced
*/
default AdvancedSjms2EndpointBuilder messageCreatedStrategy(
String messageCreatedStrategy) {
setProperty("messageCreatedStrategy", messageCreatedStrategy);
return this;
}
/**
* Specifies whether to share JMS session with other SJMS endpoints.
* Turn this off if your route is accessing to multiple JMS providers.
* If you need transaction against multiple JMS providers, use jms
* component to leverage XA transaction.
*
* The option is a: <code>boolean</code> type.
*
* Group: transaction (advanced)
*/
default AdvancedSjms2EndpointBuilder sharedJMSSession(
boolean sharedJMSSession) {
setProperty("sharedJMSSession", sharedJMSSession);
return this;
}
/**
* Specifies whether to share JMS session with other SJMS endpoints.
* Turn this off if your route is accessing to multiple JMS providers.
* If you need transaction against multiple JMS providers, use jms
* component to leverage XA transaction.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: transaction (advanced)
*/
default AdvancedSjms2EndpointBuilder sharedJMSSession(
String sharedJMSSession) {
setProperty("sharedJMSSession", sharedJMSSession);
return this;
}
}
/**
* Proxy enum for
* <code>org.apache.camel.component.sjms.jms.SessionAcknowledgementType</code> enum.
*/
enum SessionAcknowledgementType {
AUTO_ACKNOWLEDGE,
CLIENT_ACKNOWLEDGE,
DUPS_OK_ACKNOWLEDGE,
SESSION_TRANSACTED;
}
/**
* Simple JMS2 (camel-sjms2)
* The sjms2 component (simple jms) allows messages to be sent to (or
* consumed from) a JMS Queue or Topic (uses JMS 2.x API).
*
* Category: messaging
* Available as of version: 2.19
* Maven coordinates: org.apache.camel:camel-sjms2
*
* Syntax: <code>sjms2:destinationType:destinationName</code>
*
* Path parameter: destinationType
* The kind of destination to use
* Default value: queue
* The value can be one of: queue, topic
*
* Path parameter: destinationName (required)
* DestinationName is a JMS queue or topic name. By default, the
* destinationName is interpreted as a queue name.
*/
default Sjms2EndpointBuilder sjms2(String path) {
class Sjms2EndpointBuilderImpl extends AbstractEndpointBuilder implements Sjms2EndpointBuilder, AdvancedSjms2EndpointBuilder {
public Sjms2EndpointBuilderImpl(String path) {
super("sjms2", path);
}
}
return new Sjms2EndpointBuilderImpl(path);
}
}