Class CallRecordingAsync

java.lang.Object
com.azure.communication.callautomation.CallRecordingAsync

public class CallRecordingAsync extends Object
CallRecordingAsync.
  • Method Details

    • startRecording

      public Mono<RecordingStateResult> startRecording(StartRecordingOptions options)
      Start recording of the call.
      Parameters:
      options - A StartRecordingOptions object containing different options for recording.
      Returns:
      Response for a successful start recording request.
      Throws:
      InvalidParameterException - is recordingStateCallbackUri is absolute uri.
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • startRecordingWithResponse

      public Mono<com.azure.core.http.rest.Response<RecordingStateResult>> startRecordingWithResponse(StartRecordingOptions options)
      Start recording of the call.
      Parameters:
      options - A StartRecordingOptions object containing different options for recording.
      Returns:
      Response for a successful start recording request.
      Throws:
      InvalidParameterException - is recordingStateCallbackUri is absolute uri.
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stopRecording

      public Mono<Void> stopRecording(String recordingId)
      Stop recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      Response for a successful stop recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stopRecordingWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> stopRecordingWithResponse(String recordingId)
      Stop recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      Response for a successful stop recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • pauseRecording

      public Mono<Void> pauseRecording(String recordingId)
      Pause recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      Response for a successful pause recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • pauseRecordingWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> pauseRecordingWithResponse(String recordingId)
      Pause recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      Response for a successful pause recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • resumeRecording

      public Mono<Void> resumeRecording(String recordingId)
      Resume recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      response for a successful resume recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • resumeRecordingWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> resumeRecordingWithResponse(String recordingId)
      Resume recording of the call.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      response for a successful resume recording request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getRecordingState

      public Mono<RecordingStateResult> getRecordingState(String recordingId)
      Get current recording state by recording id.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      Response for a successful get recording state request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getRecordingStateWithResponse

      public Mono<com.azure.core.http.rest.Response<RecordingStateResult>> getRecordingStateWithResponse(String recordingId)
      Get current recording state by recording id.
      Parameters:
      recordingId - Recording id to stop.
      Returns:
      Response for a successful get recording state request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • downloadStream

      public Flux<ByteBuffer> downloadStream(String sourceEndpoint)
      Download the recording content, e.g. Recording's metadata, Recording video, from the ACS endpoint passed as parameter.
      Parameters:
      sourceEndpoint - - URL where the content is located.
      Returns:
      A Flux object containing the byte stream of the content requested.
    • downloadStreamWithResponse

      public Mono<com.azure.core.http.rest.Response<Flux<ByteBuffer>>> downloadStreamWithResponse(String sourceEndpoint, com.azure.core.http.HttpRange range)
      Download the recording content, (e.g. Recording's metadata, Recording video, etc.) from the endpoint.
      Parameters:
      sourceEndpoint - - URL where the content is located.
      range - - An optional HttpRange value containing the range of bytes to download. If missing, the whole content will be downloaded.
      Returns:
      A Mono object containing a Response with the byte stream of the content requested.
    • downloadContent

      public Mono<com.azure.core.util.BinaryData> downloadContent(String sourceEndpoint)
      Reads the entire content.

      Code Samples

      This method supports downloads up to 2GB of data. Use downloadStream(String) ()} to download larger blobs.

      Parameters:
      sourceEndpoint - - URL where the content is located.
      Returns:
      A reactive response containing the content data.
    • downloadContentWithResponse

      public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> downloadContentWithResponse(String sourceEndpoint, com.azure.core.http.HttpRange range)
      Reads a range of bytes from a content.

      This method supports downloads up to 2GB of data. Use downloadStreamWithResponse(String, HttpRange) to download larger blobs.

      Parameters:
      sourceEndpoint - - URL where the content is located.
      range - - An optional HttpRange value containing the range of bytes to download. If missing, the whole content will be downloaded.
      Returns:
      A reactive response containing the blob data.
    • downloadTo

      public Mono<Void> downloadTo(String sourceEndpoint, Path destinationPath)
      Download the content located in endpoint into a file marked by path. This download will be done using parallel workers.
      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      destinationPath - - File location.
      Returns:
      Response for a successful downloadTo request.
    • downloadToWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> downloadToWithResponse(String sourceEndpoint, Path destinationPath, DownloadToFileOptions options)
      Download the content located in endpoint into a file marked by path. This download will be done using parallel workers.
      Parameters:
      sourceEndpoint - - ACS URL where the content is located.
      destinationPath - - File location.
      options - - an optional DownloadToFileOptions object to modify how the download will work.
      Returns:
      Response containing the http response information from the download.
    • deleteRecording

      public Mono<Void> deleteRecording(String deleteEndpoint)
      Delete the content located at the deleteEndpoint
      Parameters:
      deleteEndpoint - - ACS URL where the content is located.
      Returns:
      Response for successful delete request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteRecordingWithResponse

      public Mono<com.azure.core.http.rest.Response<Void>> deleteRecordingWithResponse(String deleteEndpoint)
      Delete the content located at the deleteEndpoint Recording deletion will be done using parallel workers.
      Parameters:
      deleteEndpoint - - ACS URL where the content is located.
      Returns:
      Response for successful delete request.
      Throws:
      CallingServerErrorException - thrown if the request is rejected by server.