| Modifier and Type | Class and Description |
|---|---|
static interface |
SocketConnector.DnsResolver |
static class |
SocketConnector.Entry |
static interface |
SocketConnector.HostChangedHandler
see-other-host
|
Connector.ConnectedHandler, Connector.DisconnectedHandler, Connector.EncryptionEstablishedHandler, Connector.ErrorHandler, Connector.StanzaReceivedHandler, Connector.StanzaSendingHandler, Connector.State, Connector.StateChangedHandler, 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 |
RECONNECTING_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 |
COMPRESSED_KEY, CONNECTOR_STAGE_KEY, DISABLE_KEEPALIVE_KEY, ENCRYPTED_KEY, EXTERNAL_KEEPALIVE_KEY, SEE_OTHER_HOST_KEY, TRUST_MANAGERS_KEY| Constructor and Description |
|---|
SocketConnector(Context context) |
| Modifier and Type | Method and Description |
|---|---|
XmppSessionLogic |
createSessionLogic(XmppModulesManager modulesManager,
PacketWriter writer)
Returns instance of XmppSessionLogic to work with this
connector.
|
protected void |
fireOnConnected(SessionObject sessionObject) |
protected void |
fireOnError(Element response,
Throwable caught,
SessionObject sessionObject) |
protected void |
fireOnStanzaReceived(StreamPacket response,
SessionObject sessionObject) |
protected void |
fireOnTerminate(SessionObject sessionObject) |
protected KeyManager[] |
getKeyManagers() |
Connector.State |
getState()
Returns current State of connector.
|
boolean |
isCompressed()
Returns true when stream is compressed
|
boolean |
isSecure()
Returns connection security state.
|
static boolean |
isTLSAvailable(SessionObject sessionObject) |
static boolean |
isZLibAvailable(SessionObject sessionObject)
Returns true if server send stream features in which it advertises
support for stream compression using ZLIB
|
void |
keepalive()
Whitespace ping.
|
protected void |
onError(Element response,
Throwable caught) |
protected void |
onErrorInThread(Exception e) |
protected void |
onResponse(Element response) |
protected void |
onStreamStart(Map<String,String> attribs) |
protected void |
onStreamTerminate() |
void |
onTLSStanza(Element elem) |
void |
onZLibStanza(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(Element elem) |
void |
restartStream()
Sends new XML Stream header.
|
void |
send(byte[] buffer) |
void |
send(Element stanza)
Sends given XML Element to server.
|
protected void |
setStage(Connector.State state) |
void |
start()
Starts connector.
|
void |
startTLS() |
void |
startZLib()
Sends
|
void |
stop()
Stops connector and closes connections.
|
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 RECONNECTING_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(Context context)
public static boolean isTLSAvailable(SessionObject sessionObject) throws XMLException
XMLExceptionpublic static boolean isZLibAvailable(SessionObject sessionObject) throws XMLException
sessionObject - XMLExceptionpublic XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer)
ConnectorcreateSessionLogic in interface ConnectormodulesManager - module managerwriter - writerprotected void fireOnConnected(SessionObject sessionObject) throws JaxmppException
JaxmppExceptionprotected void fireOnError(Element response, Throwable caught, SessionObject sessionObject) throws JaxmppException
JaxmppExceptionprotected void fireOnStanzaReceived(StreamPacket response, SessionObject sessionObject) throws JaxmppException
JaxmppExceptionprotected void fireOnTerminate(SessionObject sessionObject) throws JaxmppException
JaxmppExceptionprotected KeyManager[] getKeyManagers() throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic Connector.State getState()
public boolean isCompressed()
isCompressed in interface Connectorpublic boolean isSecure()
Connectorpublic void keepalive()
throws JaxmppException
Connectorkeepalive in interface ConnectorJaxmppExceptionprotected void onError(Element response, Throwable caught) throws JaxmppException
JaxmppExceptionprotected void onErrorInThread(Exception e) throws JaxmppException
JaxmppExceptionprotected void onResponse(Element response) throws JaxmppException
JaxmppExceptionprotected void onStreamTerminate()
throws JaxmppException
JaxmppExceptionpublic void onTLSStanza(Element elem) throws JaxmppException
JaxmppExceptionpublic void onZLibStanza(Element elem) throws JaxmppException
elem - JaxmppExceptionprotected void proceedTLS()
throws JaxmppException
JaxmppExceptionprotected void proceedZLib()
throws JaxmppException
JaxmppExceptionpublic void processElement(Element elem) throws JaxmppException
JaxmppExceptionpublic void restartStream()
throws XMLException,
JaxmppException
ConnectorrestartStream in interface ConnectorXMLExceptionJaxmppExceptionpublic void send(byte[] buffer)
throws JaxmppException
JaxmppExceptionpublic void send(Element stanza) throws XMLException, JaxmppException
Connectorsend in interface Connectorstanza - XML element to send.XMLExceptionJaxmppExceptionprotected void setStage(Connector.State state) throws JaxmppException
JaxmppExceptionpublic void start()
throws XMLException,
JaxmppException
Connectorstart in interface ConnectorXMLExceptionJaxmppExceptionpublic void startTLS()
throws JaxmppException
JaxmppExceptionpublic void startZLib()
throws JaxmppException
JaxmppExceptionpublic void stop()
throws JaxmppException
Connectorstop in interface ConnectorJaxmppException@Deprecated public void stop(boolean terminate) throws JaxmppException
Connectorstop in interface Connectorterminate - if
true then connection will be terminated immediatelly and connector will be stopped.JaxmppExceptionCopyright © 2006–2015 Tigase. All rights reserved.