Services
All functionality in Rooms is accessed through a Service. You get interfaces to Services
with the Services Object. Services available are:
- RoomServices - for Room functions such as broadcasting, Client counts, Client lists, setting Attributes, etc.
- NamespaceServices - for Namespace functions such as broadcasting, Client counts, Client lists, Room Lists, etc.
- ClientServices - for Client functions such as joining/leaving a Room, broadcasting, setting/getting attributes, etc
- ClientManagementServices - for managing all Clients on the server such as Client list and Client count.
- RoomManagementServices - for managing Rooms/Namespaces such as spawning Rooms, adding Namespaces, Room lists, etc
- ServerServices - for managing the Server such as setting/getting Attributes, getting Version, getting startup time, etc
For example to access and use RoomServices:
RoomServices roomServices = Services.getRoomServices("myRoomID");
int numClients = roomServices.getNumClients();
See Javadoc for the complete API for all Services.