org.jivesoftware.smack
Class SSLXMPPConnection
java.lang.Object
org.jivesoftware.smack.XMPPConnection
org.jivesoftware.smack.SSLXMPPConnection
- public class SSLXMPPConnection
- extends XMPPConnection
Creates an SSL connection to a XMPP server.
- Author:
- Matt Tucker
Constructor Summary |
SSLXMPPConnection(String host)
Creates a new SSL connection to the specified host on the default
SSL port (5223). |
SSLXMPPConnection(String host,
int port)
Creates a new SSL connection to the specified host on the specified port. |
SSLXMPPConnection(String host,
int port,
String serviceName)
Creates a new SSL connection to the specified XMPP server on the given host and port. |
Method Summary |
boolean |
isSecureConnection()
Returns true if the connection is a secured one, such as an SSL connection. |
Methods inherited from class org.jivesoftware.smack.XMPPConnection |
addConnectionListener, addConnectionListener, addPacketListener, addPacketWriterListener, close, createChat, createGroupChat, createPacketCollector, getAccountManager, getConnectionID, getHost, getPort, getRoster, getSASLAuthentication, getServiceName, getUser, isAnonymous, isAuthenticated, isConnected, isUsingTLS, login, login, login, loginAnonymously, removeConnectionListener, removeConnectionListener, removePacketListener, removePacketWriterListener, sendPacket |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SSLXMPPConnection
public SSLXMPPConnection(String host)
throws XMPPException
- Creates a new SSL connection to the specified host on the default
SSL port (5223). The IP address of the server is assumed to match the
service name.
- Parameters:
host
- the XMPP host.
- Throws:
XMPPException
- if an error occurs while trying to establish the connection.
Two possible errors can occur which will be wrapped by an XMPPException --
UnknownHostException (XMPP error code 504), and IOException (XMPP error code
502). The error codes and wrapped exceptions can be used to present more
appropiate error messages to end-users.
SSLXMPPConnection
public SSLXMPPConnection(String host,
int port)
throws XMPPException
- Creates a new SSL connection to the specified host on the specified port. The IP address
of the server is assumed to match the service name.
- Parameters:
host
- the XMPP host.port
- the port to use for the connection (default XMPP SSL port is 5223).
- Throws:
XMPPException
- if an error occurs while trying to establish the connection.
Two possible errors can occur which will be wrapped by an XMPPException --
UnknownHostException (XMPP error code 504), and IOException (XMPP error code
502). The error codes and wrapped exceptions can be used to present more
appropiate error messages to end-users.
SSLXMPPConnection
public SSLXMPPConnection(String host,
int port,
String serviceName)
throws XMPPException
- Creates a new SSL connection to the specified XMPP server on the given host and port.
- Parameters:
host
- the host name, or null for the loopback address.port
- the port on the server that should be used (default XMPP SSL port is 5223).serviceName
- the name of the XMPP server to connect to; e.g. jivesoftware.com.
- Throws:
XMPPException
- if an error occurs while trying to establish the connection.
Two possible errors can occur which will be wrapped by an XMPPException --
UnknownHostException (XMPP error code 504), and IOException (XMPP error code
502). The error codes and wrapped exceptions can be used to present more
appropiate error messages to end-users.
isSecureConnection
public boolean isSecureConnection()
- Description copied from class:
XMPPConnection
- Returns true if the connection is a secured one, such as an SSL connection.
- Overrides:
isSecureConnection
in class XMPPConnection
- Returns:
- true if a secure connection to the server.
Copyright © 2003 Jive Software.