|
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.Objectnet.java.sip.communicator.service.protocol.AbstractOperationSetPersistentPresence<ProtocolProviderServiceDictImpl>
net.java.sip.communicator.impl.protocol.dict.OperationSetPersistentPresenceDictImpl
public class OperationSetPersistentPresenceDictImpl
A Dict implementation of a persistent presence operation set. In order to simulate server persistence, this operation set would simply accept all unresolved contacts and resolve them immediately. A real world protocol implementation would save it on a server using methods provided by the protocol stack.
| Field Summary |
|---|
| Fields inherited from class net.java.sip.communicator.service.protocol.AbstractOperationSetPersistentPresence |
|---|
parentProvider |
| Constructor Summary | |
|---|---|
OperationSetPersistentPresenceDictImpl(ProtocolProviderServiceDictImpl provider)
Creates an instance of this operation set keeping a reference to the specified parent provider. |
|
| Method Summary | |
|---|---|
void |
addDictGroup(ContactGroupDictImpl contactGroup)
A Dict Provider method to use for fast filling of a contact list. |
void |
addDictGroupAndFireEvent(ContactGroupDictImpl parent,
ContactGroupDictImpl contactGroup)
A Dict Provider method to use for fast filling of a contact list. |
void |
createServerStoredContactGroup(ContactGroup parent,
String groupName)
Creates a group with the specified name and parent in the server stored contact list. |
Contact |
createUnresolvedContact(String address,
String persistentData)
Creates and returns a unresolved contact from the specified address and persistentData. |
Contact |
createUnresolvedContact(String address,
String persistentData,
ContactGroup parent)
Creates and returns a unresolved contact from the specified address and persistentData. |
ContactGroup |
createUnresolvedContactGroup(String groupUID,
String persistentData,
ContactGroup parentGroup)
Creates and returns a unresolved contact group from the specified address and persistentData. |
ContactDictImpl |
createVolatileContact(String contactAddress)
Creates a non persistent contact for the specified address. |
Contact |
findContactByID(String contactID)
Returns a reference to the contact with the specified ID in case we have a subscription for it and null otherwise/ |
ContactGroupDictImpl |
findContactParent(ContactDictImpl dictContact)
Returns the group that is parent of the specified dictContact or null if no parent was found. |
List<Contact> |
findContactsPointingToUs()
Looks for dict protocol providers that have added us to their contact list and returns list of all contacts representing us in these providers. |
ContactGroupDictImpl |
findGroupParent(ContactGroupDictImpl dictGroup)
Returns the group that is parent of the specified dictGroup or null if no parent was found. |
ProtocolProviderServiceDictImpl |
findProviderForDictUserID(String dictUserID)
Looks for a dict protocol provider registered for a user id matching dictUserID. |
String |
getCurrentStatusMessage()
Returns the status message that was last set through setCurrentStatusMessage. |
Contact |
getLocalContact()
Returns the protocol specific contact instance representing the local user. |
PresenceStatus |
getPresenceStatus()
Returns a PresenceStatus instance representing the state this provider is currently in. |
ContactGroup |
getServerStoredContactListRoot()
Returns the root group of the server stored contact list. |
Iterator<PresenceStatus> |
getSupportedStatusSet()
Returns the set of PresenceStatus objects that a user of this service may request the provider to enter. |
void |
moveContactToGroup(Contact contactToMove,
ContactGroup newParent)
Removes the specified contact from its current parent and places it under newParent. |
void |
publishPresenceStatus(PresenceStatus status,
String statusMessage)
Requests the provider to enter into a status corresponding to the specified paramters. |
PresenceStatus |
queryContactStatus(String contactIdentifier)
Get the PresenceStatus for a particular contact. |
void |
removeServerStoredContactGroup(ContactGroup group)
Removes the specified group from the server stored contact list. |
void |
renameServerStoredContactGroup(ContactGroup group,
String newName)
Renames the specified group from the server stored contact list. |
void |
setAuthorizationHandler(AuthorizationHandler handler)
Handler for incoming authorization requests. |
void |
setStatusMessage(String statusMessage)
Sets the specified status message. |
void |
subscribe(ContactGroup parent,
String contactIdentifier)
Persistently adds a subscription for the presence status of the contact corresponding to the specified contactIdentifier and indicates that it should be added to the specified group of the server stored contact list. |
void |
subscribe(String contactIdentifier)
Adds a subscription for the presence status of the contact corresponding to the specified contactIdentifier. |
void |
unsubscribe(Contact contact)
Removes a subscription for the presence status of the specified contact. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationSetPersistentPresenceDictImpl(ProtocolProviderServiceDictImpl provider)
provider - the ProtocolProviderServiceDictImpl instance that
created us.| Method Detail |
|---|
public void createServerStoredContactGroup(ContactGroup parent,
String groupName)
parent - the group where the new group should be createdgroupName - the name of the new group to create.public void addDictGroup(ContactGroupDictImpl contactGroup)
contactGroup - the group to add
public void addDictGroupAndFireEvent(ContactGroupDictImpl parent,
ContactGroupDictImpl contactGroup)
parent - the group where contactGroup should be added.contactGroup - the group to addpublic Contact findContactByID(String contactID)
contactID - a String identifier of the contact which we're
seeking a reference of.
public void setStatusMessage(String statusMessage)
statusMessage - a String containing the new status message.public String getCurrentStatusMessage()
public Contact getLocalContact()
public PresenceStatus getPresenceStatus()
public ContactGroup getServerStoredContactListRoot()
public Iterator<PresenceStatus> getSupportedStatusSet()
public void moveContactToGroup(Contact contactToMove,
ContactGroup newParent)
contactToMove - the Contact to movenewParent - the ContactGroup where Contact
would be placed.
public void publishPresenceStatus(PresenceStatus status,
String statusMessage)
throws IllegalArgumentException,
IllegalStateException,
OperationFailedException
status - the PresenceStatus as returned by
getRequestableStatusSetstatusMessage - the message that should be set as the reason to
enter that status
IllegalArgumentException - if the status requested is not a
valid PresenceStatus supported by this provider.
IllegalStateException - if the provider is not currently
registered.
OperationFailedException - with code NETWORK_FAILURE if
publishing the status fails due to a network error.
public PresenceStatus queryContactStatus(String contactIdentifier)
throws IllegalArgumentException,
IllegalStateException,
OperationFailedException
contactIdentifier - the identifier of the contact whose status
we're interested in.
IllegalArgumentException - if contact is not a contact
known to the underlying protocol provider
IllegalStateException - if the underlying protocol provider is
not registered/signed on a public service.
OperationFailedException - with code NETWORK_FAILURE if
retrieving the status fails due to errors experienced during
network communicationpublic ContactGroupDictImpl findGroupParent(ContactGroupDictImpl dictGroup)
dictGroup - the group whose parent we're looking for.
public ContactGroupDictImpl findContactParent(ContactDictImpl dictContact)
dictContact - the contact whose parent we're looking for.
public void removeServerStoredContactGroup(ContactGroup group)
throws IllegalArgumentException
group - the group to remove.
IllegalArgumentException - if group was not found in this
protocol's contact list.
public void renameServerStoredContactGroup(ContactGroup group,
String newName)
group - the group to rename.newName - the new name of the group.public void setAuthorizationHandler(AuthorizationHandler handler)
handler - an instance of an AuthorizationHandler for
authorization requests coming from other users requesting
permission add us to their contact list.
public void subscribe(ContactGroup parent,
String contactIdentifier)
throws IllegalArgumentException,
IllegalStateException,
OperationFailedException
parent - the parent group of the server stored contact list
where the contact should be added. contactIdentifier - the contact whose status updates we are
subscribing for.
IllegalArgumentException - if contact or
parent are not a contact known to the underlying protocol
provider.
IllegalStateException - if the underlying protocol provider is
not registered/signed on a public service.
OperationFailedException - with code NETWORK_FAILURE if
subscribing fails due to errors experienced during network
communication
public void subscribe(String contactIdentifier)
throws IllegalArgumentException,
IllegalStateException,
OperationFailedException
contactIdentifier - the identifier of the contact whose status
updates we are subscribing for.
IllegalArgumentException - if contact is not a contact
known to the underlying protocol provider
IllegalStateException - if the underlying protocol provider is
not registered/signed on a public service.
OperationFailedException - with code NETWORK_FAILURE if
subscribing fails due to errors experienced during network
communication
public void unsubscribe(Contact contact)
throws IllegalArgumentException,
IllegalStateException,
OperationFailedException
contact - the contact whose status updates we are unsubscribing
from.
IllegalArgumentException - if contact is not a contact
known to the underlying protocol provider
IllegalStateException - if the underlying protocol provider is
not registered/signed on a public service.
OperationFailedException - with code NETWORK_FAILURE if
unsubscribing fails due to errors experienced during network
communication
public Contact createUnresolvedContact(String address,
String persistentData)
address - an identifier of the contact that we'll be creating.persistentData - a String returned Contact's getPersistentData()
method during a previous run and that has been persistently stored
locally.
public Contact createUnresolvedContact(String address,
String persistentData,
ContactGroup parent)
address - an identifier of the contact that we'll be creating.persistentData - a String returned Contact's getPersistentData()
method during a previous run and that has been persistently stored
locally.parent - the group where the unresolved contact is
supposed to belong to.
public ProtocolProviderServiceDictImpl findProviderForDictUserID(String dictUserID)
dictUserID - the ID of the Dict user whose corresponding
protocol provider we'd like to find.
public List<Contact> findContactsPointingToUs()
public ContactGroup createUnresolvedContactGroup(String groupUID,
String persistentData,
ContactGroup parentGroup)
groupUID - an identifier, returned by ContactGroup's getGroupUID,
that the protocol provider may use in order to create the group.persistentData - a String returned ContactGroups's
getPersistentData() method during a previous run and that has been
persistently stored locally.parentGroup - the group under which the new group is to be created
or null if this is group directly underneath the root.
public ContactDictImpl createVolatileContact(String contactAddress)
contactAddress - the address of the volatile contact we'd like to
create.
|
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 | |||||||||