public class SubscriptionEvent
extends java.util.EventObject
Modifier and Type | Field and Description |
---|---|
static int |
ERROR_UNSPECIFIED
Error code unknown
|
static int |
SUBSCRIPTION_CREATED
Indicates that the SubscriptionEvent instance was triggered by the
creation of a new subscription
|
static int |
SUBSCRIPTION_FAILED
Indicates that the SubscriptionEvent instance was triggered by the fact
that no confirmation of the successful completion of a new subscription
has been received.
|
static int |
SUBSCRIPTION_REMOVED
Indicates that the SubscriptionEvent instance was triggered by the
removal of an existing subscription
|
static int |
SUBSCRIPTION_RESOLVED
Indicates that the SubscriptionEvent instance was triggered by the fact
that the presence of a particular contact in the contact list has been
confirmed by the server (resolved).
|
Constructor and Description |
---|
SubscriptionEvent(Contact source,
ProtocolProviderService provider,
ContactGroup parentGroup,
int eventID)
Creates a new Subscription event according to the specified parameters.
|
SubscriptionEvent(Contact source,
ProtocolProviderService provider,
ContactGroup parentGroup,
int eventID,
int errorCode,
java.lang.String errorReason)
Creates a new Subscription event according to the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
If event is SUBSCRIPTION_FAILED, returns the error code
of the failed event
|
java.lang.String |
getErrorReason()
If event is SUBSCRIPTION_FAILED, returns the reason of the error
for the failed event
|
int |
getEventID()
Returns an event id specifying whether the type of this event (e.g.
|
ContactGroup |
getParentGroup()
Returns (if applicable) the group containing the contact that cause this
event.
|
Contact |
getSourceContact()
Returns the provider that the source contact belongs to.
|
ProtocolProviderService |
getSourceProvider()
Returns the provider that the source contact belongs to.
|
java.lang.String |
toString()
Returns a String representation of this ContactPresenceStatusChangeEvent
|
public static final int SUBSCRIPTION_CREATED
public static final int SUBSCRIPTION_REMOVED
public static final int SUBSCRIPTION_FAILED
public static final int SUBSCRIPTION_RESOLVED
public static final int ERROR_UNSPECIFIED
public SubscriptionEvent(Contact source, ProtocolProviderService provider, ContactGroup parentGroup, int eventID)
source
- the Contact instance that this subscription pertains to.provider
- the ProtocolProviderService instance where this event
occurredparentGroup
- the ContactGroup underwhich the corresponding Contact
is locatedeventID
- one of the SUBSCRIPTION_XXX static fields indicating the
nature of the event.public SubscriptionEvent(Contact source, ProtocolProviderService provider, ContactGroup parentGroup, int eventID, int errorCode, java.lang.String errorReason)
source
- the Contact instance that this subscription pertains to.provider
- the ProtocolProviderService instance where this event
occurredparentGroup
- the ContactGroup underwhich the corresponding Contact
is locatedeventID
- one of the SUBSCRIPTION_XXX static fields indicating the
nature of the event.errorCode
- the error codeerrorReason
- the error reason stringpublic ProtocolProviderService getSourceProvider()
public Contact getSourceContact()
public ContactGroup getParentGroup()
public java.lang.String toString()
toString
in class java.util.EventObject
public int getEventID()
public int getErrorCode()
public java.lang.String getErrorReason()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.