Package com.tenio.api

Class RoomApi


  • public final class RoomApi
    extends AbstractLogger
    This class provides you a necessary interface for managing rooms.
    Author:
    kong
    See Also:
    IRoomManager
    • Constructor Detail

    • Method Detail

      • gets

        public java.util.Map<java.lang.String,​AbstractRoom> gets()
        Returns:
        all the current rooms in your server
      • add

        public void add​(AbstractRoom room)
        Add a new room to your server. You need create your own room first.
        Parameters:
        room - that is added, see AbstractRoom
      • contain

        public boolean contain​(java.lang.String roomId)
        Determine if the room has existed or not.
        Parameters:
        roomId - the unique ID
        Returns:
        Returns true if the room has existed, null otherwise
      • get

        public AbstractRoom get​(java.lang.String roomId)
        Retrieve a room by its ID.
        Parameters:
        roomId - the unique ID
        Returns:
        Returns a room's instance if it has existed, null otherwise
      • remove

        public void remove​(AbstractRoom room)
        Remove a room from your server.
        Parameters:
        room - that is removed, see AbstractRoom
      • getAllRoomInfos

        public java.util.List<java.util.List<java.lang.Object>> getAllRoomInfos()
        Returns:
        all rooms' information data