|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--spread.SpreadGroup
A SpreadGroup object represents a group on a spread daemon. The group is either a group that
has been joined or a private group.
To join a group, first create a SpreadGroup object, then join it with
join(SpreadConnection, String)
:
SpreadGroup group = new SpreadGroup(); group.join(connection, "users");
To leave the group, use leave()
:
group.leave();
Constructor Summary | |
SpreadGroup()
Initializes a new SpreadGroup object. |
Method Summary | |
boolean |
equals(java.lang.Object object)
Checks if two groups are the same. |
void |
join(SpreadConnection connection,
java.lang.String name)
Joins the group name on the connection connection . |
void |
leave()
Leaves the group. |
java.lang.String |
toString()
Returns the name of the group as a string. |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public SpreadGroup()
join(SpreadConnection, String)
.join(SpreadConnection, String)
Method Detail |
public void join(SpreadConnection connection, java.lang.String name) throws SpreadException
name
on the connection connection
.
Between when the group has been joined with this method and when it is left with
leave()
, all messages sent to the group will be received by
the connection.connection
- the connection to join the group withname
- the name of the group to joinleave()
public void leave() throws SpreadException
join(SpreadConnection, String)
public java.lang.String toString()
public boolean equals(java.lang.Object object)
object
- the object to compare against
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |