public class PresenceModule extends AbstractStanzaModule<Presence>
| Modifier and Type | Class and Description |
|---|---|
static class |
PresenceModule.PresenceEvent
Presence related event.
|
| Modifier and Type | Field and Description |
|---|---|
static EventType |
BeforeInitialPresence
Event fired before initial presence is sent.
|
static EventType |
BeforePresenceSend
Event fired before each presence sent by client.
|
static EventType |
ContactAvailable
Event fired when contact (understood as bare JID) becomes available.
|
static EventType |
ContactChangedPresence
Event fired when contact changed his presence.
|
static EventType |
ContactUnavailable
Event fired when contact (understood as bare JID) goes offline.
|
static EventType |
ContactUnsubscribed
Event fired when contact is unsubscribed.
|
static Criteria |
CRIT |
static EventType |
SubscribeRequest
Event fired when subscription request is received.
|
log, observable, sessionObject, writer| Constructor and Description |
|---|
PresenceModule(Observable parentObservable,
SessionObject sessionObject,
PacketWriter packetWriter) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
contactOffline(JID jid) |
protected boolean |
fireBeforePresenceSend(Presence presence) |
Criteria |
getCriteria()
Criteria
|
String[] |
getFeatures()
Returns features what are implemented by Module.
|
PresenceStore |
getPresence() |
void |
process(Presence presence)
Method for processing incoming stanza.
|
void |
sendInitialPresence() |
void |
setPresence(Presence.Show show,
String status,
Integer priority)
Sends own presence.
|
void |
subscribe(JID jid)
Subscribe for presence.
|
void |
subscribed(JID jid) |
void |
unsubscribe(JID jid) |
void |
unsubscribed(JID jid) |
addListener, addListener, getFirstChild, process, removeAllListeners, removeListener, removeListenerpublic static final EventType BeforeInitialPresence
public static final EventType BeforePresenceSend
public static final EventType ContactAvailable
public static final EventType ContactChangedPresence
public static final EventType ContactUnavailable
public static final EventType ContactUnsubscribed
public static final Criteria CRIT
public static final EventType SubscribeRequest
public PresenceModule(Observable parentObservable, SessionObject sessionObject, PacketWriter packetWriter)
protected void contactOffline(JID jid) throws JaxmppException
JaxmppExceptionprotected boolean fireBeforePresenceSend(Presence presence) throws JaxmppException
presence - true if event is cancelledJaxmppExceptionpublic Criteria getCriteria()
XmppModulepublic String[] getFeatures()
XmppModuleReturns features what are implemented by Module.
public PresenceStore getPresence()
public void process(Presence presence) throws JaxmppException
AbstractStanzaModuleprocess in class AbstractStanzaModule<Presence>JaxmppExceptionpublic void sendInitialPresence()
throws XMLException,
JaxmppException
XMLExceptionJaxmppExceptionpublic void setPresence(Presence.Show show, String status, Integer priority) throws XMLException, JaxmppException
show - presence substate.status - human readable description of status.priority - priority.XMLExceptionJaxmppExceptionpublic void subscribe(JID jid) throws JaxmppException, XMLException
jid - JIDJaxmppExceptionXMLExceptionpublic void subscribed(JID jid) throws JaxmppException, XMLException
JaxmppExceptionXMLExceptionpublic void unsubscribe(JID jid) throws JaxmppException, XMLException
JaxmppExceptionXMLExceptionpublic void unsubscribed(JID jid) throws JaxmppException, XMLException
JaxmppExceptionXMLExceptionCopyright © 2006–2014 Tigase. All rights reserved.