|
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.impl.protocol.sip.ContactSipImpl
public class ContactSipImpl
A simple, straightforward implementation of a SIP Contact.
| Constructor Summary | |
|---|---|
ContactSipImpl(javax.sip.address.Address contactAddress,
ProtocolProviderServiceSipImpl parentProvider)
Creates an instance of a meta contact with the specified string used as a name and identifier. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one which in terms of contacts translates to having equal ids. |
String |
getAddress()
Returns a String that can be used for identifying the contact. |
(package private) List<Element> |
getAny()
Gets the entry custom elements. |
String |
getDisplayName()
Returns a String that could be used by any user interacting modules for referring to this contact. |
(package private) EntryType |
getEntry()
Gets the entry. |
byte[] |
getImage()
Gets a byte array containing an image (most often a photo or an avatar) that the contact uses as a representation. |
(package private) URI |
getImageUri()
Gets the image uri. |
ContactGroup |
getParentContactGroup()
Returns the group that contains this contact. |
OperationSetPresenceSipImpl |
getParentPresenceOperationSet()
Returns the presence operation set that this contact belongs to. |
String |
getPersistentData()
Gets the persistent data - for now only the XCAP resolved is needed for restoring the contact data. |
PresenceStatus |
getPresenceStatus()
Returns the status of the contact. |
ProtocolProviderService |
getProtocolProvider()
Returns a reference to the protocol provider that created the contact. |
javax.sip.address.Address |
getSipAddress()
Returns the jain-sip Address instance that this contact is wrapping. |
String |
getStatusMessage()
Return the current status message of this contact. |
String |
getSubscriptionState()
Current subscription state of the contact. |
String |
getUri()
Gets the entry's uri. |
boolean |
isLocal()
Determines whether or not this contact represents our own identity. |
boolean |
isPersistent()
Determines whether or not this contact is being stored by the server. |
boolean |
isResolvable()
Determines whether or not this contact can be resolved against the server. |
boolean |
isResolved()
Determines whether or not this contact has been resolved against the server. |
boolean |
isXCapResolved()
Gets the value of the xCapResolved property. |
(package private) void |
setAny(List<Element> any)
Sets the entry custom elements. |
void |
setDisplayName(DisplayNameType displayName)
Sets a String that could be used by any user interacting modules for referring to this contact. |
void |
setDisplayName(String displayName)
Sets a String that could be used by any user interacting modules for referring to this contact. |
(package private) void |
setImage(byte[] image)
Sets a byte array containing an image (most often a photo or an avatar) that the contact uses as a representation. |
(package private) void |
setImageUri(URI imageUri)
Sets the image uri. |
(package private) void |
setOtherAttributes(Map<QName,String> otherAttributes)
Sets the entry custom attributes. |
(package private) void |
setParentGroup(ContactGroupSipImpl newParentGroup)
This method is only called when the contact is added to a new ContactGroupSipImpl by the ContactGroupSipImpl itself. |
void |
setPersistent(boolean isPersistent)
Specifies whether or not this contact is being stored by the server. |
void |
setPersistentData(String persistentData)
Sets the persistent data. |
void |
setPresenceStatus(PresenceStatus sipPresenceStatus)
Sets sipPresenceStatus as the PresenceStatus that this contact is currently in. |
void |
setResolvable(boolean resolvable)
Makes the contact resolvable or unresolvable. |
void |
setResolved(boolean resolved)
Makes the contact resolved or unresolved. |
void |
setSubscriptionState(String subscriptionState)
Change current subscription state. |
void |
setXCapResolved(boolean xCapResolved)
Sets the value of the xCapResolved property. |
String |
toString()
Returns a string representation of this contact, containing most of its representative details. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContactSipImpl(javax.sip.address.Address contactAddress,
ProtocolProviderServiceSipImpl parentProvider)
contactAddress - the identifier of this contact
(also used as a name).parentProvider - the provider that created us.| Method Detail |
|---|
EntryType getEntry()
public String getUri()
void setParentGroup(ContactGroupSipImpl newParentGroup)
newParentGroup - the ContactGroupSipImpl that is now
parent of this ContactSipImplpublic String getAddress()
getAddress in interface Contactpublic javax.sip.address.Address getSipAddress()
public String getDisplayName()
getDisplayName in interface Contactpublic void setDisplayName(String displayName)
displayName - a human readable name to use for this contact.public void setDisplayName(DisplayNameType displayName)
displayName - a human readable name to use for this contact.void setOtherAttributes(Map<QName,String> otherAttributes)
otherAttributes - the custom attributes.void setAny(List<Element> any)
any - the custom elements.List<Element> getAny()
URI getImageUri()
void setImageUri(URI imageUri)
imageUri - the image uri.public byte[] getImage()
getImage in interface Contactvoid setImage(byte[] image)
image - an image representing the contact.public PresenceStatus getPresenceStatus()
getPresenceStatus in interface Contactpublic void setPresenceStatus(PresenceStatus sipPresenceStatus)
sipPresenceStatus - the SipPresenceStatus
currently valid for this contact.public ProtocolProviderService getProtocolProvider()
getProtocolProvider in interface Contactpublic boolean isLocal()
public ContactGroup getParentContactGroup()
getParentContactGroup in interface Contactpublic String toString()
toString in class Objectpublic boolean isPersistent()
isPersistent in interface Contactpublic void setPersistent(boolean isPersistent)
isPersistent - true if the contact is persistent and false
otherwise.public boolean isXCapResolved()
public void setXCapResolved(boolean xCapResolved)
xCapResolved - the xCapResolved to set.public String getPersistentData()
getPersistentData in interface Contactpublic void setPersistentData(String persistentData)
persistentData - the persistent data to set.public boolean isResolved()
isResolved in interface Contactpublic void setResolved(boolean resolved)
resolved - true to make the contact resolved; false to
make it unresolvedpublic boolean isResolvable()
public void setResolvable(boolean resolvable)
resolvable - true to make the contact resolvable; false to
make it unresolvablepublic boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
true if this contact has the same id as that of the
obj argument.public OperationSetPresenceSipImpl getParentPresenceOperationSet()
public String getStatusMessage()
getStatusMessage in interface Contactpublic String getSubscriptionState()
public void setSubscriptionState(String subscriptionState)
subscriptionState - the new state.
|
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 | |||||||||