|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.RosterBean
RosterBean is a bean to gain and utilize the roster information in jabber. A 'Roster' is a list of users, a type of subscription list or address book, if you will. By using a roster, you can get the status of other users (online/offline, etc), subscribe and unsubscribe users, as well as change your own status.
This bean hooks into an IQBean, it will not work until it is given a ConnectionBean to handle. RosterBean to ConnectionBean is a many to one relation - one ConnectionBean can have many RosterBeans, but if software wants to use more than a singular server connection, there is need for multiple RosterBeans, one per ConnectionBean.
Constructor Summary | |
RosterBean()
Default do-nothing constructor. |
Method Summary | |
void |
addRosterItem(RosterItem ri)
addRosterItem adds one precreated roster item to the
roster, as stored on the server. |
void |
addRosterListener(RosterListener l)
addRosterListener registers a class supporting
RosterListener to receive events from this bean. |
void |
delRosterItem(RosterItem ri)
delRosterItem deletes a roster item. |
void |
delRosterListener(RosterListener l)
delRosterListener unregisters a RosterListener from
receiving events from this bean. |
java.util.Enumeration |
entries()
returns the entries int the maintained roster cache. |
IQBean |
getIQBean()
getIQBean returns the currently set parent bean, if any |
void |
refreshRoster()
refreshRoster does a complete reload of the user roster. |
void |
setIQBean(IQBean connection)
setIQBean sets the IQBean 'parent' for this class, which
is used to send and receive events from the interface with the jabber
server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RosterBean()
Method Detail |
public void setIQBean(IQBean connection)
setIQBean
sets the IQBean 'parent' for this class, which
is used to send and receive events from the interface with the jabber
server.
connection
- an IQBean
public IQBean getIQBean()
getIQBean
returns the currently set parent bean, if any
IQBean
value, or null if none has been set.public void refreshRoster() throws java.lang.InstantiationException
refreshRoster
does a complete reload of the user roster.
java.lang.InstantiationException
- should never be thrown (may be removed
after this is proven to be true)public void addRosterItem(RosterItem ri) throws java.lang.InstantiationException
addRosterItem
adds one precreated roster item to the
roster, as stored on the server. A response will be sent by the server,
which will trigger a changed event on any registered RosterListener
interface.
ri
- a RosterItem
object to add
java.lang.InstantiationException
- if the build processes fail - this
may be removed after debugging.public void delRosterItem(RosterItem ri) throws java.lang.InstantiationException
delRosterItem
deletes a roster item. The rosterItem can
be taken directly from a valid Roster Extension object.
The server will respond to this, at which time any registered
RosterListener interfaces will be notified via a 'changed' type event.
ri
- a RosterItem
to delete
java.lang.InstantiationException
- if there is an error building objects,
this may be removed later, after debugging.public void addRosterListener(RosterListener l)
addRosterListener
registers a class supporting
RosterListener to receive events from this bean.
l
- a RosterListener
to registerpublic void delRosterListener(RosterListener l)
delRosterListener
unregisters a RosterListener from
receiving events from this bean.
l
- a RosterListener
to unregisterpublic java.util.Enumeration entries()
entries
int the maintained roster cache.
Enumeration
of RosterItems
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |