Interface Room
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface Room
A room is an abstraction for a set of document models created for the same document.
Such models belong to different users and are edited concurrently and synchronized
in real-time.
An document model that is part in a room is called a "peer".
- Since:
- 23
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Editing Session Context attribute to store the peer ID which is unique inside this room.static final String
Editing Session Context attribute that mark the room creator with "true" value.static final String
Editing Session Context attribute to store the room ID. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the room.Returns the room observer, useful for saving changes made in the room by multiple users.getPeerContext
(int peerId) Get the peer context for a given peer.
-
Field Details
-
PEER_ID_ATTRIBUTE
Editing Session Context attribute to store the peer ID which is unique inside this room.- See Also:
-
ROOM_ID_ATTRIBUTE
Editing Session Context attribute to store the room ID.- See Also:
-
ROOM_CREATOR_ATTRIBUTE
Editing Session Context attribute that mark the room creator with "true" value.- See Also:
-
-
Method Details
-
getPeerContext
Get the peer context for a given peer.- Parameters:
peerId
- The peer ID.- Returns:
- The peer context.
-
getObserver
RoomObserver getObserver()Returns the room observer, useful for saving changes made in the room by multiple users. Note: The room observer needs to be requested when the room is created.- Returns:
- The room observer - used to observe changes to the document made in the room.
-
close
void close()Close the room. Should do any necessary cleanup and should notify all peers.
-