public class TrackedClientSet extends Object
Constructor and Description |
---|
TrackedClientSet()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addClient(Client client)
Adds a client to this model.
|
Map |
getClientMap()
Returns an unmodifiable Map representing the client list.
|
void |
removeClient(Client client)
Removes a client from this model.
|
void |
setClients(Client[] clients)
Sets the contents of this model to a given list.
|
void |
updateClient(Client client,
boolean metaChanged,
boolean subsChanged)
Notifies listeners that a given client's attributes (may) have
changed.
|
public void addClient(Client client)
client
- client to addpublic void removeClient(Client client)
client
- client to removepublic void setClients(Client[] clients)
clients
- current client listpublic void updateClient(Client client, boolean metaChanged, boolean subsChanged)
client
- modified clientmetaChanged
- true if metadata may have changed
(false if known unchanged)subsChanged
- true if subscriptions may have changed
(false if known unchanged)public Map getClientMap()
Client
objects.
This map is synchronized
which means that to iterate over any of its views
you must synchronize on it.
When the map or any of its contents changes, it will receive a
Object.notifyAll()
.
Copyright © 2008–2024. All rights reserved.