|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smack.ConnectionConfiguration
public class ConnectionConfiguration
Configuration to use while establishing the connection to the server. It is possible to configure the path to the trustore file that keeps the trusted CA root certificates and enable or disable all or some of the checkings done while verifying server certificates.
It is also possible to configure it TLs, SASL or compression are going to be used or not.
Constructor Summary | |
---|---|
ConnectionConfiguration(String host,
int port)
|
|
ConnectionConfiguration(String host,
int port,
String serviceName)
|
Method Summary | |
---|---|
protected Object |
clone()
|
String |
getHost()
Returns the host to use when establishing the connection. |
int |
getPort()
Returns the port to use when establishing the connection. |
String |
getServiceName()
Returns the server name of the target server. |
String |
getTruststorePassword()
Returns the password to use to access the truststore file. |
String |
getTruststorePath()
Retuns the path to the truststore file. |
String |
getTruststoreType()
|
boolean |
isCompressionEnabled()
Returns true if the connection is going to use stream compression. |
boolean |
isDebuggerEnabled()
Returns true if the new connection about to be establish is going to be debugged. |
boolean |
isExpiredCertificatesCheckEnabled()
Returns true if certificates presented by the server are going to be checked for their validity. |
boolean |
isNotMatchingDomainCheckEnabled()
Returns true if certificates presented by the server are going to be checked for their domain. |
boolean |
isSASLAuthenticationEnabled()
Returns true if the client is going to use SASL authentication when logging into the server. |
boolean |
isSelfSignedCertificateEnabled()
Returns true if self-signed certificates are going to be accepted. |
boolean |
isTLSEnabled()
Returns true if the client is going to try to secure the connection using TLS after the connection has been established. |
boolean |
isVerifyChainEnabled()
Returns true if the whole chain of certificates presented by the server are going to be checked. |
boolean |
isVerifyRootCAEnabled()
Returns true if root CA checking is going to be done. |
void |
setCompressionEnabled(boolean compressionEnabled)
Sets if the connection is going to use stream compression. |
void |
setDebuggerEnabled(boolean debuggerEnabled)
Sets if the new connection about to be establish is going to be debugged. |
void |
setExpiredCertificatesCheckEnabled(boolean expiredCertificatesCheckEnabled)
Sets if certificates presented by the server are going to be checked for their validity. |
void |
setNotMatchingDomainCheckEnabled(boolean notMatchingDomainCheckEnabled)
Sets if certificates presented by the server are going to be checked for their domain. |
void |
setSASLAuthenticationEnabled(boolean saslAuthenticationEnabled)
Sets if the client is going to use SASL authentication when logging into the server. |
void |
setSelfSignedCertificateEnabled(boolean selfSignedCertificateEnabled)
Sets if self-signed certificates are going to be accepted. |
void |
setTLSEnabled(boolean tlsEnabled)
Sets if the client is going to try to secure the connection using TLS after the connection has been established. |
void |
setTruststorePassword(String truststorePassword)
Sets the password to use to access the truststore file. |
void |
setTruststorePath(String truststorePath)
Sets the path to the truststore file. |
void |
setTruststoreType(String truststoreType)
|
void |
setVerifyChainEnabled(boolean verifyChainEnabled)
Sets if the whole chain of certificates presented by the server are going to be checked. |
void |
setVerifyRootCAEnabled(boolean verifyRootCAEnabled)
Sets if root CA checking is going to be done. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionConfiguration(String host, int port, String serviceName)
public ConnectionConfiguration(String host, int port)
Method Detail |
---|
public String getServiceName()
public String getHost()
public int getPort()
public boolean isTLSEnabled()
public void setTLSEnabled(boolean tlsEnabled)
tlsEnabled
- if the client is going to try to secure the connection using TLS after
the connection has been established.public String getTruststorePath()
public void setTruststorePath(String truststorePath)
truststorePath
- the path to the truststore file.public String getTruststoreType()
public void setTruststoreType(String truststoreType)
public String getTruststorePassword()
public void setTruststorePassword(String truststorePassword)
truststorePassword
- the password to use to access the truststore file.public boolean isVerifyChainEnabled()
public void setVerifyChainEnabled(boolean verifyChainEnabled)
verifyChainEnabled
- if the whole chaing of certificates presented by the server
are going to be checked.public boolean isVerifyRootCAEnabled()
public void setVerifyRootCAEnabled(boolean verifyRootCAEnabled)
verifyRootCAEnabled
- if root CA checking is going to be done.public boolean isSelfSignedCertificateEnabled()
public void setSelfSignedCertificateEnabled(boolean selfSignedCertificateEnabled)
selfSignedCertificateEnabled
- if self-signed certificates are going to be accepted.public boolean isExpiredCertificatesCheckEnabled()
public void setExpiredCertificatesCheckEnabled(boolean expiredCertificatesCheckEnabled)
expiredCertificatesCheckEnabled
- if certificates presented by the server are going
to be checked for their validity.public boolean isNotMatchingDomainCheckEnabled()
public void setNotMatchingDomainCheckEnabled(boolean notMatchingDomainCheckEnabled)
notMatchingDomainCheckEnabled
- if certificates presented by the server are going
to be checked for their domain.public boolean isCompressionEnabled()
public void setCompressionEnabled(boolean compressionEnabled)
compressionEnabled
- if the connection is going to use stream compression.public boolean isSASLAuthenticationEnabled()
public void setSASLAuthenticationEnabled(boolean saslAuthenticationEnabled)
saslAuthenticationEnabled
- if the client is going to use SASL authentication when
logging into the server.public boolean isDebuggerEnabled()
XMPPConnection.DEBUG_ENABLED
is used.
public void setDebuggerEnabled(boolean debuggerEnabled)
XMPPConnection.DEBUG_ENABLED
is used.
debuggerEnabled
- if the new connection about to be establish is going to be debugged.protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |