RoomsClient Class

  • java.lang.Object
    • com.azure.communication.rooms.RoomsClient

public final class RoomsClient

Client for Rooms operations of Azure Communication Room Service

Instantiating a Room Client

RoomsClient roomsClient = new RoomsClientBuilder()
      .endpoint(endpoint)
      .credential(azureKeyCredential)
      .buildClient();

Method Summary

Modifier and Type Method and Description
AddOrUpdateParticipantsResult addOrUpdateParticipants(String roomId, Iterable<RoomParticipant> participants)

addOrUpdate participants to an existing Room.

Response<AddOrUpdateParticipantsResult> addOrUpdateParticipantsWithResponse(String roomId, Iterable<RoomParticipant> participants, Context context)

addOrUpdate participants to an existing Room with response

CommunicationRoom createRoom(CreateRoomOptions createRoomOptions)

Create a new room.

Response<CommunicationRoom> createRoomWithResponse(CreateRoomOptions createRoomOptions, Context context)

Create a new Room with response.

void deleteRoom(String roomId)

Delete an existing room.

Response<Void> deleteRoomWithResponse(String roomId, Context context)

Delete an existing room.

CommunicationRoom getRoom(String roomId)

Get an existing room.

Response<CommunicationRoom> getRoomWithResponse(String roomId, Context context)

Get an existing room with response.

PagedIterable<RoomParticipant> listParticipants(String roomId)

List Room participants.

PagedIterable<RoomParticipant> listParticipants(String roomId, Context context)

List Room participants.

PagedIterable<CommunicationRoom> listRooms()

Lists all rooms.

PagedIterable<CommunicationRoom> listRooms(Context context)

Lists all rooms.

RemoveParticipantsResult removeParticipants(String roomId, Iterable<CommunicationIdentifier> identifiers)

Remove participants to an existing Room.

Response<RemoveParticipantsResult> removeParticipantsWithResponse(String roomId, Iterable<CommunicationIdentifier> identifiers, Context context)

Remove participants to an existing Room with response

CommunicationRoom updateRoom(String roomId, UpdateRoomOptions updateRoomOptions)

Update an existing Room.

Response<CommunicationRoom> updateRoomWithResponse(String roomId, UpdateRoomOptions updateRoomOptions, Context context)

Update an existing Room with response.

Methods inherited from java.lang.Object

Method Details

addOrUpdateParticipants

public AddOrUpdateParticipantsResult addOrUpdateParticipants(String roomId, Iterable<RoomParticipant> participants)

addOrUpdate participants to an existing Room.

Parameters:

roomId - The room id.
participants - The participants list.

Returns:

response for a successful addOrUpdate participants room request.

addOrUpdateParticipantsWithResponse

public Response<AddOrUpdateParticipantsResult> addOrUpdateParticipantsWithResponse(String roomId, Iterable<RoomParticipant> participants, Context context)

addOrUpdate participants to an existing Room with response

Parameters:

roomId - The room id.
participants - The participants list.
context - The context of key value pairs for http request.

Returns:

response for a successful addOrUpdate participants room request.

createRoom

public CommunicationRoom createRoom(CreateRoomOptions createRoomOptions)

Create a new room. Input field is nullable.

Parameters:

createRoomOptions - the create room options.

Returns:

response for a successful create room request.

createRoomWithResponse

public Response<CommunicationRoom> createRoomWithResponse(CreateRoomOptions createRoomOptions, Context context)

Create a new Room with response.

Parameters:

createRoomOptions - the create room options.
context - The context of key value pairs for http request.

Returns:

response for a successful create room request.

deleteRoom

public void deleteRoom(String roomId)

Delete an existing room.

Parameters:

roomId - The room Id.

deleteRoomWithResponse

public Response<Void> deleteRoomWithResponse(String roomId, Context context)

Delete an existing room.

Parameters:

roomId - The room Id.
context - The context of key value pairs for http request.

Returns:

Response with status code only.

getRoom

public CommunicationRoom getRoom(String roomId)

Get an existing room.

Parameters:

roomId - The room id.

Returns:

The existing room.

getRoomWithResponse

public Response<CommunicationRoom> getRoomWithResponse(String roomId, Context context)

Get an existing room with response.

Parameters:

roomId - The room id.
context - The context of key value pairs for http request.

Returns:

The existing room.

listParticipants

public PagedIterable<RoomParticipant> listParticipants(String roomId)

List Room participants.

Parameters:

roomId - The room id.

Returns:

Room Participants List

listParticipants

public PagedIterable<RoomParticipant> listParticipants(String roomId, Context context)

List Room participants.

Parameters:

roomId - The room id.
context - The context of key value pairs for http request.

Returns:

Room Participants List

listRooms

public PagedIterable<CommunicationRoom> listRooms()

Lists all rooms.

Returns:

The existing rooms.

listRooms

public PagedIterable<CommunicationRoom> listRooms(Context context)

Lists all rooms.

Parameters:

context - The context of key value pairs for http request.

Returns:

The existing rooms.

removeParticipants

public RemoveParticipantsResult removeParticipants(String roomId, Iterable<CommunicationIdentifier> identifiers)

Remove participants to an existing Room.

Parameters:

roomId - The room id.
identifiers - The communication identifiers list.

Returns:

response for a successful remove participants room request.

removeParticipantsWithResponse

public Response<RemoveParticipantsResult> removeParticipantsWithResponse(String roomId, Iterable<CommunicationIdentifier> identifiers, Context context)

Remove participants to an existing Room with response

Parameters:

roomId - The room id.
identifiers - The communication identifiers list.
context - The context of key value pairs for http request.

Returns:

response for a successful remove participants room request.

updateRoom

public CommunicationRoom updateRoom(String roomId, UpdateRoomOptions updateRoomOptions)

Update an existing Room.

Parameters:

roomId - The room Id.
updateRoomOptions - the update room options.

Returns:

response for a successful update room request.

updateRoomWithResponse

public Response<CommunicationRoom> updateRoomWithResponse(String roomId, UpdateRoomOptions updateRoomOptions, Context context)

Update an existing Room with response.

Parameters:

roomId - The room Id.
updateRoomOptions - the update room options.
context - The context of key value pairs for http request.

Returns:

response for a successful update room request.

Applies to