public class ConnectionConfiguration
extends java.lang.Object
implements java.lang.Cloneable
It is also possible to configure it TLs, SASL or compression are going to be used or not.
Constructor and Description |
---|
ConnectionConfiguration(java.lang.String host,
int port) |
ConnectionConfiguration(java.lang.String host,
int port,
java.lang.String serviceName) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
clone() |
java.lang.String |
getHost()
Returns the host to use when establishing the connection.
|
int |
getPort()
Returns the port to use when establishing the connection.
|
java.lang.String |
getServiceName()
Returns the server name of the target server.
|
java.lang.String |
getTruststorePassword()
Returns the password to use to access the truststore file.
|
java.lang.String |
getTruststorePath()
Retuns the path to the truststore file.
|
java.lang.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(java.lang.String truststorePassword)
Sets the password to use to access the truststore file.
|
void |
setTruststorePath(java.lang.String truststorePath)
Sets the path to the truststore file.
|
void |
setTruststoreType(java.lang.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.
|
public ConnectionConfiguration(java.lang.String host, int port, java.lang.String serviceName)
public ConnectionConfiguration(java.lang.String host, int port)
public java.lang.String getServiceName()
public java.lang.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 java.lang.String getTruststorePath()
public void setTruststorePath(java.lang.String truststorePath)
truststorePath
- the path to the truststore file.public java.lang.String getTruststoreType()
public void setTruststoreType(java.lang.String truststoreType)
public java.lang.String getTruststorePassword()
public void setTruststorePassword(java.lang.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 java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Copyright © 2003 Jive Software.