|
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.gibberish.ContactGibberishImpl
public class ContactGibberishImpl
A simple, straightforward implementation of a gibberish Contact. Since the Gibberish protocol is not a real one, we simply store all contact details in class fields. You should know that when implementing a real protocol, the contact implementation would rather encapsulate contact objects from the protocol stack and group property values should be returned after consulting the encapsulated object.
| Constructor Summary | |
|---|---|
ContactGibberishImpl(String id,
ProtocolProviderServiceGibberishImpl 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. |
String |
getDisplayName()
Returns a String that could be used by any user interacting modules for referring to this contact. |
byte[] |
getImage()
Returns a byte array containing an image (most often a photo or an avatar) that the contact uses as a representation. |
ContactGroup |
getParentContactGroup()
Returns the group that contains this contact. |
OperationSetPersistentPresenceGibberishImpl |
getParentPresenceOperationSet()
Returns the persistent presence operation set that this contact belongs to. |
String |
getPersistentData()
Returns null as no persistent data is required and the contact address is sufficient for restoring the contact. |
PresenceStatus |
getPresenceStatus()
Returns the status of the contact. |
ProtocolProviderService |
getProtocolProvider()
Returns a reference to the protocol provider that created the contact. |
String |
getStatusMessage()
Return the current status message of this contact. |
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 |
isResolved()
Determines whether or not this contact has been resolved against the server. |
(package private) void |
setParentGroup(ContactGroupGibberishImpl newParentGroup)
This method is only called when the contact is added to a new ContactGroupGibberishImpl by the ContactGroupGibberishImpl itself. |
void |
setPersistent(boolean isPersistent)
Specifies whether or not this contact is being stored by the server. |
void |
setPresenceStatus(PresenceStatus gibberishPresenceStatus)
Sets gibberishPresenceStatus as the PresenceStatus that this contact is currently in. |
void |
setResolved(boolean resolved)
Makes the contact resolved or unresolved. |
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 ContactGibberishImpl(String id,
ProtocolProviderServiceGibberishImpl parentProvider)
id - the identifier of this contact (also used as a name).parentProvider - the provider that created us.| Method Detail |
|---|
void setParentGroup(ContactGroupGibberishImpl newParentGroup)
newParentGroup - the ContactGroupGibberishImpl that is now
parent of this ContactGibberishImplpublic String getAddress()
getAddress in interface Contactpublic String getDisplayName()
getDisplayName in interface Contactpublic byte[] getImage()
getImage in interface Contactpublic PresenceStatus getPresenceStatus()
getPresenceStatus in interface Contactpublic void setPresenceStatus(PresenceStatus gibberishPresenceStatus)
gibberishPresenceStatus - the GibberishPresenceStatus
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 String getPersistentData()
getPersistentData in interface Contactpublic boolean isResolved()
isResolved in interface Contactpublic String getStatusMessage()
getStatusMessage in interface Contactpublic void setResolved(boolean resolved)
resolved - true to make the contact resolved; false to
make it unresolvedpublic 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 OperationSetPersistentPresenceGibberishImpl getParentPresenceOperationSet()
|
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 | |||||||||