Package | Description |
---|---|
jhelp.util.post |
Post office to send messages
|
Modifier and Type | Field and Description |
---|---|
private ThreadedSimpleTask<Pair<Message,User>> |
PostOffice.giveMessage
Deliver message to user in separate thread
|
private java.util.HashMap<java.lang.String,User> |
PostOffice.users
Users map
|
Modifier and Type | Method and Description |
---|---|
void |
PostOffice.addToGroup(User user,
java.lang.String group)
Add a user to a group.
|
boolean |
PostOffice.isInGroup(User user,
java.lang.String group)
Indicates if a user is in a group
|
boolean |
PostOffice.postMessage(User sender,
int messageId,
java.lang.String destination,
java.lang.Object message)
Post a message for a specific user
|
void |
PostOffice.postMessageForAll(User sender,
int messageId,
java.lang.Object message,
boolean excludeMe)
Post a message for all registered users
|
void |
PostOffice.postMessageForGroup(User sender,
int messageId,
java.lang.String group,
java.lang.Object message)
Post a message for all members of a group
|
void |
PostOffice.registerUser(User user)
Register a user
|
void |
PostOffice.removeFromGroup(User user,
java.lang.String group)
Remove a user from a group
|
void |
PostOffice.unregisterUser(User user)
Unregister a user
|