|
SIP Communicator: 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.Objectnet.java.sip.communicator.service.protocol.AbstractOperationSetPersistentPresence<T>
public abstract class AbstractOperationSetPersistentPresence<T extends ProtocolProviderService>
Represents a default implementation of OperationSetPersistentPresence in order to make it easier for implementers to provide complete solutions while focusing on implementation-specific details.
| Field Summary | |
|---|---|
protected T |
parentProvider
The provider that created us. |
| Constructor Summary | |
|---|---|
protected |
AbstractOperationSetPersistentPresence(T parentProvider)
Initializes a new AbstractOperationSetPersistentPresence instance created by a specific ProtocolProviderService . |
| Method Summary | |
|---|---|
void |
addContactPresenceStatusListener(ContactPresenceStatusListener listener)
Implementation of the corresponding ProtocolProviderService method. |
void |
addProviderPresenceStatusListener(ProviderPresenceStatusListener listener)
Adds a listener that would receive events upon changes of the provider presence status. |
void |
addServerStoredGroupChangeListener(ServerStoredGroupListener listener)
Registers a listener that would receive events upon changes in server stored groups. |
void |
addSubscriptionListener(SubscriptionListener listener)
Registers a listener that would get notifications any time a new subscription was successfully added, has failed or was removed. |
protected void |
fireContactPresenceStatusChangeEvent(Contact source,
ContactGroup parentGroup,
PresenceStatus oldValue)
Notifies all registered listeners of the new event. |
void |
fireContactPresenceStatusChangeEvent(Contact source,
ContactGroup parentGroup,
PresenceStatus oldValue,
PresenceStatus newValue)
|
void |
fireContactPropertyChangeEvent(String eventID,
Contact source,
Object oldValue,
Object newValue)
Notify all subscription listeners of the corresponding contact property change event. |
protected void |
fireProviderStatusChangeEvent(PresenceStatus oldValue)
Notifies all registered listeners of the new event. |
protected void |
fireProviderStatusChangeEvent(PresenceStatus oldValue,
PresenceStatus newValue)
Notify all provider presence listeners of the corresponding event change |
protected void |
fireProviderStatusMessageChangeEvent(String oldStatusMessage,
String newStatusMessage)
Notify all provider presence listeners that a new status message has been set. |
protected void |
fireServerStoredGroupEvent(ContactGroup source,
int eventID)
Notifies all registered listeners of the new event. |
void |
fireSubscriptionEvent(Contact source,
ContactGroup parentGroup,
int eventID)
Notifies all registered listeners of the new event. |
void |
fireSubscriptionEvent(Contact source,
ContactGroup parentGroup,
int eventID,
int errorCode,
String errorReason)
|
void |
fireSubscriptionMovedEvent(Contact source,
ContactGroup oldParent,
ContactGroup newParent)
Notifies all registered listeners of the new event. |
void |
removeContactPresenceStatusListener(ContactPresenceStatusListener listener)
Removes the specified listener so that it won't receive any further updates on contact presence status changes |
void |
removeProviderPresenceStatusListener(ProviderPresenceStatusListener listener)
Unregisters the specified listener so that it does not receive further events upon changes in local presence status. |
void |
removeServerStoredGroupChangeListener(ServerStoredGroupListener listener)
Removes the specified group change listener so that it won't receive any further events. |
void |
removeSubscriptionListener(SubscriptionListener listener)
Removes the specified subscription listener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetPersistentPresence |
|---|
createServerStoredContactGroup, createUnresolvedContact, createUnresolvedContactGroup, getServerStoredContactListRoot, moveContactToGroup, removeServerStoredContactGroup, renameServerStoredContactGroup, subscribe, subscribe, unsubscribe |
| Methods inherited from interface net.java.sip.communicator.service.protocol.OperationSetPresence |
|---|
createUnresolvedContact, findContactByID, getCurrentStatusMessage, getPresenceStatus, getSupportedStatusSet, publishPresenceStatus, queryContactStatus, setAuthorizationHandler |
| Field Detail |
|---|
protected final T extends ProtocolProviderService parentProvider
| Constructor Detail |
|---|
protected AbstractOperationSetPersistentPresence(T parentProvider)
parentProvider - the ProtocolProviderService which created
the new instance| Method Detail |
|---|
public void addContactPresenceStatusListener(ContactPresenceStatusListener listener)
addContactPresenceStatusListener in interface OperationSetPresencelistener - a presence status listener.public void addProviderPresenceStatusListener(ProviderPresenceStatusListener listener)
addProviderPresenceStatusListener in interface OperationSetPresencelistener - the listener to register for changes in our PresenceStatus.public void addServerStoredGroupChangeListener(ServerStoredGroupListener listener)
addServerStoredGroupChangeListener in interface OperationSetPersistentPresencelistener - a ServerStoredGroupChangeListener impl that would receive
events upon group changes.public void addSubscriptionListener(SubscriptionListener listener)
OperationSetPresence
addSubscriptionListener in interface OperationSetPresencelistener - the SubscriptionListener to register
protected void fireContactPresenceStatusChangeEvent(Contact source,
ContactGroup parentGroup,
PresenceStatus oldValue)
source - the contact that has caused the event.parentGroup - the group that contains the source contact.oldValue - the status that the source contact detained before
changing it.
public void fireContactPresenceStatusChangeEvent(Contact source,
ContactGroup parentGroup,
PresenceStatus oldValue,
PresenceStatus newValue)
public void fireContactPropertyChangeEvent(String eventID,
Contact source,
Object oldValue,
Object newValue)
eventID - the String ID of the event to dispatchsource - the ContactJabberImpl instance that this event is
pertaining to.oldValue - the value that the changed property had before the change
occurred.newValue - the value that the changed property currently has (after
the change has occurred).protected void fireProviderStatusChangeEvent(PresenceStatus oldValue)
oldValue - the presence status we were in before the change.
protected void fireProviderStatusChangeEvent(PresenceStatus oldValue,
PresenceStatus newValue)
oldValue - the status our stack had so farnewValue - the status we have from now on
protected void fireProviderStatusMessageChangeEvent(String oldStatusMessage,
String newStatusMessage)
oldStatusMessage - the status message our stack had so farnewStatusMessage - the status message we have from now on
protected void fireServerStoredGroupEvent(ContactGroup source,
int eventID)
source - the contact that has caused the event.eventID - an identifier of the event to dispatch.
public void fireSubscriptionEvent(Contact source,
ContactGroup parentGroup,
int eventID)
source - the contact that has caused the event.parentGroup - the group that contains the source contact.eventID - an identifier of the event to dispatch.
public void fireSubscriptionEvent(Contact source,
ContactGroup parentGroup,
int eventID,
int errorCode,
String errorReason)
public void fireSubscriptionMovedEvent(Contact source,
ContactGroup oldParent,
ContactGroup newParent)
source - the contact that has been moved..oldParent - the group where the contact was located before being
moved.newParent - the group where the contact has been moved.public void removeContactPresenceStatusListener(ContactPresenceStatusListener listener)
removeContactPresenceStatusListener in interface OperationSetPresencelistener - the listener to remove.public void removeProviderPresenceStatusListener(ProviderPresenceStatusListener listener)
removeProviderPresenceStatusListener in interface OperationSetPresencelistener - ProviderPresenceStatusListenerpublic void removeServerStoredGroupChangeListener(ServerStoredGroupListener listener)
removeServerStoredGroupChangeListener in interface OperationSetPersistentPresencelistener - the ServerStoredGroupChangeListener to removepublic void removeSubscriptionListener(SubscriptionListener listener)
removeSubscriptionListener in interface OperationSetPresencelistener - the listener to remove.
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||