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.
+
+
+
Parameters:
topic - the topic to publish to.
payload - the byte payload for the message.
qos - the quality of service to publish the message at (0, 1 or 2).
retained - whether or not the message should be retained.
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 that if the server is no longer available, without
+ having to wait for the long 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.
+
The default value is 60 seconds
+
+
+
Parameters:
keepAliveInterval - the interval, measured in seconds.
Sets the connection timeout value.
+ This value, measured in seconds, defines the maximum time interval
+ the client will wait for calls to connect,
+ subscribe and
+ unsubscribe to complete.
+ The default timeout is 30 seconds.
+
+
+
Parameters:
connectionTimeout - the timeout value, measured in seconds.
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.
+
Returns the message to be sent as last will and testament (LWT).
+ The returned object is "read only". Calling any "setter" methods on
+ the returned object will result in an
+ IllegalStateException being thrown.
+
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 SocketFactory has been set using
+ setSocketFactory(SocketFactory).
+ 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".
+
+
+
+
+
+
+
+
+
+
+isCleanSession
+
+public boolean isCleanSession()
+
+
Returns whether the server should remember state for the client across reconnects.
+
Sets whether the server should remember state for the client across reconnects.
+ This includes subscriptions and the state of any in-flight messages.
+