public class PresenceModule
extends tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<tigase.jaxmpp.core.client.xmpp.stanzas.Presence>
implements tigase.jaxmpp.core.client.xmpp.modules.InitializingModule, tigase.jaxmpp.core.client.xmpp.modules.ContextAware, tigase.jaxmpp.core.client.XmppSessionLogic.XmppSessionEstablishedHandler
| Modifier and Type | Class and Description |
|---|---|
static interface |
PresenceModule.BeforePresenceSendHandler
Event fired before each presence sent by client.
|
static interface |
PresenceModule.ContactAvailableHandler
Event fired when contact (understood as bare JID) becomes available.
|
static interface |
PresenceModule.ContactChangedPresenceHandler
Event fired when contact changed his presence.
|
static interface |
PresenceModule.ContactUnavailableHandler
Event fired when contact (understood as bare JID) goes offline.
|
static interface |
PresenceModule.ContactUnsubscribedHandler
Event fired when contact is unsubscribed.
|
static interface |
PresenceModule.SubscribeRequestHandler
Event fired when subscription request is received.
|
| Modifier and Type | Field and Description |
|---|---|
static tigase.jaxmpp.core.client.criteria.Criteria |
CRIT |
static String |
INITIAL_PRESENCE_ENABLED_KEY |
static String |
PRESENCE_STORE_KEY |
| Constructor and Description |
|---|
PresenceModule() |
public static final tigase.jaxmpp.core.client.criteria.Criteria CRIT
public static final String PRESENCE_STORE_KEY
public static final String INITIAL_PRESENCE_ENABLED_KEY
public static PresenceStore getPresenceStore(tigase.jaxmpp.core.client.SessionObject sessionObject)
public static void setPresenceStore(tigase.jaxmpp.core.client.SessionObject sessionObject,
PresenceStore presenceStore)
public void addBeforePresenceSendHandler(PresenceModule.BeforePresenceSendHandler handler)
public void addContactAvailableHandler(PresenceModule.ContactAvailableHandler handler)
public void addContactChangedPresenceHandler(PresenceModule.ContactChangedPresenceHandler handler)
public void addContactUnavailableHandler(PresenceModule.ContactUnavailableHandler handler)
public void addContactUnsubscribedHandler(PresenceModule.ContactUnsubscribedHandler handler)
public void addSubscribeRequestHandler(PresenceModule.SubscribeRequestHandler handler)
public void afterRegister()
afterRegister in interface tigase.jaxmpp.core.client.xmpp.modules.InitializingModuleafterRegister in class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<tigase.jaxmpp.core.client.xmpp.stanzas.Presence>public void beforeRegister()
beforeRegister in interface tigase.jaxmpp.core.client.xmpp.modules.InitializingModulebeforeRegister in class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<tigase.jaxmpp.core.client.xmpp.stanzas.Presence>public void beforeUnregister()
beforeUnregister in interface tigase.jaxmpp.core.client.xmpp.modules.InitializingModulebeforeUnregister in class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<tigase.jaxmpp.core.client.xmpp.stanzas.Presence>protected void contactOffline(tigase.jaxmpp.core.client.xmpp.stanzas.Presence i,
tigase.jaxmpp.core.client.JID jid)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic tigase.jaxmpp.core.client.criteria.Criteria getCriteria()
getCriteria in interface tigase.jaxmpp.core.client.XmppModulepublic String[] getFeatures()
getFeatures in interface tigase.jaxmpp.core.client.XmppModulepublic PresenceStore getPresenceStore()
public void onXmppSessionEstablished(tigase.jaxmpp.core.client.SessionObject sessionObject)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
onXmppSessionEstablished in interface tigase.jaxmpp.core.client.XmppSessionLogic.XmppSessionEstablishedHandlertigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void process(tigase.jaxmpp.core.client.xmpp.stanzas.Presence presence)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
process in class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<tigase.jaxmpp.core.client.xmpp.stanzas.Presence>tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void removeBeforePresenceSendHandler(PresenceModule.BeforePresenceSendHandler handler)
public void removeContactAvailableHandler(PresenceModule.ContactAvailableHandler handler)
public void removeContactChangedPresenceHandler(PresenceModule.ContactChangedPresenceHandler handler)
public void removeContactUnavailableHandler(PresenceModule.ContactUnavailableHandler handler)
public void removeContactUnsubscribedHandler(PresenceModule.ContactUnsubscribedHandler handler)
public void removeSubscribeRequestHandler(PresenceModule.SubscribeRequestHandler handler)
public void sendInitialPresence()
throws tigase.jaxmpp.core.client.xml.XMLException,
tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.xml.XMLExceptiontigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void setContext(tigase.jaxmpp.core.client.Context context)
setContext in interface tigase.jaxmpp.core.client.xmpp.modules.ContextAwaresetContext in class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<tigase.jaxmpp.core.client.xmpp.stanzas.Presence>public void setInitialPresence(boolean enabled)
public void setPresence(tigase.jaxmpp.core.client.xmpp.stanzas.Presence.Show show,
String status,
Integer priority)
throws tigase.jaxmpp.core.client.xml.XMLException,
tigase.jaxmpp.core.client.exceptions.JaxmppException
show - presence substate.status - human readable description of status.priority - priority.tigase.jaxmpp.core.client.xml.XMLExceptiontigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void subscribe(tigase.jaxmpp.core.client.JID jid)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException,
tigase.jaxmpp.core.client.xml.XMLException
jid - JIDtigase.jaxmpp.core.client.exceptions.JaxmppExceptiontigase.jaxmpp.core.client.xml.XMLExceptionpublic void subscribed(tigase.jaxmpp.core.client.JID jid)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException,
tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptiontigase.jaxmpp.core.client.xml.XMLExceptionpublic void unsubscribe(tigase.jaxmpp.core.client.JID jid)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException,
tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptiontigase.jaxmpp.core.client.xml.XMLExceptionpublic void unsubscribed(tigase.jaxmpp.core.client.JID jid)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException,
tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptiontigase.jaxmpp.core.client.xml.XMLExceptionCopyright © 2006–2015 Tigase. All rights reserved.