Class HivemqV3Configuration
java.lang.Object
de.iip_ecosphere.platform.transport.spring.BasicConfiguration
de.iip_ecosphere.platform.transport.spring.binder.hivemqv3.HivemqV3Configuration
@ConfigurationProperties(prefix="mqtt")
public class HivemqV3Configuration
extends de.iip_ecosphere.platform.transport.spring.BasicConfiguration
Represents the configuration options of a HiveMq client.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether making the client ID unique is enabled.Returns the client identification.Returns all filtered topics.intReturns the keep-alive time between heartbeats.com.hivemq.client.mqtt.datatypes.MqttQosgetQos()Returns the QoS level for sending.booleanisFilteredTopic(String topic) Returns whethertopicis a filtered topic, i.e., we shall not subscribe to this topic.voidsetAutoClientId(boolean autoClientId) Changes whether the client identification is expected to be unique or shall be made unique upon first connect.voidsetClientId(String clientId) Changes the client identification.voidsetFilteredTopics(List<String> filteredTopics) Changes all filtered topics.voidsetKeepAlive(int keepAlive) Changes the keep-alive time between heartbeats.voidDefines the QoS level.de.iip_ecosphere.platform.transport.connectors.TransportParameterTurns the actual configuration into aTransportParameterinstance.Methods inherited from class de.iip_ecosphere.platform.transport.spring.BasicConfiguration
createTlsContext, createTransportParameterBuilder, createTrustManagerFactory, getAuthenticationKey, getHost, getHostnameVerification, getKeyAlias, getKeystoreKey, getPort, setAuthenticationKey, setHost, setHostnameVerification, setKeyAlias, setKeystoreKey, setPort, useTls
-
Field Details
-
clientId
-
autoClientId
private boolean autoClientId -
keepAlive
private int keepAlive -
filteredTopics
-
qos
-
-
Constructor Details
-
HivemqV3Configuration
public HivemqV3Configuration()
-
-
Method Details
-
isFilteredTopic
Returns whethertopicis a filtered topic, i.e., we shall not subscribe to this topic.- Parameters:
topic- the topic name- Returns:
trueif the topic is filtered (no subscription),falseelse
-
getFilteredTopics
Returns all filtered topics.- Returns:
- the filtered topics
- See Also:
-
getClientId
Returns the client identification.- Returns:
- the client identification
-
getAutoClientId
public boolean getAutoClientId()Returns whether making the client ID unique is enabled.- Returns:
truefor enabled (default),falseelse
-
getKeepAlive
public int getKeepAlive()Returns the keep-alive time between heartbeats.- Returns:
- the keep-alive time in ms (60000 by default)
-
getQos
public com.hivemq.client.mqtt.datatypes.MqttQos getQos()Returns the QoS level for sending.- Returns:
- the QoS level
-
setClientId
Changes the client identification. [required by Spring]- Parameters:
clientId- the client identification
-
setAutoClientId
public void setAutoClientId(boolean autoClientId) Changes whether the client identification is expected to be unique or shall be made unique upon first connect. [required by Spring]- Parameters:
autoClientId-true(default) for make unique,falseelse
-
setKeepAlive
public void setKeepAlive(int keepAlive) Changes the keep-alive time between heartbeats. [required by Spring]- Parameters:
keepAlive- the keep-alive time in ms
-
setFilteredTopics
Changes all filtered topics. [required by Spring]- Parameters:
filteredTopics- the new filtered topics- See Also:
-
setQos
Defines the QoS level.- Parameters:
qos- the QoS level, ignored if invalid, seeMqttQos
-
toTransportParameter
public de.iip_ecosphere.platform.transport.connectors.TransportParameter toTransportParameter()Turns the actual configuration into aTransportParameterinstance.- Overrides:
toTransportParameterin classde.iip_ecosphere.platform.transport.spring.BasicConfiguration- Returns:
- the transport parameter instance
-