Saros
Distributed Collaborative Editing and Distributed Party Programming
org.jivesoftware.smack.RosterEntry Class Reference

List of all members.

Public Member Functions

String getUser ()
String getName ()
void setName (String name)
Collection< RosterGroup > getGroups ()
RosterPacket.ItemType getType ()
RosterPacket.ItemStatus getStatus ()
String toString ()
boolean equals (Object object)
int hashCode ()
boolean equalsDeep (Object obj)

Package Functions

 RosterEntry (String user, String name, RosterPacket.ItemType type, RosterPacket.ItemStatus status, Roster roster, Connection connection)
void updateState (String name, RosterPacket.ItemType type, RosterPacket.ItemStatus status)

Static Package Functions

static RosterPacket.Item toRosterItem (RosterEntry entry)

Detailed Description

Each user in your roster is represented by a roster entry, which contains the user's JID and a name or nickname you assign.

Author:
Matt Tucker

Constructor & Destructor Documentation

org.jivesoftware.smack.RosterEntry.RosterEntry ( String  user,
String  name,
RosterPacket.ItemType  type,
RosterPacket.ItemStatus  status,
Roster  roster,
Connection  connection 
) [package]

Creates a new roster entry.

Parameters:
userthe user.
namethe nickname for the entry.
typethe subscription type.
statusthe subscription status (related to subscriptions pending to be approbed).
connectiona connection to the XMPP server.

Member Function Documentation

boolean org.jivesoftware.smack.RosterEntry.equals ( Object  object)
boolean org.jivesoftware.smack.RosterEntry.equalsDeep ( Object  obj)

Indicates whether some other object is "equal to" this by comparing all members.

The equals(Object) method returns true if the user JIDs are equal.

Parameters:
objthe reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
Collection<RosterGroup> org.jivesoftware.smack.RosterEntry.getGroups ( )

Returns an unmodifiable collection of the roster groups that this entry belongs to.

Returns:
an iterator for the groups this entry belongs to.
String org.jivesoftware.smack.RosterEntry.getName ( )

Returns the name associated with this entry.

Returns:
the name.
RosterPacket.ItemStatus org.jivesoftware.smack.RosterEntry.getStatus ( )

Returns the roster subscription status of the entry. When the status is RosterPacket.ItemStatus.SUBSCRIPTION_PENDING, the contact has to answer the subscription request.

Returns:
the status.
RosterPacket.ItemType org.jivesoftware.smack.RosterEntry.getType ( )

Returns the roster subscription type of the entry. When the type is RosterPacket.ItemType.none or RosterPacket.ItemType.from, refer to getStatus() to see if a subscription request is pending.

Returns:
the type.
String org.jivesoftware.smack.RosterEntry.getUser ( )

Returns the JID of the user associated with this entry.

Returns:
the user associated with this entry.
int org.jivesoftware.smack.RosterEntry.hashCode ( )
void org.jivesoftware.smack.RosterEntry.setName ( String  name)

Sets the name associated with this entry.

Parameters:
namethe name.
static RosterPacket.Item org.jivesoftware.smack.RosterEntry.toRosterItem ( RosterEntry  entry) [static, package]
String org.jivesoftware.smack.RosterEntry.toString ( )
void org.jivesoftware.smack.RosterEntry.updateState ( String  name,
RosterPacket.ItemType  type,
RosterPacket.ItemStatus  status 
) [package]

Updates the state of the entry with the new values.

Parameters:
namethe nickname for the entry.
typethe subscription type.
statusthe subscription status (related to subscriptions pending to be approbed).
 All Classes Namespaces Files Functions Variables Enumerations