|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
net.java.sip.communicator.service.protocol.event.SubscriptionEvent
public class SubscriptionEvent
SubscriptionEvents indicate creation removal or failure of a given Subscription. Note that in SIP Communicator the terms Subscription and Contact are quite similar: A contact becomes available and it is possible to query its presence status and user information, once a subscription for this contact has been created.
| Field Summary | |
|---|---|
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). |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
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,
String errorReason)
Creates a new Subscription event according to the specified parameters. |
|
| Method Summary | |
|---|---|
int |
getErrorCode()
If event is SUBSCRIPTION_FAILED, returns the error code of the failed event |
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. |
String |
toString()
Returns a String representation of this ContactPresenceStatusChangeEvent |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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,
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 string| Method Detail |
|---|
public ProtocolProviderService getSourceProvider()
public Contact getSourceContact()
public ContactGroup getParentGroup()
public String toString()
toString in class EventObjectpublic int getEventID()
public int getErrorCode()
public String getErrorReason()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||