public interface SubscriptionState
Represents a presence subscription state.
There are four primary subscription states (these states are described from the perspective of the user, not the contact):
The foregoing states are supplemented by various sub-states related to pending inbound and outbound subscriptions.
Modifier and Type | Interface and Description |
---|---|
static class |
SubscriptionState.Subscription |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(SubscriptionState state1,
SubscriptionState state2)
Compares two subscription states.
|
SubscriptionState.Subscription |
getSubscription()
Gets the primary subscription state.
|
boolean |
isPendingIn()
If the presence subscription is pending in from a user’s perspective.
|
boolean |
isPendingOut()
If the presence subscription is pending out from a user’s perspective.
|
static boolean equals(SubscriptionState state1, SubscriptionState state2)
Compares two subscription states.
state1
- The first state.state2
- The second state.SubscriptionState.Subscription getSubscription()
Gets the primary subscription state. It may be one of SubscriptionState.Subscription.NONE
, SubscriptionState.Subscription.TO
, SubscriptionState.Subscription.FROM
or SubscriptionState.Subscription.BOTH
.
boolean isPendingOut()
If the presence subscription is pending out from a user’s perspective. The user has sent contact a subscription request but contact has not replied yet.
boolean isPendingIn()
If the presence subscription is pending in from a user’s perspective. The contact has sent user a subscription request but user has not replied yet.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.