public abstract class JaxmppCore extends Object
Connected : JaxmppEvent ()Disconnected : JaxmppEvent ()| Modifier and Type | Class and Description |
|---|---|
static class |
JaxmppCore.JaxmppEvent |
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTOADD_STANZA_ID_KEY |
static EventType |
Connected |
protected Connector |
connector |
static EventType |
Disconnected |
protected Logger |
log |
protected XmppModulesManager |
modulesManager |
protected Observable |
observable |
protected Processor |
processor |
protected Listener<ResourceBinderModule.ResourceBindEvent> |
resourceBindListener |
protected XmppSessionLogic |
sessionLogic |
protected AbstractSessionObject |
sessionObject |
protected Listener<Connector.ConnectorEvent> |
stanzaReceivedListener |
protected Listener<Connector.ConnectorEvent> |
streamErrorListener |
protected Listener<StreamManagementModule.StreamResumedEvent> |
streamResumedListener |
protected Listener<Connector.ConnectorEvent> |
streamTerminateListener |
protected Listener<StreamManagementModule.UnacknowledgedEvent> |
unacknowledgedListener |
protected PacketWriter |
writer |
| Constructor and Description |
|---|
JaxmppCore(SessionObject sessionObject) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(EventType eventType,
Listener<?> listener) |
void |
addListener(Listener<?> listener) |
Chat |
createChat(JID jid) |
abstract void |
disconnect() |
abstract void |
execute(Runnable runnable) |
abstract <T extends ConnectionConfiguration> |
getConnectionConfiguration()
Returns configurator.
|
Connector |
getConnector() |
<T extends XmppModule> |
getModule(Class<T> moduleClass)
Return module implementation by module class.
|
XmppModulesManager |
getModulesManager() |
PresenceStore |
getPresence() |
UserProperties |
getProperties() |
RosterStore |
getRoster() |
SessionObject |
getSessionObject() |
boolean |
isConnected() |
boolean |
isSecure() |
void |
keepalive()
Whitespace ping.
|
abstract void |
login()
Connects to server.
|
protected void |
modulesInit() |
protected abstract void |
onException(JaxmppException e) |
protected abstract void |
onResourceBinded(ResourceBinderModule.ResourceBindEvent be) |
protected void |
onStanzaReceived(Element stanza) |
protected abstract void |
onStreamError(Connector.ConnectorEvent be) |
protected abstract void |
onStreamResumed(StreamManagementModule.StreamResumedEvent be) |
protected abstract void |
onStreamTerminated(Connector.ConnectorEvent be) |
void |
removeAllListeners() |
void |
removeListener(EventType eventType,
Listener<? extends BaseEvent> connectorListener) |
void |
removeListener(Listener<?> listener) |
void |
send(Stanza stanza) |
void |
send(Stanza stanza,
AsyncCallback asyncCallback) |
void |
send(Stanza stanza,
Long timeout,
AsyncCallback asyncCallback) |
void |
sendMessage(JID toJID,
String subject,
String message) |
public static final String AUTOADD_STANZA_ID_KEY
public static final EventType Connected
public static final EventType Disconnected
protected Connector connector
protected final Logger log
protected final XmppModulesManager modulesManager
protected final Observable observable
protected Processor processor
protected final Listener<ResourceBinderModule.ResourceBindEvent> resourceBindListener
protected XmppSessionLogic sessionLogic
protected final AbstractSessionObject sessionObject
protected final Listener<Connector.ConnectorEvent> stanzaReceivedListener
protected final Listener<Connector.ConnectorEvent> streamErrorListener
protected Listener<StreamManagementModule.StreamResumedEvent> streamResumedListener
protected final Listener<Connector.ConnectorEvent> streamTerminateListener
protected final Listener<StreamManagementModule.UnacknowledgedEvent> unacknowledgedListener
protected final PacketWriter writer
public JaxmppCore(SessionObject sessionObject)
public void addListener(Listener<?> listener)
public Chat createChat(JID jid) throws JaxmppException
JaxmppExceptionpublic abstract void disconnect()
throws JaxmppException
JaxmppExceptionpublic abstract void execute(Runnable runnable)
public abstract <T extends ConnectionConfiguration> T getConnectionConfiguration()
public Connector getConnector()
public <T extends XmppModule> T getModule(Class<T> moduleClass)
moduleClass - module classpublic XmppModulesManager getModulesManager()
public PresenceStore getPresence()
public UserProperties getProperties()
public RosterStore getRoster()
public SessionObject getSessionObject()
public boolean isConnected()
public boolean isSecure()
public void keepalive()
throws JaxmppException
JaxmppExceptionpublic abstract void login()
throws JaxmppException
JaxmppExceptionprotected void modulesInit()
protected abstract void onException(JaxmppException e) throws JaxmppException
JaxmppExceptionprotected abstract void onResourceBinded(ResourceBinderModule.ResourceBindEvent be) throws JaxmppException
JaxmppExceptionprotected void onStanzaReceived(Element stanza)
protected abstract void onStreamError(Connector.ConnectorEvent be) throws JaxmppException
JaxmppExceptionprotected abstract void onStreamResumed(StreamManagementModule.StreamResumedEvent be) throws JaxmppException
JaxmppExceptionprotected abstract void onStreamTerminated(Connector.ConnectorEvent be) throws JaxmppException
JaxmppExceptionpublic void removeAllListeners()
public void removeListener(EventType eventType, Listener<? extends BaseEvent> connectorListener)
public void removeListener(Listener<?> listener)
public void send(Stanza stanza) throws XMLException, JaxmppException
XMLExceptionJaxmppExceptionpublic void send(Stanza stanza, AsyncCallback asyncCallback) throws XMLException, JaxmppException
XMLExceptionJaxmppExceptionpublic void send(Stanza stanza, Long timeout, AsyncCallback asyncCallback) throws JaxmppException
JaxmppExceptionpublic void sendMessage(JID toJID, String subject, String message) throws XMLException, JaxmppException
XMLExceptionJaxmppExceptionCopyright © 2006–2014 Tigase. All rights reserved.