Modifier and Type | Class and Description |
---|---|
static interface |
JaxmppCore.ConnectedHandler
Implemented by handlers of ConnectedEvent.
|
static interface |
JaxmppCore.DisconnectedHandler
Implemented by handlers of DisconnectedEvent.
|
Modifier and Type | Field and Description |
---|---|
static String |
AUTOADD_STANZA_ID_KEY |
protected Connector |
connector |
protected Context |
context |
protected DefaultXMPPStream |
defaultXMPPStream |
protected EventBus |
eventBus |
protected Logger |
log |
protected XmppModulesManager |
modulesManager |
protected Processor |
processor |
protected Map<Class<Property>,Property> |
properties |
protected XmppSessionLogic |
sessionLogic |
protected SessionObject |
sessionObject |
protected XmppStreamsManager |
streamsManager |
protected PacketWriter |
writer |
Constructor and Description |
---|
JaxmppCore() |
Modifier and Type | Method and Description |
---|---|
protected EventBus |
createEventBus() |
abstract void |
disconnect()
Closes XMPP session.
|
abstract void |
execute(Runnable runnable)
Executes task in executor.
|
<T extends Property> |
get(Class<T> property) |
abstract <T extends ConnectionConfiguration> |
getConnectionConfiguration()
Returns configurator.
|
Connector |
getConnector()
Returns connector.
|
Context |
getContext()
Returns
Context of this JaXMPP instance. |
EventBus |
getEventBus()
Returns
EventBus of this JaXMPP instance. |
<T extends XmppModule> |
getModule(Class<T> moduleClass)
Return module implementation by module class.
|
XmppModulesManager |
getModulesManager()
Returns
ModuleManager . |
UserProperties |
getProperties()
Returns
UserProperties . |
SessionObject |
getSessionObject()
Returns
SessionObject . |
protected void |
init() |
boolean |
isConnected()
Returns connection state.
|
boolean |
isSecure()
Returns connection security state.
|
void |
keepalive()
Whitespace ping.
|
abstract void |
login()
Connects to XMPP server.
|
protected void |
modulesInit() |
protected void |
onConnectorStopped() |
protected abstract void |
onException(JaxmppException e) |
protected abstract void |
onResourceBindSuccess(JID bindedJID) |
protected void |
onStanzaReceived(StreamPacket stanza) |
protected abstract void |
onStreamError(StreamError condition,
Throwable caught) |
protected abstract void |
onStreamResumed(Long h,
String previd) |
protected abstract void |
onStreamTerminated() |
protected void |
onUnacknowledged(List<Element> elements) |
void |
send(IQ stanza,
AsyncCallback asyncCallback)
Sends IQ
type='get' stanza to XMPP Server in current
connection. |
void |
send(IQ stanza,
Long timeout,
AsyncCallback asyncCallback)
Sends IQ
type='get' stanza to XMPP Server in current
connection. |
void |
send(Stanza stanza)
Sends stanza to XMPP Server in current connection.
|
<T extends Property> |
set(T property) |
public static final String AUTOADD_STANZA_ID_KEY
protected Connector connector
protected Context context
protected DefaultXMPPStream defaultXMPPStream
protected EventBus eventBus
protected final Logger log
protected XmppModulesManager modulesManager
protected Processor processor
protected XmppSessionLogic sessionLogic
protected SessionObject sessionObject
protected XmppStreamsManager streamsManager
protected PacketWriter writer
protected EventBus createEventBus()
public abstract void disconnect() throws JaxmppException
JaxmppException
public abstract void execute(Runnable runnable)
runnable
- task to execute.public abstract <T extends ConnectionConfiguration> T getConnectionConfiguration()
public EventBus getEventBus()
EventBus
of this JaXMPP instance.EventBus
.public <T extends XmppModule> T getModule(Class<T> moduleClass)
moduleClass
- module classpublic XmppModulesManager getModulesManager()
ModuleManager
.XmppModulesManager
.public UserProperties getProperties()
UserProperties
.UserProperties
.public SessionObject getSessionObject()
SessionObject
.SessionObject
.protected void init()
public boolean isConnected()
true
if XMPP connection is established.public boolean isSecure()
true
if connection is established and secured.public void keepalive() throws JaxmppException
JaxmppException
public abstract void login() throws JaxmppException
JaxmppException
protected void modulesInit()
protected void onConnectorStopped()
protected abstract void onException(JaxmppException e) throws JaxmppException
JaxmppException
protected abstract void onResourceBindSuccess(JID bindedJID) throws JaxmppException
JaxmppException
protected void onStanzaReceived(StreamPacket stanza)
protected abstract void onStreamError(StreamError condition, Throwable caught) throws JaxmppException
JaxmppException
protected abstract void onStreamResumed(Long h, String previd) throws JaxmppException
JaxmppException
protected abstract void onStreamTerminated() throws JaxmppException
JaxmppException
protected void onUnacknowledged(List<Element> elements) throws JaxmppException
JaxmppException
public void send(IQ stanza, AsyncCallback asyncCallback) throws JaxmppException
type='get'
stanza to XMPP Server in current
connection.stanza
- IQ stanza to send.asyncCallback
- callback to handle response for sent IQ stanza.JaxmppException
public void send(IQ stanza, Long timeout, AsyncCallback asyncCallback) throws JaxmppException
type='get'
stanza to XMPP Server in current
connection.stanza
- IQ stanza to send.timeout
- maximum time to wait for response in miliseconds.asyncCallback
- asyncCallback callback to handle response for sent IQ stanza.JaxmppException
public void send(Stanza stanza) throws JaxmppException
stanza
- stanza to send.JaxmppException
public <T extends Property> T set(T property)
Copyright © 2006–2015 Tigase. All rights reserved.