public class SocketConnector extends Object implements tigase.jaxmpp.core.client.Connector
| Modifier and Type | Class and Description |
|---|---|
static interface |
SocketConnector.DnsResolver |
static class |
SocketConnector.Entry |
static interface |
SocketConnector.HostChangedHandler
see-other-host
|
tigase.jaxmpp.core.client.Connector.ConnectedHandler, tigase.jaxmpp.core.client.Connector.DisconnectedHandler, tigase.jaxmpp.core.client.Connector.EncryptionEstablishedHandler, tigase.jaxmpp.core.client.Connector.ErrorHandler, tigase.jaxmpp.core.client.Connector.StanzaReceivedHandler, tigase.jaxmpp.core.client.Connector.StanzaSendingHandler, tigase.jaxmpp.core.client.Connector.State, tigase.jaxmpp.core.client.Connector.StateChangedHandler, tigase.jaxmpp.core.client.Connector.StreamTerminatedHandler| Modifier and Type | Field and Description |
|---|---|
static String |
COMPRESSION_DISABLED_KEY |
static HostnameVerifier |
DEFAULT_HOSTNAME_VERIFIER |
static int |
DEFAULT_SOCKET_BUFFER_SIZE
Default size of buffer used to decode data before parsing
|
static String |
HOSTNAME_VERIFIER_DISABLED_KEY |
static String |
HOSTNAME_VERIFIER_KEY |
static String |
KEY_MANAGERS_KEY |
static String |
SASL_EXTERNAL_ENABLED_KEY |
static String |
SERVER_HOST |
static String |
SERVER_PORT |
static int |
SOCKET_TIMEOUT
Socket timeout.
|
static String |
SSL_SOCKET_FACTORY_KEY |
static String |
TLS_DISABLED_KEY |
| Constructor and Description |
|---|
SocketConnector(tigase.jaxmpp.core.client.Context context) |
| Modifier and Type | Method and Description |
|---|---|
tigase.jaxmpp.core.client.XmppSessionLogic |
createSessionLogic(tigase.jaxmpp.core.client.XmppModulesManager modulesManager,
tigase.jaxmpp.core.client.PacketWriter writer) |
protected void |
fireOnConnected(tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected void |
fireOnError(tigase.jaxmpp.core.client.xml.Element response,
Throwable caught,
tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected void |
fireOnStanzaReceived(tigase.jaxmpp.core.client.xmpp.stanzas.StreamPacket response,
tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected void |
fireOnTerminate(tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected KeyManager[] |
getKeyManagers() |
tigase.jaxmpp.core.client.Connector.State |
getState() |
boolean |
isCompressed()
Returns true when stream is compressed
|
boolean |
isSecure() |
static boolean |
isTLSAvailable(tigase.jaxmpp.core.client.SessionObject sessionObject) |
static boolean |
isZLibAvailable(tigase.jaxmpp.core.client.SessionObject sessionObject)
Returns true if server send stream features in which it advertises
support for stream compression using ZLIB
|
void |
keepalive() |
protected void |
onError(tigase.jaxmpp.core.client.xml.Element response,
Throwable caught) |
protected void |
onErrorInThread(Exception e) |
protected void |
onResponse(tigase.jaxmpp.core.client.xml.Element response) |
protected void |
onStreamStart(Map<String,String> attribs) |
protected void |
onStreamTerminate() |
void |
onTLSStanza(tigase.jaxmpp.core.client.xml.Element elem) |
void |
onZLibStanza(tigase.jaxmpp.core.client.xml.Element elem)
Handles result of requesting stream compression
|
protected void |
proceedTLS() |
protected void |
proceedZLib()
Method activates stream compression by replacing reader and writer fields
values and restarting XMPP stream
|
void |
processElement(tigase.jaxmpp.core.client.xml.Element elem) |
void |
restartStream() |
void |
send(byte[] buffer) |
void |
send(tigase.jaxmpp.core.client.xml.Element stanza) |
protected void |
setStage(tigase.jaxmpp.core.client.Connector.State state) |
void |
start() |
void |
startTLS() |
void |
startZLib()
Sends
|
void |
stop() |
void |
stop(boolean terminate)
Deprecated.
|
public static final String COMPRESSION_DISABLED_KEY
public static final HostnameVerifier DEFAULT_HOSTNAME_VERIFIER
public static final int DEFAULT_SOCKET_BUFFER_SIZE
public static final String HOSTNAME_VERIFIER_DISABLED_KEY
public static final String HOSTNAME_VERIFIER_KEY
public static final String KEY_MANAGERS_KEY
public static final String SASL_EXTERNAL_ENABLED_KEY
public static final String SERVER_HOST
public static final String SERVER_PORT
public static final int SOCKET_TIMEOUT
public static final String SSL_SOCKET_FACTORY_KEY
public static final String TLS_DISABLED_KEY
public SocketConnector(tigase.jaxmpp.core.client.Context context)
public static boolean isTLSAvailable(tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.xml.XMLExceptionpublic static boolean isZLibAvailable(tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.xml.XMLException
sessionObject - tigase.jaxmpp.core.client.xml.XMLExceptionpublic tigase.jaxmpp.core.client.XmppSessionLogic createSessionLogic(tigase.jaxmpp.core.client.XmppModulesManager modulesManager,
tigase.jaxmpp.core.client.PacketWriter writer)
createSessionLogic in interface tigase.jaxmpp.core.client.Connectorprotected void fireOnConnected(tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void fireOnError(tigase.jaxmpp.core.client.xml.Element response,
Throwable caught,
tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void fireOnStanzaReceived(tigase.jaxmpp.core.client.xmpp.stanzas.StreamPacket response,
tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void fireOnTerminate(tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected KeyManager[] getKeyManagers() throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic tigase.jaxmpp.core.client.Connector.State getState()
getState in interface tigase.jaxmpp.core.client.Connectorpublic boolean isCompressed()
isCompressed in interface tigase.jaxmpp.core.client.Connectorpublic boolean isSecure()
isSecure in interface tigase.jaxmpp.core.client.Connectorpublic void keepalive()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
keepalive in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void onError(tigase.jaxmpp.core.client.xml.Element response,
Throwable caught)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void onErrorInThread(Exception e) throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void onResponse(tigase.jaxmpp.core.client.xml.Element response)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void onStreamTerminate()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void onTLSStanza(tigase.jaxmpp.core.client.xml.Element elem)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void onZLibStanza(tigase.jaxmpp.core.client.xml.Element elem)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
elem - tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void proceedTLS()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void proceedZLib()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void processElement(tigase.jaxmpp.core.client.xml.Element elem)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void restartStream()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
restartStream in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void send(byte[] buffer)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void send(tigase.jaxmpp.core.client.xml.Element stanza)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
send in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void setStage(tigase.jaxmpp.core.client.Connector.State state)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void start()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
start in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void startTLS()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void startZLib()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void stop()
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
stop in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.exceptions.JaxmppException@Deprecated public void stop(boolean terminate) throws tigase.jaxmpp.core.client.exceptions.JaxmppException
stop in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.exceptions.JaxmppExceptionCopyright © 2006–2016 Tigase. All rights reserved.