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 class |
SocketConnector.SocketConnectorEvent |
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPRESSION_DISABLED_KEY |
static tigase.jaxmpp.core.client.observer.EventType |
HostChanged
see-other-host
|
static String |
HOSTNAME_VERIFIER_DISABLED_KEY |
static String |
HOSTNAME_VERIFIER_KEY |
static String |
KEY_MANAGERS_KEY |
protected tigase.jaxmpp.core.client.observer.Observable |
observable |
static String |
SASL_EXTERNAL_ENABLED_KEY |
static String |
SERVER_HOST |
static String |
SERVER_PORT |
static String |
SSL_SOCKET_FACTORY_KEY |
static String |
TLS_DISABLED_KEY |
BodyReceived, COMPRESSED_KEY, Connected, CONNECTOR_STAGE_KEY, DISABLE_KEEPALIVE_KEY, ENCRYPTED_KEY, EncryptionEstablished, Error, EXTERNAL_KEEPALIVE_KEY, SEE_OTHER_HOST_KEY, StanzaReceived, StanzaSending, StateChanged, StreamTerminated, TRUST_MANAGERS_KEY| Constructor and Description |
|---|
SocketConnector(tigase.jaxmpp.core.client.observer.Observable parentObservable,
tigase.jaxmpp.core.client.SessionObject sessionObject2) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(tigase.jaxmpp.core.client.observer.EventType eventType,
tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener) |
void |
addListener(tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.observer.BaseEvent> listener) |
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.xml.Element response,
tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected void |
fireOnTerminate(tigase.jaxmpp.core.client.SessionObject sessionObject) |
protected KeyManager[] |
getKeyManagers() |
tigase.jaxmpp.core.client.observer.Observable |
getObservable() |
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.xml.Element elem) |
void |
onZLibStanza(tigase.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.xml.Element elem) |
void |
removeAllListeners() |
void |
removeListener(tigase.jaxmpp.core.client.observer.EventType eventType,
tigase.jaxmpp.core.client.observer.Listener<tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener) |
void |
restartStream() |
void |
send(byte[] buffer) |
void |
send(tigase.jaxmpp.core.client.xml.Element stanza) |
void |
setObservable(tigase.jaxmpp.core.client.observer.Observable observable) |
protected void |
setStage(tigase.jaxmpp.core.client.Connector.State state) |
void |
start() |
void |
startTLS() |
void |
startZLib()
Sends
|
void |
stop() |
void |
stop(boolean terminate) |
public static final String COMPRESSION_DISABLED_KEY
public static final tigase.jaxmpp.core.client.observer.EventType HostChanged
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 String SSL_SOCKET_FACTORY_KEY
public static final String TLS_DISABLED_KEY
protected tigase.jaxmpp.core.client.observer.Observable observable
public SocketConnector(tigase.jaxmpp.core.client.observer.Observable parentObservable,
tigase.jaxmpp.core.client.SessionObject sessionObject2)
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 void addListener(tigase.jaxmpp.core.client.observer.EventType eventType,
tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener)
addListener in interface tigase.jaxmpp.core.client.Connectorpublic void addListener(tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.observer.BaseEvent> listener)
public 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.xml.Element 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.observer.Observable getObservable()
getObservable in interface tigase.jaxmpp.core.client.Connectorpublic 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.xml.Element elem)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void onZLibStanza(tigase.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.xml.Element elem)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void removeAllListeners()
removeAllListeners in interface tigase.jaxmpp.core.client.Connectorpublic void removeListener(tigase.jaxmpp.core.client.observer.EventType eventType,
tigase.jaxmpp.core.client.observer.Listener<tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener)
removeListener in interface tigase.jaxmpp.core.client.Connectorpublic void restartStream()
throws tigase.jaxmpp.core.client.xml.XMLException,
tigase.jaxmpp.core.client.exceptions.JaxmppException
restartStream in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.xml.XMLExceptiontigase.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.xml.XMLException,
tigase.jaxmpp.core.client.exceptions.JaxmppException
send in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.xml.XMLExceptiontigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void setObservable(tigase.jaxmpp.core.client.observer.Observable observable)
setObservable in interface tigase.jaxmpp.core.client.Connectorprotected 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.xml.XMLException,
tigase.jaxmpp.core.client.exceptions.JaxmppException
start in interface tigase.jaxmpp.core.client.Connectortigase.jaxmpp.core.client.xml.XMLExceptiontigase.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.JaxmppExceptionpublic 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–2014 Tigase. All rights reserved.