Class ReplicationServerRoomsService
Public API to interface with Rooms from a self-hosted Replication Server.
If you wish to create, delete or fetch rooms in the coherence Cloud, you can instantiate
a Cloud
- Inheritance
-
Replication
Server Rooms Service
- Implements
Constructors
ReplicationServerRoomsService(string, int?, IRequestFactory, IRuntimeSettings)
public ReplicationServerRoomsService(string ip = null, int? apiPort = null, IRequestFactory requestFactory = null, IRuntimeSettings runtimeSettings = null)
Parameters
ip
stringapiPort
int?requestFactory
IRequestFactory runtimeSettings
IRuntimeSettings
Properties
CachedRooms
List of cached Rooms that were fetched by the FetchRooms method.
Property Value
Methods
CreateRoom(Action<RequestResponse<RoomData>>, RoomCreationOptions)
Create a room with the given options in the Replication Server.
public void CreateRoom(Action<RequestResponse<RoomData>> onRequestFinished, RoomCreationOptions roomCreationOptions)
Parameters
onRequestFinished
Action<RequestResponse <RoomData >>Callback that will be invoked when the request finished, it includes the created room.
roomCreationOptions
RoomCreation Options Instance of all the room options that you wish to create the room with.
CreateRoomAsync(RoomCreationOptions)
Create a room with the given options in the Replication Server asynchronously.
Parameters
roomCreationOptions
RoomCreation Options Instance of all the room options that you wish to create the room with.
Returns
FetchRooms(Action<RequestResponse<IReadOnlyList<RoomData>>>, string[])
Fetch the available rooms in the Replication Server.
public void FetchRooms(Action<RequestResponse<IReadOnlyList<RoomData>>> onRequestFinished, string[] tags = null)
Parameters
onRequestFinished
Action<RequestResponse <IReadOnly <RoomList Data >>>Callback that will be invoked when the request finished, it includes the fetched rooms.
tags
string[]Filter the results by a list of tags.
FetchRoomsAsync(string[])
Fetch the available rooms in the Replication Server asynchronously.
Parameters
tags
string[]Filter the results by a list of tags.
Returns
IsOnline()
Returns
RemoveRoom(ulong, string, Action<RequestResponse<string>>)
Remove an existing room that you have created in the Replication Server.
public void RemoveRoom(ulong uniqueID, string secret, Action<RequestResponse<string>> onRequestFinished)
Parameters
uniqueID
ulongUnique ID of the room you wish to remove. Can be found in RoomData.UniqueId
secret
stringToken that will allow you to remove the room. Can be found in RoomData.Secret
onRequestFinished
Action<RequestResponse <string>>Callback that will be invoked when the request finished.
RemoveRoomAsync(ulong, string)
Remove an existing room that you have created in the Replication Server asynchronously.
Parameters
uniqueID
ulongUnique ID of the room you wish to remove. Can be found in RoomData.UniqueId
secret
stringToken that will allow you to remove the room. Can be found in RoomData.Secret