blob: 1c17926b4e45d65c402cb35e65d1ce33f6ee0d8c [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 java.util.Properties;
import javax.annotation.Generated;
import org.apache.camel.ExchangePattern;
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;
/**
* Component for communicating with MQTT message brokers using Eclipse Paho MQTT
* Client.
*
* Generated by camel-package-maven-plugin - do not edit this file!
*/
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface PahoEndpointBuilderFactory {
/**
* Builder for endpoint consumers for the Paho component.
*/
public interface PahoEndpointConsumerBuilder
extends
EndpointConsumerBuilder {
default AdvancedPahoEndpointConsumerBuilder advanced() {
return (AdvancedPahoEndpointConsumerBuilder) this;
}
/**
* Sets whether the client will automatically attempt to reconnect to
* the server if the connection is lost. If set to false, the client
* will not attempt to automatically reconnect to the server in the
* event that the connection is lost. If set to true, in the event that
* the connection is lost, the client will attempt to reconnect to the
* server. It will initially wait 1 second before it attempts to
* reconnect, for every failed reconnect attempt, the delay will double
* until it is at 2 minutes at which point the delay will stay at 2
* minutes.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder automaticReconnect(
boolean automaticReconnect) {
doSetProperty("automaticReconnect", automaticReconnect);
return this;
}
/**
* Sets whether the client will automatically attempt to reconnect to
* the server if the connection is lost. If set to false, the client
* will not attempt to automatically reconnect to the server in the
* event that the connection is lost. If set to true, in the event that
* the connection is lost, the client will attempt to reconnect to the
* server. It will initially wait 1 second before it attempts to
* reconnect, for every failed reconnect attempt, the delay will double
* until it is at 2 minutes at which point the delay will stay at 2
* minutes.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder automaticReconnect(
String automaticReconnect) {
doSetProperty("automaticReconnect", automaticReconnect);
return this;
}
/**
* The URL of the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder brokerUrl(String brokerUrl) {
doSetProperty("brokerUrl", brokerUrl);
return this;
}
/**
* Sets whether the client and server should remember state across
* restarts and reconnects. If set to false both the client and server
* will maintain state across restarts of the client, the server and the
* connection. As state is maintained: Message delivery will be reliable
* meeting the specified QOS even if the client, server or connection
* are restarted. The server will treat a subscription as durable. If
* set to true the client and server will not maintain state across
* restarts of the client, the server or the connection. This means
* Message delivery to the specified QOS cannot be maintained if the
* client, server or connection are restarted The server will treat a
* subscription as non-durable.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder cleanSession(boolean cleanSession) {
doSetProperty("cleanSession", cleanSession);
return this;
}
/**
* Sets whether the client and server should remember state across
* restarts and reconnects. If set to false both the client and server
* will maintain state across restarts of the client, the server and the
* connection. As state is maintained: Message delivery will be reliable
* meeting the specified QOS even if the client, server or connection
* are restarted. The server will treat a subscription as durable. If
* set to true the client and server will not maintain state across
* restarts of the client, the server or the connection. This means
* Message delivery to the specified QOS cannot be maintained if the
* client, server or connection are restarted The server will treat a
* subscription as non-durable.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder cleanSession(String cleanSession) {
doSetProperty("cleanSession", cleanSession);
return this;
}
/**
* MQTT client identifier. The identifier must be unique.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder clientId(String clientId) {
doSetProperty("clientId", clientId);
return this;
}
/**
* Sets the connection timeout value. This value, measured in seconds,
* defines the maximum time interval the client will wait for the
* network connection to the MQTT server to be established. The default
* timeout is 30 seconds. A value of 0 disables timeout processing
* meaning the client will wait until the network connection is made
* successfully or fails.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder connectionTimeout(
int connectionTimeout) {
doSetProperty("connectionTimeout", connectionTimeout);
return this;
}
/**
* Sets the connection timeout value. This value, measured in seconds,
* defines the maximum time interval the client will wait for the
* network connection to the MQTT server to be established. The default
* timeout is 30 seconds. A value of 0 disables timeout processing
* meaning the client will wait until the network connection is made
* successfully or fails.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder connectionTimeout(
String connectionTimeout) {
doSetProperty("connectionTimeout", connectionTimeout);
return this;
}
/**
* Base directory used by file persistence. Will by default use user
* directory.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder filePersistenceDirectory(
String filePersistenceDirectory) {
doSetProperty("filePersistenceDirectory", filePersistenceDirectory);
return this;
}
/**
* Sets the keep alive interval. This value, measured in seconds,
* defines the maximum time interval between messages sent or received.
* It enables the client to detect if the server is no longer available,
* without having to wait for the TCP/IP timeout. The client will ensure
* that at least one message travels across the network within each keep
* alive period. In the absence of a data-related message during the
* time period, the client sends a very small ping message, which the
* server will acknowledge. A value of 0 disables keepalive processing
* in the client. The default value is 60 seconds.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder keepAliveInterval(
int keepAliveInterval) {
doSetProperty("keepAliveInterval", keepAliveInterval);
return this;
}
/**
* Sets the keep alive interval. This value, measured in seconds,
* defines the maximum time interval between messages sent or received.
* It enables the client to detect if the server is no longer available,
* without having to wait for the TCP/IP timeout. The client will ensure
* that at least one message travels across the network within each keep
* alive period. In the absence of a data-related message during the
* time period, the client sends a very small ping message, which the
* server will acknowledge. A value of 0 disables keepalive processing
* in the client. The default value is 60 seconds.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder keepAliveInterval(
String keepAliveInterval) {
doSetProperty("keepAliveInterval", keepAliveInterval);
return this;
}
/**
* Sets the max inflight. please increase this value in a high traffic
* environment. The default value is 10.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder maxInflight(int maxInflight) {
doSetProperty("maxInflight", maxInflight);
return this;
}
/**
* Sets the max inflight. please increase this value in a high traffic
* environment. The default value is 10.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder maxInflight(String maxInflight) {
doSetProperty("maxInflight", maxInflight);
return this;
}
/**
* Get the maximum time (in millis) to wait between reconnects.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder maxReconnectDelay(
int maxReconnectDelay) {
doSetProperty("maxReconnectDelay", maxReconnectDelay);
return this;
}
/**
* Get the maximum time (in millis) to wait between reconnects.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder maxReconnectDelay(
String maxReconnectDelay) {
doSetProperty("maxReconnectDelay", maxReconnectDelay);
return this;
}
/**
* Sets the MQTT version. The default action is to connect with version
* 3.1.1, and to fall back to 3.1 if that fails. Version 3.1.1 or 3.1
* can be selected specifically, with no fall back, by using the
* MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder mqttVersion(int mqttVersion) {
doSetProperty("mqttVersion", mqttVersion);
return this;
}
/**
* Sets the MQTT version. The default action is to connect with version
* 3.1.1, and to fall back to 3.1 if that fails. Version 3.1.1 or 3.1
* can be selected specifically, with no fall back, by using the
* MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder mqttVersion(String mqttVersion) {
doSetProperty("mqttVersion", mqttVersion);
return this;
}
/**
* Client persistence to be used - memory or file.
*
* The option is a:
* <code>org.apache.camel.component.paho.PahoPersistence</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder persistence(
PahoPersistence persistence) {
doSetProperty("persistence", persistence);
return this;
}
/**
* Client persistence to be used - memory or file.
*
* The option will be converted to a
* <code>org.apache.camel.component.paho.PahoPersistence</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder persistence(String persistence) {
doSetProperty("persistence", persistence);
return this;
}
/**
* Client quality of service level (0-2).
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder qos(int qos) {
doSetProperty("qos", qos);
return this;
}
/**
* Client quality of service level (0-2).
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder qos(String qos) {
doSetProperty("qos", qos);
return this;
}
/**
* Retain option.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder retained(boolean retained) {
doSetProperty("retained", retained);
return this;
}
/**
* Retain option.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder retained(String retained) {
doSetProperty("retained", retained);
return this;
}
/**
* Set a list of one or more serverURIs the client may connect to.
* Multiple servers can be separated by comma. Each serverURI specifies
* the address of a server that the client may connect to. Two types of
* connection are supported tcp:// for a TCP connection and ssl:// for a
* TCP connection secured by SSL/TLS. For example: tcp://localhost:1883
* ssl://localhost:8883 If the port is not specified, it will default to
* 1883 for tcp:// URIs, and 8883 for ssl:// URIs. If serverURIs is set
* then it overrides the serverURI parameter passed in on the
* constructor of the MQTT client. When an attempt to connect is
* initiated the client will start with the first serverURI in the list
* and work through the list until a connection is established with a
* server. If a connection cannot be made to any of the servers then the
* connect attempt fails. Specifying a list of servers that a client may
* connect to has several uses: High Availability and reliable message
* delivery Some MQTT servers support a high availability feature where
* two or more equal MQTT servers share state. An MQTT client can
* connect to any of the equal servers and be assured that messages are
* reliably delivered and durable subscriptions are maintained no matter
* which server the client connects to. The cleansession flag must be
* set to false if durable subscriptions and/or reliable message
* delivery is required. Hunt List A set of servers may be specified
* that are not equal (as in the high availability option). As no state
* is shared across the servers reliable message delivery and durable
* subscriptions are not valid. The cleansession flag must be set to
* true if the hunt list mode is used.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder serverURIs(String serverURIs) {
doSetProperty("serverURIs", serverURIs);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder willPayload(String willPayload) {
doSetProperty("willPayload", willPayload);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder willQos(int willQos) {
doSetProperty("willQos", willQos);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder willQos(String willQos) {
doSetProperty("willQos", willQos);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder willRetained(boolean willRetained) {
doSetProperty("willRetained", willRetained);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder willRetained(String willRetained) {
doSetProperty("willRetained", willRetained);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointConsumerBuilder willTopic(String willTopic) {
doSetProperty("willTopic", willTopic);
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 PahoEndpointConsumerBuilder 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.
*
* Group: consumer
*/
default PahoEndpointConsumerBuilder bridgeErrorHandler(
String bridgeErrorHandler) {
doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
return this;
}
/**
* Whether SSL HostnameVerifier is enabled or not. The default value is
* true.
*
* The option is a: <code>boolean</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder httpsHostnameVerificationEnabled(
boolean httpsHostnameVerificationEnabled) {
doSetProperty("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled);
return this;
}
/**
* Whether SSL HostnameVerifier is enabled or not. The default value is
* true.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder httpsHostnameVerificationEnabled(
String httpsHostnameVerificationEnabled) {
doSetProperty("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled);
return this;
}
/**
* Password to be used for authentication against the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder password(String password) {
doSetProperty("password", password);
return this;
}
/**
* Sets the SocketFactory to use. This allows an application to apply
* its own policies around the creation of network sockets. If using an
* SSL connection, an SSLSocketFactory can be used to supply
* application-specific security settings.
*
* The option is a: <code>javax.net.SocketFactory</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder socketFactory(Object socketFactory) {
doSetProperty("socketFactory", socketFactory);
return this;
}
/**
* Sets the SocketFactory to use. This allows an application to apply
* its own policies around the creation of network sockets. If using an
* SSL connection, an SSLSocketFactory can be used to supply
* application-specific security settings.
*
* The option will be converted to a
* <code>javax.net.SocketFactory</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder socketFactory(String socketFactory) {
doSetProperty("socketFactory", socketFactory);
return this;
}
/**
* Sets the SSL properties for the connection. Note that these
* properties are only valid if an implementation of the Java Secure
* Socket Extensions (JSSE) is available. These properties are not used
* if a custom SocketFactory has been set. The following properties can
* be used: com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1,
* SSL_TLS. com.ibm.ssl.contextProvider Underlying JSSE provider. For
* example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the file
* that contains the KeyStore object that you want the KeyManager to
* use. For example /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The
* password for the KeyStore object that you want the KeyManager to use.
* The password can either be in plain-text, or may be obfuscated using
* the static method: com.ibm.micro.security.Password.obfuscate(char
* password). This obfuscates the password using a simple and insecure
* XOR and Base64 encoding mechanism. Note that this is only a simple
* scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType
* Type of key store, for example PKCS12, JKS, or JCEKS.
* com.ibm.ssl.keyStoreProvider Key store provider, for example IBMJCE
* or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that
* contains the KeyStore object that you want the TrustManager to use.
* com.ibm.ssl.trustStorePassword The password for the TrustStore object
* that you want the TrustManager to use. The password can either be in
* plain-text, or may be obfuscated using the static method:
* com.ibm.micro.security.Password.obfuscate(char password). This
* obfuscates the password using a simple and insecure XOR and Base64
* encoding mechanism. Note that this is only a simple scrambler to
* obfuscate clear-text passwords. com.ibm.ssl.trustStoreType The type
* of KeyStore object that you want the default TrustManager to use.
* Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider
* Trust store provider, for example IBMJCE or IBMJCEFIPS.
* com.ibm.ssl.enabledCipherSuites A list of which ciphers are enabled.
* Values are dependent on the provider, for example:
* SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA.
* com.ibm.ssl.keyManager Sets the algorithm that will be used to
* instantiate a KeyManagerFactory object instead of using the default
* algorithm available in the platform. Example values: IbmX509 or
* IBMJ9X509. com.ibm.ssl.trustManager Sets the algorithm that will be
* used to instantiate a TrustManagerFactory object instead of using the
* default algorithm available in the platform. Example values: PKIX or
* IBMJ9X509.
*
* The option is a: <code>java.util.Properties</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder sslClientProps(
Properties sslClientProps) {
doSetProperty("sslClientProps", sslClientProps);
return this;
}
/**
* Sets the SSL properties for the connection. Note that these
* properties are only valid if an implementation of the Java Secure
* Socket Extensions (JSSE) is available. These properties are not used
* if a custom SocketFactory has been set. The following properties can
* be used: com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1,
* SSL_TLS. com.ibm.ssl.contextProvider Underlying JSSE provider. For
* example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the file
* that contains the KeyStore object that you want the KeyManager to
* use. For example /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The
* password for the KeyStore object that you want the KeyManager to use.
* The password can either be in plain-text, or may be obfuscated using
* the static method: com.ibm.micro.security.Password.obfuscate(char
* password). This obfuscates the password using a simple and insecure
* XOR and Base64 encoding mechanism. Note that this is only a simple
* scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType
* Type of key store, for example PKCS12, JKS, or JCEKS.
* com.ibm.ssl.keyStoreProvider Key store provider, for example IBMJCE
* or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that
* contains the KeyStore object that you want the TrustManager to use.
* com.ibm.ssl.trustStorePassword The password for the TrustStore object
* that you want the TrustManager to use. The password can either be in
* plain-text, or may be obfuscated using the static method:
* com.ibm.micro.security.Password.obfuscate(char password). This
* obfuscates the password using a simple and insecure XOR and Base64
* encoding mechanism. Note that this is only a simple scrambler to
* obfuscate clear-text passwords. com.ibm.ssl.trustStoreType The type
* of KeyStore object that you want the default TrustManager to use.
* Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider
* Trust store provider, for example IBMJCE or IBMJCEFIPS.
* com.ibm.ssl.enabledCipherSuites A list of which ciphers are enabled.
* Values are dependent on the provider, for example:
* SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA.
* com.ibm.ssl.keyManager Sets the algorithm that will be used to
* instantiate a KeyManagerFactory object instead of using the default
* algorithm available in the platform. Example values: IbmX509 or
* IBMJ9X509. com.ibm.ssl.trustManager Sets the algorithm that will be
* used to instantiate a TrustManagerFactory object instead of using the
* default algorithm available in the platform. Example values: PKIX or
* IBMJ9X509.
*
* The option will be converted to a <code>java.util.Properties</code>
* type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder sslClientProps(String sslClientProps) {
doSetProperty("sslClientProps", sslClientProps);
return this;
}
/**
* Sets the HostnameVerifier for the SSL connection. Note that it will
* be used after handshake on a connection and you should do actions by
* yourself when hostname is verified error. There is no default
* HostnameVerifier.
*
* The option is a: <code>javax.net.ssl.HostnameVerifier</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder sslHostnameVerifier(
Object sslHostnameVerifier) {
doSetProperty("sslHostnameVerifier", sslHostnameVerifier);
return this;
}
/**
* Sets the HostnameVerifier for the SSL connection. Note that it will
* be used after handshake on a connection and you should do actions by
* yourself when hostname is verified error. There is no default
* HostnameVerifier.
*
* The option will be converted to a
* <code>javax.net.ssl.HostnameVerifier</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder sslHostnameVerifier(
String sslHostnameVerifier) {
doSetProperty("sslHostnameVerifier", sslHostnameVerifier);
return this;
}
/**
* Username to be used for authentication against the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default PahoEndpointConsumerBuilder userName(String userName) {
doSetProperty("userName", userName);
return this;
}
}
/**
* Advanced builder for endpoint consumers for the Paho component.
*/
public interface AdvancedPahoEndpointConsumerBuilder
extends
EndpointConsumerBuilder {
default PahoEndpointConsumerBuilder basic() {
return (PahoEndpointConsumerBuilder) 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 AdvancedPahoEndpointConsumerBuilder exceptionHandler(
ExceptionHandler exceptionHandler) {
doSetProperty("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 AdvancedPahoEndpointConsumerBuilder exceptionHandler(
String exceptionHandler) {
doSetProperty("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 AdvancedPahoEndpointConsumerBuilder exchangePattern(
ExchangePattern exchangePattern) {
doSetProperty("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 AdvancedPahoEndpointConsumerBuilder exchangePattern(
String exchangePattern) {
doSetProperty("exchangePattern", exchangePattern);
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 AdvancedPahoEndpointConsumerBuilder basicPropertyBinding(
boolean basicPropertyBinding) {
doSetProperty("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 AdvancedPahoEndpointConsumerBuilder basicPropertyBinding(
String basicPropertyBinding) {
doSetProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* To use an existing mqtt client.
*
* The option is a:
* <code>org.eclipse.paho.client.mqttv3.MqttClient</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointConsumerBuilder client(Object client) {
doSetProperty("client", client);
return this;
}
/**
* To use an existing mqtt client.
*
* The option will be converted to a
* <code>org.eclipse.paho.client.mqttv3.MqttClient</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointConsumerBuilder client(String client) {
doSetProperty("client", client);
return this;
}
/**
* Sets the Custom WebSocket Headers for the WebSocket Connection.
*
* The option is a: <code>java.util.Properties</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointConsumerBuilder customWebSocketHeaders(
Properties customWebSocketHeaders) {
doSetProperty("customWebSocketHeaders", customWebSocketHeaders);
return this;
}
/**
* Sets the Custom WebSocket Headers for the WebSocket Connection.
*
* The option will be converted to a <code>java.util.Properties</code>
* type.
*
* Group: advanced
*/
default AdvancedPahoEndpointConsumerBuilder customWebSocketHeaders(
String customWebSocketHeaders) {
doSetProperty("customWebSocketHeaders", customWebSocketHeaders);
return this;
}
/**
* Set the time in seconds that the executor service should wait when
* terminating before forcefully terminating. It is not recommended to
* change this value unless you are absolutely sure that you need to.
*
* The option is a: <code>int</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointConsumerBuilder executorServiceTimeout(
int executorServiceTimeout) {
doSetProperty("executorServiceTimeout", executorServiceTimeout);
return this;
}
/**
* Set the time in seconds that the executor service should wait when
* terminating before forcefully terminating. It is not recommended to
* change this value unless you are absolutely sure that you need to.
*
* The option will be converted to a <code>int</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointConsumerBuilder executorServiceTimeout(
String executorServiceTimeout) {
doSetProperty("executorServiceTimeout", executorServiceTimeout);
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: advanced
*/
default AdvancedPahoEndpointConsumerBuilder synchronous(
boolean synchronous) {
doSetProperty("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: advanced
*/
default AdvancedPahoEndpointConsumerBuilder synchronous(
String synchronous) {
doSetProperty("synchronous", synchronous);
return this;
}
}
/**
* Builder for endpoint producers for the Paho component.
*/
public interface PahoEndpointProducerBuilder
extends
EndpointProducerBuilder {
default AdvancedPahoEndpointProducerBuilder advanced() {
return (AdvancedPahoEndpointProducerBuilder) this;
}
/**
* Sets whether the client will automatically attempt to reconnect to
* the server if the connection is lost. If set to false, the client
* will not attempt to automatically reconnect to the server in the
* event that the connection is lost. If set to true, in the event that
* the connection is lost, the client will attempt to reconnect to the
* server. It will initially wait 1 second before it attempts to
* reconnect, for every failed reconnect attempt, the delay will double
* until it is at 2 minutes at which point the delay will stay at 2
* minutes.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder automaticReconnect(
boolean automaticReconnect) {
doSetProperty("automaticReconnect", automaticReconnect);
return this;
}
/**
* Sets whether the client will automatically attempt to reconnect to
* the server if the connection is lost. If set to false, the client
* will not attempt to automatically reconnect to the server in the
* event that the connection is lost. If set to true, in the event that
* the connection is lost, the client will attempt to reconnect to the
* server. It will initially wait 1 second before it attempts to
* reconnect, for every failed reconnect attempt, the delay will double
* until it is at 2 minutes at which point the delay will stay at 2
* minutes.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder automaticReconnect(
String automaticReconnect) {
doSetProperty("automaticReconnect", automaticReconnect);
return this;
}
/**
* The URL of the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder brokerUrl(String brokerUrl) {
doSetProperty("brokerUrl", brokerUrl);
return this;
}
/**
* Sets whether the client and server should remember state across
* restarts and reconnects. If set to false both the client and server
* will maintain state across restarts of the client, the server and the
* connection. As state is maintained: Message delivery will be reliable
* meeting the specified QOS even if the client, server or connection
* are restarted. The server will treat a subscription as durable. If
* set to true the client and server will not maintain state across
* restarts of the client, the server or the connection. This means
* Message delivery to the specified QOS cannot be maintained if the
* client, server or connection are restarted The server will treat a
* subscription as non-durable.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder cleanSession(boolean cleanSession) {
doSetProperty("cleanSession", cleanSession);
return this;
}
/**
* Sets whether the client and server should remember state across
* restarts and reconnects. If set to false both the client and server
* will maintain state across restarts of the client, the server and the
* connection. As state is maintained: Message delivery will be reliable
* meeting the specified QOS even if the client, server or connection
* are restarted. The server will treat a subscription as durable. If
* set to true the client and server will not maintain state across
* restarts of the client, the server or the connection. This means
* Message delivery to the specified QOS cannot be maintained if the
* client, server or connection are restarted The server will treat a
* subscription as non-durable.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder cleanSession(String cleanSession) {
doSetProperty("cleanSession", cleanSession);
return this;
}
/**
* MQTT client identifier. The identifier must be unique.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder clientId(String clientId) {
doSetProperty("clientId", clientId);
return this;
}
/**
* Sets the connection timeout value. This value, measured in seconds,
* defines the maximum time interval the client will wait for the
* network connection to the MQTT server to be established. The default
* timeout is 30 seconds. A value of 0 disables timeout processing
* meaning the client will wait until the network connection is made
* successfully or fails.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder connectionTimeout(
int connectionTimeout) {
doSetProperty("connectionTimeout", connectionTimeout);
return this;
}
/**
* Sets the connection timeout value. This value, measured in seconds,
* defines the maximum time interval the client will wait for the
* network connection to the MQTT server to be established. The default
* timeout is 30 seconds. A value of 0 disables timeout processing
* meaning the client will wait until the network connection is made
* successfully or fails.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder connectionTimeout(
String connectionTimeout) {
doSetProperty("connectionTimeout", connectionTimeout);
return this;
}
/**
* Base directory used by file persistence. Will by default use user
* directory.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder filePersistenceDirectory(
String filePersistenceDirectory) {
doSetProperty("filePersistenceDirectory", filePersistenceDirectory);
return this;
}
/**
* Sets the keep alive interval. This value, measured in seconds,
* defines the maximum time interval between messages sent or received.
* It enables the client to detect if the server is no longer available,
* without having to wait for the TCP/IP timeout. The client will ensure
* that at least one message travels across the network within each keep
* alive period. In the absence of a data-related message during the
* time period, the client sends a very small ping message, which the
* server will acknowledge. A value of 0 disables keepalive processing
* in the client. The default value is 60 seconds.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder keepAliveInterval(
int keepAliveInterval) {
doSetProperty("keepAliveInterval", keepAliveInterval);
return this;
}
/**
* Sets the keep alive interval. This value, measured in seconds,
* defines the maximum time interval between messages sent or received.
* It enables the client to detect if the server is no longer available,
* without having to wait for the TCP/IP timeout. The client will ensure
* that at least one message travels across the network within each keep
* alive period. In the absence of a data-related message during the
* time period, the client sends a very small ping message, which the
* server will acknowledge. A value of 0 disables keepalive processing
* in the client. The default value is 60 seconds.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder keepAliveInterval(
String keepAliveInterval) {
doSetProperty("keepAliveInterval", keepAliveInterval);
return this;
}
/**
* Sets the max inflight. please increase this value in a high traffic
* environment. The default value is 10.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder maxInflight(int maxInflight) {
doSetProperty("maxInflight", maxInflight);
return this;
}
/**
* Sets the max inflight. please increase this value in a high traffic
* environment. The default value is 10.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder maxInflight(String maxInflight) {
doSetProperty("maxInflight", maxInflight);
return this;
}
/**
* Get the maximum time (in millis) to wait between reconnects.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder maxReconnectDelay(
int maxReconnectDelay) {
doSetProperty("maxReconnectDelay", maxReconnectDelay);
return this;
}
/**
* Get the maximum time (in millis) to wait between reconnects.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder maxReconnectDelay(
String maxReconnectDelay) {
doSetProperty("maxReconnectDelay", maxReconnectDelay);
return this;
}
/**
* Sets the MQTT version. The default action is to connect with version
* 3.1.1, and to fall back to 3.1 if that fails. Version 3.1.1 or 3.1
* can be selected specifically, with no fall back, by using the
* MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder mqttVersion(int mqttVersion) {
doSetProperty("mqttVersion", mqttVersion);
return this;
}
/**
* Sets the MQTT version. The default action is to connect with version
* 3.1.1, and to fall back to 3.1 if that fails. Version 3.1.1 or 3.1
* can be selected specifically, with no fall back, by using the
* MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder mqttVersion(String mqttVersion) {
doSetProperty("mqttVersion", mqttVersion);
return this;
}
/**
* Client persistence to be used - memory or file.
*
* The option is a:
* <code>org.apache.camel.component.paho.PahoPersistence</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder persistence(
PahoPersistence persistence) {
doSetProperty("persistence", persistence);
return this;
}
/**
* Client persistence to be used - memory or file.
*
* The option will be converted to a
* <code>org.apache.camel.component.paho.PahoPersistence</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder persistence(String persistence) {
doSetProperty("persistence", persistence);
return this;
}
/**
* Client quality of service level (0-2).
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder qos(int qos) {
doSetProperty("qos", qos);
return this;
}
/**
* Client quality of service level (0-2).
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder qos(String qos) {
doSetProperty("qos", qos);
return this;
}
/**
* Retain option.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder retained(boolean retained) {
doSetProperty("retained", retained);
return this;
}
/**
* Retain option.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder retained(String retained) {
doSetProperty("retained", retained);
return this;
}
/**
* Set a list of one or more serverURIs the client may connect to.
* Multiple servers can be separated by comma. Each serverURI specifies
* the address of a server that the client may connect to. Two types of
* connection are supported tcp:// for a TCP connection and ssl:// for a
* TCP connection secured by SSL/TLS. For example: tcp://localhost:1883
* ssl://localhost:8883 If the port is not specified, it will default to
* 1883 for tcp:// URIs, and 8883 for ssl:// URIs. If serverURIs is set
* then it overrides the serverURI parameter passed in on the
* constructor of the MQTT client. When an attempt to connect is
* initiated the client will start with the first serverURI in the list
* and work through the list until a connection is established with a
* server. If a connection cannot be made to any of the servers then the
* connect attempt fails. Specifying a list of servers that a client may
* connect to has several uses: High Availability and reliable message
* delivery Some MQTT servers support a high availability feature where
* two or more equal MQTT servers share state. An MQTT client can
* connect to any of the equal servers and be assured that messages are
* reliably delivered and durable subscriptions are maintained no matter
* which server the client connects to. The cleansession flag must be
* set to false if durable subscriptions and/or reliable message
* delivery is required. Hunt List A set of servers may be specified
* that are not equal (as in the high availability option). As no state
* is shared across the servers reliable message delivery and durable
* subscriptions are not valid. The cleansession flag must be set to
* true if the hunt list mode is used.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder serverURIs(String serverURIs) {
doSetProperty("serverURIs", serverURIs);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder willPayload(String willPayload) {
doSetProperty("willPayload", willPayload);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder willQos(int willQos) {
doSetProperty("willQos", willQos);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder willQos(String willQos) {
doSetProperty("willQos", willQos);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder willRetained(boolean willRetained) {
doSetProperty("willRetained", willRetained);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder willRetained(String willRetained) {
doSetProperty("willRetained", willRetained);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointProducerBuilder willTopic(String willTopic) {
doSetProperty("willTopic", willTopic);
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 PahoEndpointProducerBuilder lazyStartProducer(
boolean lazyStartProducer) {
doSetProperty("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 PahoEndpointProducerBuilder lazyStartProducer(
String lazyStartProducer) {
doSetProperty("lazyStartProducer", lazyStartProducer);
return this;
}
/**
* Whether SSL HostnameVerifier is enabled or not. The default value is
* true.
*
* The option is a: <code>boolean</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder httpsHostnameVerificationEnabled(
boolean httpsHostnameVerificationEnabled) {
doSetProperty("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled);
return this;
}
/**
* Whether SSL HostnameVerifier is enabled or not. The default value is
* true.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder httpsHostnameVerificationEnabled(
String httpsHostnameVerificationEnabled) {
doSetProperty("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled);
return this;
}
/**
* Password to be used for authentication against the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder password(String password) {
doSetProperty("password", password);
return this;
}
/**
* Sets the SocketFactory to use. This allows an application to apply
* its own policies around the creation of network sockets. If using an
* SSL connection, an SSLSocketFactory can be used to supply
* application-specific security settings.
*
* The option is a: <code>javax.net.SocketFactory</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder socketFactory(Object socketFactory) {
doSetProperty("socketFactory", socketFactory);
return this;
}
/**
* Sets the SocketFactory to use. This allows an application to apply
* its own policies around the creation of network sockets. If using an
* SSL connection, an SSLSocketFactory can be used to supply
* application-specific security settings.
*
* The option will be converted to a
* <code>javax.net.SocketFactory</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder socketFactory(String socketFactory) {
doSetProperty("socketFactory", socketFactory);
return this;
}
/**
* Sets the SSL properties for the connection. Note that these
* properties are only valid if an implementation of the Java Secure
* Socket Extensions (JSSE) is available. These properties are not used
* if a custom SocketFactory has been set. The following properties can
* be used: com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1,
* SSL_TLS. com.ibm.ssl.contextProvider Underlying JSSE provider. For
* example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the file
* that contains the KeyStore object that you want the KeyManager to
* use. For example /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The
* password for the KeyStore object that you want the KeyManager to use.
* The password can either be in plain-text, or may be obfuscated using
* the static method: com.ibm.micro.security.Password.obfuscate(char
* password). This obfuscates the password using a simple and insecure
* XOR and Base64 encoding mechanism. Note that this is only a simple
* scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType
* Type of key store, for example PKCS12, JKS, or JCEKS.
* com.ibm.ssl.keyStoreProvider Key store provider, for example IBMJCE
* or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that
* contains the KeyStore object that you want the TrustManager to use.
* com.ibm.ssl.trustStorePassword The password for the TrustStore object
* that you want the TrustManager to use. The password can either be in
* plain-text, or may be obfuscated using the static method:
* com.ibm.micro.security.Password.obfuscate(char password). This
* obfuscates the password using a simple and insecure XOR and Base64
* encoding mechanism. Note that this is only a simple scrambler to
* obfuscate clear-text passwords. com.ibm.ssl.trustStoreType The type
* of KeyStore object that you want the default TrustManager to use.
* Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider
* Trust store provider, for example IBMJCE or IBMJCEFIPS.
* com.ibm.ssl.enabledCipherSuites A list of which ciphers are enabled.
* Values are dependent on the provider, for example:
* SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA.
* com.ibm.ssl.keyManager Sets the algorithm that will be used to
* instantiate a KeyManagerFactory object instead of using the default
* algorithm available in the platform. Example values: IbmX509 or
* IBMJ9X509. com.ibm.ssl.trustManager Sets the algorithm that will be
* used to instantiate a TrustManagerFactory object instead of using the
* default algorithm available in the platform. Example values: PKIX or
* IBMJ9X509.
*
* The option is a: <code>java.util.Properties</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder sslClientProps(
Properties sslClientProps) {
doSetProperty("sslClientProps", sslClientProps);
return this;
}
/**
* Sets the SSL properties for the connection. Note that these
* properties are only valid if an implementation of the Java Secure
* Socket Extensions (JSSE) is available. These properties are not used
* if a custom SocketFactory has been set. The following properties can
* be used: com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1,
* SSL_TLS. com.ibm.ssl.contextProvider Underlying JSSE provider. For
* example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the file
* that contains the KeyStore object that you want the KeyManager to
* use. For example /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The
* password for the KeyStore object that you want the KeyManager to use.
* The password can either be in plain-text, or may be obfuscated using
* the static method: com.ibm.micro.security.Password.obfuscate(char
* password). This obfuscates the password using a simple and insecure
* XOR and Base64 encoding mechanism. Note that this is only a simple
* scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType
* Type of key store, for example PKCS12, JKS, or JCEKS.
* com.ibm.ssl.keyStoreProvider Key store provider, for example IBMJCE
* or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that
* contains the KeyStore object that you want the TrustManager to use.
* com.ibm.ssl.trustStorePassword The password for the TrustStore object
* that you want the TrustManager to use. The password can either be in
* plain-text, or may be obfuscated using the static method:
* com.ibm.micro.security.Password.obfuscate(char password). This
* obfuscates the password using a simple and insecure XOR and Base64
* encoding mechanism. Note that this is only a simple scrambler to
* obfuscate clear-text passwords. com.ibm.ssl.trustStoreType The type
* of KeyStore object that you want the default TrustManager to use.
* Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider
* Trust store provider, for example IBMJCE or IBMJCEFIPS.
* com.ibm.ssl.enabledCipherSuites A list of which ciphers are enabled.
* Values are dependent on the provider, for example:
* SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA.
* com.ibm.ssl.keyManager Sets the algorithm that will be used to
* instantiate a KeyManagerFactory object instead of using the default
* algorithm available in the platform. Example values: IbmX509 or
* IBMJ9X509. com.ibm.ssl.trustManager Sets the algorithm that will be
* used to instantiate a TrustManagerFactory object instead of using the
* default algorithm available in the platform. Example values: PKIX or
* IBMJ9X509.
*
* The option will be converted to a <code>java.util.Properties</code>
* type.
*
* Group: security
*/
default PahoEndpointProducerBuilder sslClientProps(String sslClientProps) {
doSetProperty("sslClientProps", sslClientProps);
return this;
}
/**
* Sets the HostnameVerifier for the SSL connection. Note that it will
* be used after handshake on a connection and you should do actions by
* yourself when hostname is verified error. There is no default
* HostnameVerifier.
*
* The option is a: <code>javax.net.ssl.HostnameVerifier</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder sslHostnameVerifier(
Object sslHostnameVerifier) {
doSetProperty("sslHostnameVerifier", sslHostnameVerifier);
return this;
}
/**
* Sets the HostnameVerifier for the SSL connection. Note that it will
* be used after handshake on a connection and you should do actions by
* yourself when hostname is verified error. There is no default
* HostnameVerifier.
*
* The option will be converted to a
* <code>javax.net.ssl.HostnameVerifier</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder sslHostnameVerifier(
String sslHostnameVerifier) {
doSetProperty("sslHostnameVerifier", sslHostnameVerifier);
return this;
}
/**
* Username to be used for authentication against the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default PahoEndpointProducerBuilder userName(String userName) {
doSetProperty("userName", userName);
return this;
}
}
/**
* Advanced builder for endpoint producers for the Paho component.
*/
public interface AdvancedPahoEndpointProducerBuilder
extends
EndpointProducerBuilder {
default PahoEndpointProducerBuilder basic() {
return (PahoEndpointProducerBuilder) 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 AdvancedPahoEndpointProducerBuilder basicPropertyBinding(
boolean basicPropertyBinding) {
doSetProperty("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 AdvancedPahoEndpointProducerBuilder basicPropertyBinding(
String basicPropertyBinding) {
doSetProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* To use an existing mqtt client.
*
* The option is a:
* <code>org.eclipse.paho.client.mqttv3.MqttClient</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointProducerBuilder client(Object client) {
doSetProperty("client", client);
return this;
}
/**
* To use an existing mqtt client.
*
* The option will be converted to a
* <code>org.eclipse.paho.client.mqttv3.MqttClient</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointProducerBuilder client(String client) {
doSetProperty("client", client);
return this;
}
/**
* Sets the Custom WebSocket Headers for the WebSocket Connection.
*
* The option is a: <code>java.util.Properties</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointProducerBuilder customWebSocketHeaders(
Properties customWebSocketHeaders) {
doSetProperty("customWebSocketHeaders", customWebSocketHeaders);
return this;
}
/**
* Sets the Custom WebSocket Headers for the WebSocket Connection.
*
* The option will be converted to a <code>java.util.Properties</code>
* type.
*
* Group: advanced
*/
default AdvancedPahoEndpointProducerBuilder customWebSocketHeaders(
String customWebSocketHeaders) {
doSetProperty("customWebSocketHeaders", customWebSocketHeaders);
return this;
}
/**
* Set the time in seconds that the executor service should wait when
* terminating before forcefully terminating. It is not recommended to
* change this value unless you are absolutely sure that you need to.
*
* The option is a: <code>int</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointProducerBuilder executorServiceTimeout(
int executorServiceTimeout) {
doSetProperty("executorServiceTimeout", executorServiceTimeout);
return this;
}
/**
* Set the time in seconds that the executor service should wait when
* terminating before forcefully terminating. It is not recommended to
* change this value unless you are absolutely sure that you need to.
*
* The option will be converted to a <code>int</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointProducerBuilder executorServiceTimeout(
String executorServiceTimeout) {
doSetProperty("executorServiceTimeout", executorServiceTimeout);
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: advanced
*/
default AdvancedPahoEndpointProducerBuilder synchronous(
boolean synchronous) {
doSetProperty("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: advanced
*/
default AdvancedPahoEndpointProducerBuilder synchronous(
String synchronous) {
doSetProperty("synchronous", synchronous);
return this;
}
}
/**
* Builder for endpoint for the Paho component.
*/
public interface PahoEndpointBuilder
extends
PahoEndpointConsumerBuilder, PahoEndpointProducerBuilder {
default AdvancedPahoEndpointBuilder advanced() {
return (AdvancedPahoEndpointBuilder) this;
}
/**
* Sets whether the client will automatically attempt to reconnect to
* the server if the connection is lost. If set to false, the client
* will not attempt to automatically reconnect to the server in the
* event that the connection is lost. If set to true, in the event that
* the connection is lost, the client will attempt to reconnect to the
* server. It will initially wait 1 second before it attempts to
* reconnect, for every failed reconnect attempt, the delay will double
* until it is at 2 minutes at which point the delay will stay at 2
* minutes.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder automaticReconnect(
boolean automaticReconnect) {
doSetProperty("automaticReconnect", automaticReconnect);
return this;
}
/**
* Sets whether the client will automatically attempt to reconnect to
* the server if the connection is lost. If set to false, the client
* will not attempt to automatically reconnect to the server in the
* event that the connection is lost. If set to true, in the event that
* the connection is lost, the client will attempt to reconnect to the
* server. It will initially wait 1 second before it attempts to
* reconnect, for every failed reconnect attempt, the delay will double
* until it is at 2 minutes at which point the delay will stay at 2
* minutes.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder automaticReconnect(String automaticReconnect) {
doSetProperty("automaticReconnect", automaticReconnect);
return this;
}
/**
* The URL of the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointBuilder brokerUrl(String brokerUrl) {
doSetProperty("brokerUrl", brokerUrl);
return this;
}
/**
* Sets whether the client and server should remember state across
* restarts and reconnects. If set to false both the client and server
* will maintain state across restarts of the client, the server and the
* connection. As state is maintained: Message delivery will be reliable
* meeting the specified QOS even if the client, server or connection
* are restarted. The server will treat a subscription as durable. If
* set to true the client and server will not maintain state across
* restarts of the client, the server or the connection. This means
* Message delivery to the specified QOS cannot be maintained if the
* client, server or connection are restarted The server will treat a
* subscription as non-durable.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder cleanSession(boolean cleanSession) {
doSetProperty("cleanSession", cleanSession);
return this;
}
/**
* Sets whether the client and server should remember state across
* restarts and reconnects. If set to false both the client and server
* will maintain state across restarts of the client, the server and the
* connection. As state is maintained: Message delivery will be reliable
* meeting the specified QOS even if the client, server or connection
* are restarted. The server will treat a subscription as durable. If
* set to true the client and server will not maintain state across
* restarts of the client, the server or the connection. This means
* Message delivery to the specified QOS cannot be maintained if the
* client, server or connection are restarted The server will treat a
* subscription as non-durable.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder cleanSession(String cleanSession) {
doSetProperty("cleanSession", cleanSession);
return this;
}
/**
* MQTT client identifier. The identifier must be unique.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointBuilder clientId(String clientId) {
doSetProperty("clientId", clientId);
return this;
}
/**
* Sets the connection timeout value. This value, measured in seconds,
* defines the maximum time interval the client will wait for the
* network connection to the MQTT server to be established. The default
* timeout is 30 seconds. A value of 0 disables timeout processing
* meaning the client will wait until the network connection is made
* successfully or fails.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder connectionTimeout(int connectionTimeout) {
doSetProperty("connectionTimeout", connectionTimeout);
return this;
}
/**
* Sets the connection timeout value. This value, measured in seconds,
* defines the maximum time interval the client will wait for the
* network connection to the MQTT server to be established. The default
* timeout is 30 seconds. A value of 0 disables timeout processing
* meaning the client will wait until the network connection is made
* successfully or fails.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder connectionTimeout(String connectionTimeout) {
doSetProperty("connectionTimeout", connectionTimeout);
return this;
}
/**
* Base directory used by file persistence. Will by default use user
* directory.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointBuilder filePersistenceDirectory(
String filePersistenceDirectory) {
doSetProperty("filePersistenceDirectory", filePersistenceDirectory);
return this;
}
/**
* Sets the keep alive interval. This value, measured in seconds,
* defines the maximum time interval between messages sent or received.
* It enables the client to detect if the server is no longer available,
* without having to wait for the TCP/IP timeout. The client will ensure
* that at least one message travels across the network within each keep
* alive period. In the absence of a data-related message during the
* time period, the client sends a very small ping message, which the
* server will acknowledge. A value of 0 disables keepalive processing
* in the client. The default value is 60 seconds.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder keepAliveInterval(int keepAliveInterval) {
doSetProperty("keepAliveInterval", keepAliveInterval);
return this;
}
/**
* Sets the keep alive interval. This value, measured in seconds,
* defines the maximum time interval between messages sent or received.
* It enables the client to detect if the server is no longer available,
* without having to wait for the TCP/IP timeout. The client will ensure
* that at least one message travels across the network within each keep
* alive period. In the absence of a data-related message during the
* time period, the client sends a very small ping message, which the
* server will acknowledge. A value of 0 disables keepalive processing
* in the client. The default value is 60 seconds.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder keepAliveInterval(String keepAliveInterval) {
doSetProperty("keepAliveInterval", keepAliveInterval);
return this;
}
/**
* Sets the max inflight. please increase this value in a high traffic
* environment. The default value is 10.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder maxInflight(int maxInflight) {
doSetProperty("maxInflight", maxInflight);
return this;
}
/**
* Sets the max inflight. please increase this value in a high traffic
* environment. The default value is 10.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder maxInflight(String maxInflight) {
doSetProperty("maxInflight", maxInflight);
return this;
}
/**
* Get the maximum time (in millis) to wait between reconnects.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder maxReconnectDelay(int maxReconnectDelay) {
doSetProperty("maxReconnectDelay", maxReconnectDelay);
return this;
}
/**
* Get the maximum time (in millis) to wait between reconnects.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder maxReconnectDelay(String maxReconnectDelay) {
doSetProperty("maxReconnectDelay", maxReconnectDelay);
return this;
}
/**
* Sets the MQTT version. The default action is to connect with version
* 3.1.1, and to fall back to 3.1 if that fails. Version 3.1.1 or 3.1
* can be selected specifically, with no fall back, by using the
* MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder mqttVersion(int mqttVersion) {
doSetProperty("mqttVersion", mqttVersion);
return this;
}
/**
* Sets the MQTT version. The default action is to connect with version
* 3.1.1, and to fall back to 3.1 if that fails. Version 3.1.1 or 3.1
* can be selected specifically, with no fall back, by using the
* MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder mqttVersion(String mqttVersion) {
doSetProperty("mqttVersion", mqttVersion);
return this;
}
/**
* Client persistence to be used - memory or file.
*
* The option is a:
* <code>org.apache.camel.component.paho.PahoPersistence</code> type.
*
* Group: common
*/
default PahoEndpointBuilder persistence(PahoPersistence persistence) {
doSetProperty("persistence", persistence);
return this;
}
/**
* Client persistence to be used - memory or file.
*
* The option will be converted to a
* <code>org.apache.camel.component.paho.PahoPersistence</code> type.
*
* Group: common
*/
default PahoEndpointBuilder persistence(String persistence) {
doSetProperty("persistence", persistence);
return this;
}
/**
* Client quality of service level (0-2).
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder qos(int qos) {
doSetProperty("qos", qos);
return this;
}
/**
* Client quality of service level (0-2).
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder qos(String qos) {
doSetProperty("qos", qos);
return this;
}
/**
* Retain option.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder retained(boolean retained) {
doSetProperty("retained", retained);
return this;
}
/**
* Retain option.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder retained(String retained) {
doSetProperty("retained", retained);
return this;
}
/**
* Set a list of one or more serverURIs the client may connect to.
* Multiple servers can be separated by comma. Each serverURI specifies
* the address of a server that the client may connect to. Two types of
* connection are supported tcp:// for a TCP connection and ssl:// for a
* TCP connection secured by SSL/TLS. For example: tcp://localhost:1883
* ssl://localhost:8883 If the port is not specified, it will default to
* 1883 for tcp:// URIs, and 8883 for ssl:// URIs. If serverURIs is set
* then it overrides the serverURI parameter passed in on the
* constructor of the MQTT client. When an attempt to connect is
* initiated the client will start with the first serverURI in the list
* and work through the list until a connection is established with a
* server. If a connection cannot be made to any of the servers then the
* connect attempt fails. Specifying a list of servers that a client may
* connect to has several uses: High Availability and reliable message
* delivery Some MQTT servers support a high availability feature where
* two or more equal MQTT servers share state. An MQTT client can
* connect to any of the equal servers and be assured that messages are
* reliably delivered and durable subscriptions are maintained no matter
* which server the client connects to. The cleansession flag must be
* set to false if durable subscriptions and/or reliable message
* delivery is required. Hunt List A set of servers may be specified
* that are not equal (as in the high availability option). As no state
* is shared across the servers reliable message delivery and durable
* subscriptions are not valid. The cleansession flag must be set to
* true if the hunt list mode is used.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointBuilder serverURIs(String serverURIs) {
doSetProperty("serverURIs", serverURIs);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointBuilder willPayload(String willPayload) {
doSetProperty("willPayload", willPayload);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder willQos(int willQos) {
doSetProperty("willQos", willQos);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option will be converted to a <code>int</code> type.
*
* Group: common
*/
default PahoEndpointBuilder willQos(String willQos) {
doSetProperty("willQos", willQos);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder willRetained(boolean willRetained) {
doSetProperty("willRetained", willRetained);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: common
*/
default PahoEndpointBuilder willRetained(String willRetained) {
doSetProperty("willRetained", willRetained);
return this;
}
/**
* Sets the Last Will and Testament (LWT) for the connection. In the
* event that this client unexpectedly loses its connection to the
* server, the server will publish a message to itself using the
* supplied details. The topic to publish to The byte payload for the
* message. The quality of service to publish the message at (0, 1 or
* 2). Whether or not the message should be retained.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: common
*/
default PahoEndpointBuilder willTopic(String willTopic) {
doSetProperty("willTopic", willTopic);
return this;
}
/**
* Whether SSL HostnameVerifier is enabled or not. The default value is
* true.
*
* The option is a: <code>boolean</code> type.
*
* Group: security
*/
default PahoEndpointBuilder httpsHostnameVerificationEnabled(
boolean httpsHostnameVerificationEnabled) {
doSetProperty("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled);
return this;
}
/**
* Whether SSL HostnameVerifier is enabled or not. The default value is
* true.
*
* The option will be converted to a <code>boolean</code> type.
*
* Group: security
*/
default PahoEndpointBuilder httpsHostnameVerificationEnabled(
String httpsHostnameVerificationEnabled) {
doSetProperty("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled);
return this;
}
/**
* Password to be used for authentication against the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default PahoEndpointBuilder password(String password) {
doSetProperty("password", password);
return this;
}
/**
* Sets the SocketFactory to use. This allows an application to apply
* its own policies around the creation of network sockets. If using an
* SSL connection, an SSLSocketFactory can be used to supply
* application-specific security settings.
*
* The option is a: <code>javax.net.SocketFactory</code> type.
*
* Group: security
*/
default PahoEndpointBuilder socketFactory(Object socketFactory) {
doSetProperty("socketFactory", socketFactory);
return this;
}
/**
* Sets the SocketFactory to use. This allows an application to apply
* its own policies around the creation of network sockets. If using an
* SSL connection, an SSLSocketFactory can be used to supply
* application-specific security settings.
*
* The option will be converted to a
* <code>javax.net.SocketFactory</code> type.
*
* Group: security
*/
default PahoEndpointBuilder socketFactory(String socketFactory) {
doSetProperty("socketFactory", socketFactory);
return this;
}
/**
* Sets the SSL properties for the connection. Note that these
* properties are only valid if an implementation of the Java Secure
* Socket Extensions (JSSE) is available. These properties are not used
* if a custom SocketFactory has been set. The following properties can
* be used: com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1,
* SSL_TLS. com.ibm.ssl.contextProvider Underlying JSSE provider. For
* example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the file
* that contains the KeyStore object that you want the KeyManager to
* use. For example /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The
* password for the KeyStore object that you want the KeyManager to use.
* The password can either be in plain-text, or may be obfuscated using
* the static method: com.ibm.micro.security.Password.obfuscate(char
* password). This obfuscates the password using a simple and insecure
* XOR and Base64 encoding mechanism. Note that this is only a simple
* scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType
* Type of key store, for example PKCS12, JKS, or JCEKS.
* com.ibm.ssl.keyStoreProvider Key store provider, for example IBMJCE
* or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that
* contains the KeyStore object that you want the TrustManager to use.
* com.ibm.ssl.trustStorePassword The password for the TrustStore object
* that you want the TrustManager to use. The password can either be in
* plain-text, or may be obfuscated using the static method:
* com.ibm.micro.security.Password.obfuscate(char password). This
* obfuscates the password using a simple and insecure XOR and Base64
* encoding mechanism. Note that this is only a simple scrambler to
* obfuscate clear-text passwords. com.ibm.ssl.trustStoreType The type
* of KeyStore object that you want the default TrustManager to use.
* Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider
* Trust store provider, for example IBMJCE or IBMJCEFIPS.
* com.ibm.ssl.enabledCipherSuites A list of which ciphers are enabled.
* Values are dependent on the provider, for example:
* SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA.
* com.ibm.ssl.keyManager Sets the algorithm that will be used to
* instantiate a KeyManagerFactory object instead of using the default
* algorithm available in the platform. Example values: IbmX509 or
* IBMJ9X509. com.ibm.ssl.trustManager Sets the algorithm that will be
* used to instantiate a TrustManagerFactory object instead of using the
* default algorithm available in the platform. Example values: PKIX or
* IBMJ9X509.
*
* The option is a: <code>java.util.Properties</code> type.
*
* Group: security
*/
default PahoEndpointBuilder sslClientProps(Properties sslClientProps) {
doSetProperty("sslClientProps", sslClientProps);
return this;
}
/**
* Sets the SSL properties for the connection. Note that these
* properties are only valid if an implementation of the Java Secure
* Socket Extensions (JSSE) is available. These properties are not used
* if a custom SocketFactory has been set. The following properties can
* be used: com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1,
* SSL_TLS. com.ibm.ssl.contextProvider Underlying JSSE provider. For
* example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the file
* that contains the KeyStore object that you want the KeyManager to
* use. For example /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The
* password for the KeyStore object that you want the KeyManager to use.
* The password can either be in plain-text, or may be obfuscated using
* the static method: com.ibm.micro.security.Password.obfuscate(char
* password). This obfuscates the password using a simple and insecure
* XOR and Base64 encoding mechanism. Note that this is only a simple
* scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType
* Type of key store, for example PKCS12, JKS, or JCEKS.
* com.ibm.ssl.keyStoreProvider Key store provider, for example IBMJCE
* or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that
* contains the KeyStore object that you want the TrustManager to use.
* com.ibm.ssl.trustStorePassword The password for the TrustStore object
* that you want the TrustManager to use. The password can either be in
* plain-text, or may be obfuscated using the static method:
* com.ibm.micro.security.Password.obfuscate(char password). This
* obfuscates the password using a simple and insecure XOR and Base64
* encoding mechanism. Note that this is only a simple scrambler to
* obfuscate clear-text passwords. com.ibm.ssl.trustStoreType The type
* of KeyStore object that you want the default TrustManager to use.
* Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider
* Trust store provider, for example IBMJCE or IBMJCEFIPS.
* com.ibm.ssl.enabledCipherSuites A list of which ciphers are enabled.
* Values are dependent on the provider, for example:
* SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA.
* com.ibm.ssl.keyManager Sets the algorithm that will be used to
* instantiate a KeyManagerFactory object instead of using the default
* algorithm available in the platform. Example values: IbmX509 or
* IBMJ9X509. com.ibm.ssl.trustManager Sets the algorithm that will be
* used to instantiate a TrustManagerFactory object instead of using the
* default algorithm available in the platform. Example values: PKIX or
* IBMJ9X509.
*
* The option will be converted to a <code>java.util.Properties</code>
* type.
*
* Group: security
*/
default PahoEndpointBuilder sslClientProps(String sslClientProps) {
doSetProperty("sslClientProps", sslClientProps);
return this;
}
/**
* Sets the HostnameVerifier for the SSL connection. Note that it will
* be used after handshake on a connection and you should do actions by
* yourself when hostname is verified error. There is no default
* HostnameVerifier.
*
* The option is a: <code>javax.net.ssl.HostnameVerifier</code> type.
*
* Group: security
*/
default PahoEndpointBuilder sslHostnameVerifier(
Object sslHostnameVerifier) {
doSetProperty("sslHostnameVerifier", sslHostnameVerifier);
return this;
}
/**
* Sets the HostnameVerifier for the SSL connection. Note that it will
* be used after handshake on a connection and you should do actions by
* yourself when hostname is verified error. There is no default
* HostnameVerifier.
*
* The option will be converted to a
* <code>javax.net.ssl.HostnameVerifier</code> type.
*
* Group: security
*/
default PahoEndpointBuilder sslHostnameVerifier(
String sslHostnameVerifier) {
doSetProperty("sslHostnameVerifier", sslHostnameVerifier);
return this;
}
/**
* Username to be used for authentication against the MQTT broker.
*
* The option is a: <code>java.lang.String</code> type.
*
* Group: security
*/
default PahoEndpointBuilder userName(String userName) {
doSetProperty("userName", userName);
return this;
}
}
/**
* Advanced builder for endpoint for the Paho component.
*/
public interface AdvancedPahoEndpointBuilder
extends
AdvancedPahoEndpointConsumerBuilder, AdvancedPahoEndpointProducerBuilder {
default PahoEndpointBuilder basic() {
return (PahoEndpointBuilder) 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 AdvancedPahoEndpointBuilder basicPropertyBinding(
boolean basicPropertyBinding) {
doSetProperty("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 AdvancedPahoEndpointBuilder basicPropertyBinding(
String basicPropertyBinding) {
doSetProperty("basicPropertyBinding", basicPropertyBinding);
return this;
}
/**
* To use an existing mqtt client.
*
* The option is a:
* <code>org.eclipse.paho.client.mqttv3.MqttClient</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointBuilder client(Object client) {
doSetProperty("client", client);
return this;
}
/**
* To use an existing mqtt client.
*
* The option will be converted to a
* <code>org.eclipse.paho.client.mqttv3.MqttClient</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointBuilder client(String client) {
doSetProperty("client", client);
return this;
}
/**
* Sets the Custom WebSocket Headers for the WebSocket Connection.
*
* The option is a: <code>java.util.Properties</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointBuilder customWebSocketHeaders(
Properties customWebSocketHeaders) {
doSetProperty("customWebSocketHeaders", customWebSocketHeaders);
return this;
}
/**
* Sets the Custom WebSocket Headers for the WebSocket Connection.
*
* The option will be converted to a <code>java.util.Properties</code>
* type.
*
* Group: advanced
*/
default AdvancedPahoEndpointBuilder customWebSocketHeaders(
String customWebSocketHeaders) {
doSetProperty("customWebSocketHeaders", customWebSocketHeaders);
return this;
}
/**
* Set the time in seconds that the executor service should wait when
* terminating before forcefully terminating. It is not recommended to
* change this value unless you are absolutely sure that you need to.
*
* The option is a: <code>int</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointBuilder executorServiceTimeout(
int executorServiceTimeout) {
doSetProperty("executorServiceTimeout", executorServiceTimeout);
return this;
}
/**
* Set the time in seconds that the executor service should wait when
* terminating before forcefully terminating. It is not recommended to
* change this value unless you are absolutely sure that you need to.
*
* The option will be converted to a <code>int</code> type.
*
* Group: advanced
*/
default AdvancedPahoEndpointBuilder executorServiceTimeout(
String executorServiceTimeout) {
doSetProperty("executorServiceTimeout", executorServiceTimeout);
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: advanced
*/
default AdvancedPahoEndpointBuilder synchronous(boolean synchronous) {
doSetProperty("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: advanced
*/
default AdvancedPahoEndpointBuilder synchronous(String synchronous) {
doSetProperty("synchronous", synchronous);
return this;
}
}
/**
* Proxy enum for
* <code>org.apache.camel.component.paho.PahoPersistence</code> enum.
*/
enum PahoPersistence {
FILE,
MEMORY;
}
/**
* Paho (camel-paho)
* Component for communicating with MQTT message brokers using Eclipse Paho
* MQTT Client.
*
* Category: messaging,iot
* Available as of version: 2.16
* Maven coordinates: org.apache.camel:camel-paho
*
* Syntax: <code>paho:topic</code>
*
* Path parameter: topic (required)
* Name of the topic
*/
default PahoEndpointBuilder paho(String path) {
class PahoEndpointBuilderImpl extends AbstractEndpointBuilder implements PahoEndpointBuilder, AdvancedPahoEndpointBuilder {
public PahoEndpointBuilderImpl(String path) {
super("paho", path);
}
}
return new PahoEndpointBuilderImpl(path);
}
}