public class OperationSetContactTypeInfoImpl extends java.lang.Object implements OperationSetContactTypeInfo
Constructor and Description |
---|
OperationSetContactTypeInfoImpl(OperationSetPresenceSipImpl parentOperationSet)
Creates the operation set.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContactType(Contact contact)
Access the contact type.
|
void |
setContactType(Contact contact,
java.lang.String contactType)
Sets the contact type of the contact.
|
void |
subscribe(ContactGroup parent,
java.lang.String contactIdentifier,
java.lang.String contactType)
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(java.lang.String contactIdentifier,
java.lang.String contactType)
Persistently adds a subscription for the presence status of the contact
corresponding to the specified contactIdentifier to the top level group.
|
OperationSetContactTypeInfoImpl(OperationSetPresenceSipImpl parentOperationSet)
parentOperationSet
- public java.lang.String getContactType(Contact contact)
getContactType
in interface OperationSetContactTypeInfo
contact
- the contact to be queried for type.public void setContactType(Contact contact, java.lang.String contactType)
setContactType
in interface OperationSetContactTypeInfo
contact
- the contact to be changed.contactType
- the type set to the contact.public void subscribe(java.lang.String contactIdentifier, java.lang.String contactType) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
Apart from an exception in the case of an immediate failure, the method won't return any indication of success or failure. That would happen later on through a SubscriptionEvent generated by one of the methods of the SubscriptionListener.
subscribe
in interface OperationSetContactTypeInfo
contactIdentifier
- the contact whose status updates we are
subscribing for.
contactType
- the type of the newly created contact.OperationFailedException
- with code NETWORK_FAILURE if subscribing
fails due to errors experienced during network communicationjava.lang.IllegalArgumentException
- if contact is not a contact
known to the underlying protocol providerjava.lang.IllegalStateException
- if the underlying protocol provider is not
registered/signed on a public service.public void subscribe(ContactGroup parent, java.lang.String contactIdentifier, java.lang.String contactType) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
subscribe
in interface OperationSetContactTypeInfo
contactIdentifier
- the contact whose status updates we are
subscribing for.parent
- the parent group of the server stored contact list where
the contact should be added.
contactType
- the type of the newly created contact.OperationFailedException
- with code NETWORK_FAILURE if subscribing
fails due to errors experienced during network communicationjava.lang.IllegalArgumentException
- if contact or parent
are not a contact known to the underlying protocol provider.java.lang.IllegalStateException
- if the underlying protocol provider is not
registered/signed on a public service.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.