get
Gets a room reference by ID. The Rooms class ensures that only one reference exists for each room. A new reference object is created if it doesn't already exist, or if the one used previously was released using release(name).
Always call release(name)
after the Room object is no longer needed.
If a call to get
is made for a room that is currently being released, then it will resolve only when the release operation is complete.
If a call to get
is made, followed by a subsequent call to release
before it resolves, then get
will throw an exception
Parameters
name
The ID of the room.
options
The options for the room.
Throws
Error Info
if a room with the same ID but different options already exists.