|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object core.Contact
A representation of another user's attributes, including presence, network, and subscription information.
Constructor Summary | |
Contact(java.lang.String nickname,
java.lang.String address)
|
|
Contact(java.lang.String username,
java.lang.String nickname,
java.lang.String address,
java.lang.String additionalInfo)
|
|
Contact(java.lang.String userName,
java.lang.String nickname,
java.lang.String additionalInfo,
java.lang.String address,
java.lang.String subscription,
boolean pendingIn,
boolean pendingOut)
|
Method Summary | |
java.lang.String |
getAdditionalInfo()
|
java.lang.String |
getAddress()
|
java.lang.String |
getNickname()
|
PresenceType |
getPresence()
|
java.lang.String |
getShow()
|
java.lang.String |
getStatus()
|
java.lang.String |
getSubscription()
Returns the subscription status of this user. |
long |
getTimestamp()
|
java.lang.String |
getUserName()
|
boolean |
isPendingIn()
Determines if there are incoming subscription requests pending for this Contact. |
boolean |
isPendingOut()
Determines if there are outgoing subscription requests pending for this Contact. |
boolean |
probe()
Sets the number of probes sent to this Contact so far. |
void |
reset()
Resets the probe variable to indicate that the Contact has recently responded to a probe message. |
void |
setAdditionalInfo(java.lang.String additionalInfo)
|
void |
setAddress(java.lang.String address)
Care should be taken when using this method. |
void |
setNickname(java.lang.String nickname)
|
void |
setPendingIn(boolean pendingIn)
Specifies whether or not incoming subscription requests are pending for this Contact. |
void |
setPendingOut(boolean pendingOut)
Specifies whether or not outgoing subscription requests are pending for this Contact. |
void |
setPresence(PresenceType presence)
|
void |
setShow(java.lang.String show)
|
void |
setStatus(java.lang.String status)
|
void |
setSubscription(java.lang.String subscription)
Sets the subscription status of this user. |
void |
setTimestamp(long timestamp)
|
java.lang.String |
toString()
This is what is displayed as the text of the Contact list. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Contact(java.lang.String nickname, java.lang.String address)
address
- nickname
- public Contact(java.lang.String username, java.lang.String nickname, java.lang.String address, java.lang.String additionalInfo)
username
- the contact's default username, used for logging in.nickname
- the contact's advertised name, or the name set by the user.address
- the virtual address of the contact.additionalInfo
- additional information advertised by the contact.public Contact(java.lang.String userName, java.lang.String nickname, java.lang.String additionalInfo, java.lang.String address, java.lang.String subscription, boolean pendingIn, boolean pendingOut)
userName
- the contact's default username, used for logging in.nickname
- the contact's advertised name, or the name set by the user.additionalInfo
- additional information advertised by the contact.address
- the virtual address of the contact.subscription
- the subscription status of the contact.pendingIn
- true if the contact has subscription requests pending in.pendingOut
- true if the contact has subscription requests pending out.Method Detail |
public java.lang.String getAddress()
public java.lang.String getUserName()
public PresenceType getPresence()
public void setPresence(PresenceType presence)
presence
- The presence to set.public java.lang.String getShow()
public void setShow(java.lang.String show)
show
- The away message to set for this Contact.public java.lang.String getStatus()
public void setStatus(java.lang.String status)
status
- The away status to set for this Contact.public java.lang.String getNickname()
public java.lang.String getAdditionalInfo()
public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- Sets the timestamp of the last message received from this Contact.public void setNickname(java.lang.String nickname)
nickname
- The nickname to set for this Contact.public boolean isPendingIn()
public void setPendingIn(boolean pendingIn)
pendingIn
- true to set true, false to set falsepublic boolean isPendingOut()
public void setPendingOut(boolean pendingOut)
pendingOut
- true to set true, false to set falsepublic java.lang.String getSubscription()
public void setSubscription(java.lang.String subscription)
subscription
- the string "both", "to", "from", or "none"public java.lang.String toString()
public void setAdditionalInfo(java.lang.String additionalInfo)
additionalInfo
- The additional info to set.public boolean probe()
public void reset()
public void setAddress(java.lang.String address)
address
- the address to set for this Contact.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |