public final class PresenceEvent
extends java.util.EventObject
A presence event is fired whenever a presence stanza is received or sent.
This class is immutable.
Constructor and Description |
---|
PresenceEvent(java.lang.Object source,
Presence presence,
boolean inbound)
Constructs a presence event.
|
Modifier and Type | Method and Description |
---|---|
void |
consume()
Marks this event as consumed.
|
Presence |
getPresence()
Gets the presence.
|
boolean |
isConsumed()
Indicates, whether this event has been consumed.
|
boolean |
isInbound()
Indicates, whether the stanza has been received (inbound) or is about to being sent (outbound).
|
java.lang.String |
toString() |
public PresenceEvent(java.lang.Object source, Presence presence, boolean inbound)
Constructs a presence event.
source
- The object on which the event initially occurred.presence
- The presence stanza.inbound
- True, if the stanza is inbound.java.lang.IllegalArgumentException
- if source is null.public final Presence getPresence()
Gets the presence.
public final boolean isInbound()
public final void consume()
isConsumed()
public final boolean isConsumed()
consume()
public final java.lang.String toString()
toString
in class java.util.EventObject
Copyright © 2014–2019 XMPP.rocks. All rights reserved.