public interface Connector
Modifier and Type | Interface and Description |
---|---|
static interface |
Connector.ConnectedHandler
Implemented by handlers of LoggedInEvent.
|
static interface |
Connector.DisconnectedHandler
Implemented by handlers of Connector.DisconnectedHandler.DisconnectedEvent.
|
static interface |
Connector.EncryptionEstablishedHandler
Implemented by handlers of EncryptionEstablishedEvent.
|
static interface |
Connector.ErrorHandler
Implemented by handlers of ErrorEvent.
|
static interface |
Connector.StanzaReceivedHandler
Implemented by handlers of StanzaReceivedEvent.
|
static interface |
Connector.StanzaSendingHandler
Implemented by handlers of StanzaSendingEvent.
|
static class |
Connector.State
States of Connector.
|
static interface |
Connector.StateChangedHandler
Implemented by handlers of StateChangedEvent.
|
static interface |
Connector.StreamRestartedHandler |
static interface |
Connector.StreamTerminatedHandler
Implemented by handlers of StreamTerminatedEvent.
|
Modifier and Type | Field and Description |
---|---|
static String |
COMPRESSED_KEY
Name of property that specify if connection is already compressed.
|
static String |
CONNECTOR_STAGE_KEY
Name of property that specify current state of connector.
|
static String |
CONNECTOR_STAGE_TIMESTAMP_KEY
Name of property that specify timestamp (type:
Date ) of
last state change. |
static String |
DISABLE_KEEPALIVE_KEY
Name of property that allows disable keep alive feature.
|
static String |
ENCRYPTED_KEY
Name of property that specify if connection is encrypted.
|
static String |
EXTERNAL_KEEPALIVE_KEY
Type: Boolean. |
static String |
PROXY_HOST |
static String |
PROXY_PORT |
static String |
PROXY_TYPE |
static String |
RECONNECTING_KEY |
static String |
SEE_OTHER_HOST_KEY
Type: Boolean. |
static String |
TRUST_MANAGERS_KEY
Name of property to define
property.
|
Modifier and Type | Method and Description |
---|---|
XmppSessionLogic |
createSessionLogic(XmppModulesManager modulesManager,
PacketWriter writer)
Returns instance of XmppSessionLogic to work with this
connector.
|
Connector.State |
getState()
Returns current State of connector.
|
boolean |
isCompressed()
Returns XML Stream compression state.
|
boolean |
isSecure()
Returns connection security state.
|
void |
keepalive()
Whitespace ping.
|
void |
restartStream()
Sends new XML Stream header.
|
void |
send(Element stanza)
Sends given XML Element to server.
|
void |
start()
Starts connector.
|
void |
stop()
Stops connector and closes connections.
|
void |
stop(boolean terminate)
Stops connector.
|
static final String COMPRESSED_KEY
static final String CONNECTOR_STAGE_KEY
static final String CONNECTOR_STAGE_TIMESTAMP_KEY
Date
) of
last state change.static final String DISABLE_KEEPALIVE_KEY
static final String ENCRYPTED_KEY
static final String EXTERNAL_KEEPALIVE_KEY
static final String RECONNECTING_KEY
static final String SEE_OTHER_HOST_KEY
static final String TRUST_MANAGERS_KEY
TrustManagers[]
instead of default Java TrustManager.static final String PROXY_HOST
static final String PROXY_PORT
static final String PROXY_TYPE
XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer)
modulesManager
- module managerwriter
- writerConnector.State getState()
boolean isCompressed()
true> if XML Stream is compressed.
boolean isSecure()
true> if connection is secured and encrypted.
void keepalive() throws JaxmppException
JaxmppException
void restartStream() throws JaxmppException
JaxmppException
void send(Element stanza) throws JaxmppException
stanza
- XML element to send.JaxmppException
void start() throws JaxmppException
JaxmppException
void stop() throws JaxmppException
JaxmppException
void stop(boolean terminate) throws JaxmppException
terminate
- if true then connection will be terminated immediatelly and connector will be
stopped.
JaxmppException
Copyright © 2006–2023 Tigase. All rights reserved.