Class CallRecordingAsync

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

public final class CallRecordingAsync extends Object
CallRecordingAsync.
  • Method Details

    • start

      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.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • startWithResponse

      public Mono<com.azure.core.http.rest.Response<RecordingStateResult>> startWithResponse(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.
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • stop

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

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

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

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

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

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

      public Mono<RecordingStateResult> getState(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:
      com.azure.core.exception.HttpResponseException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getStateWithResponse

      public Mono<com.azure.core.http.rest.Response<RecordingStateResult>> getStateWithResponse(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:
      com.azure.core.exception.HttpResponseException - 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 sourceUrl)
      Download the recording content, e.g. Recording's metadata, Recording video, from the ACS endpoint passed as parameter.
      Parameters:
      sourceUrl - - 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 sourceUrl, com.azure.core.http.HttpRange range)
      Download the recording content, (e.g. Recording's metadata, Recording video, etc.) from the endpoint.
      Parameters:
      sourceUrl - - 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 sourceUrl)
      Reads the entire content.

      Code Samples

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

      Parameters:
      sourceUrl - - 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 sourceUrl, 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:
      sourceUrl - - 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 sourceUrl, Path destinationPath)
      Download the content located in endpoint into a file marked by path. This download will be done using parallel workers.
      Parameters:
      sourceUrl - - ACS URL where the content is located.
      destinationPath - - File location.
      Returns:
      Response for a successful downloadTo request.
    • downloadTo

      public Mono<Void> downloadTo(String sourceUrl, 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:
      sourceUrl - - 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.
    • delete

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

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