public final class CallingServerAsyncClient extends Object
Instantiating a asynchronous CallingServer client
HttpPipeline pipeline = new HttpPipelineBuilder()
.policies(/* add policies */)
.build();
CallingServerAsyncClient callingServerAsyncClient = new CallingServerClientBuilder()
.pipeline(pipeline)
.connectionString(connectionString)
.buildAsyncClient();
View this for additional ways to construct the client.
CallingServerClientBuilder| Modifier and Type | Method and Description |
|---|---|
Mono<CallConnectionAsync> |
createCallConnection(com.azure.communication.common.CommunicationIdentifier source,
List<com.azure.communication.common.CommunicationIdentifier> targets,
CreateCallOptions createCallOptions)
Create a call connection request from a source identity to targets identity.
|
Mono<com.azure.core.http.rest.Response<CallConnectionAsync>> |
createCallConnectionWithResponse(com.azure.communication.common.CommunicationIdentifier source,
List<com.azure.communication.common.CommunicationIdentifier> targets,
CreateCallOptions createCallOptions)
Create a Call Connection Request from source identity to targets identity.
|
Flux<ByteBuffer> |
downloadStream(String sourceEndpoint)
Download the recording content, e.g.
|
Flux<ByteBuffer> |
downloadStream(String sourceEndpoint,
com.azure.core.http.HttpRange httpRange)
Download the recording content, e.g.
|
Mono<com.azure.core.http.rest.Response<Flux<ByteBuffer>>> |
downloadStreamWithResponse(String sourceEndpoint,
com.azure.core.http.HttpRange range)
Download the recording content, (e.g.
|
Mono<Void> |
downloadTo(String sourceEndpoint,
Path destinationPath,
ParallelDownloadOptions parallelDownloadOptions,
boolean overwrite)
Download the content located in
endpoint into a file marked by path. |
Mono<com.azure.core.http.rest.Response<Void>> |
downloadToWithResponse(String sourceEndpoint,
Path destinationPath,
ParallelDownloadOptions parallelDownloadOptions,
boolean overwrite)
Download the content located in
endpoint into a file marked by path. |
CallConnectionAsync |
getCallConnection(String callConnectionId)
Get CallConnection object
|
ServerCallAsync |
initializeServerCall(String serverCallId)
Get ServerCall object.
|
Mono<CallConnectionAsync> |
joinCall(String serverCallId,
com.azure.communication.common.CommunicationIdentifier source,
JoinCallOptions joinCallOptions)
Join a Call
|
Mono<com.azure.core.http.rest.Response<CallConnectionAsync>> |
joinCallWithResponse(String serverCallId,
com.azure.communication.common.CommunicationIdentifier source,
JoinCallOptions joinCallOptions)
Join a call
|
public Mono<CallConnectionAsync> createCallConnection(com.azure.communication.common.CommunicationIdentifier source, List<com.azure.communication.common.CommunicationIdentifier> targets, CreateCallOptions createCallOptions)
source - The source identity.targets - The target identities.createCallOptions - The call options.
List<CommunicationIdentifier> targets = Arrays.asList(firstCallee, secondCallee);
List<MediaType> requestedMediaTypes = Arrays.asList(MediaType.AUDIO, MediaType.VIDEO);
List<EventSubscriptionType> requestedCallEvents = Arrays.asList(
EventSubscriptionType.DTMF_RECEIVED,
EventSubscriptionType.PARTICIPANTS_UPDATED);
CreateCallOptions createCallOptions = new CreateCallOptions(
callbackUri,
requestedMediaTypes,
requestedCallEvents);
CallConnectionAsync callAsyncConnection = callingServerAsyncClient
.createCallConnection(source, targets, createCallOptions).block();
CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<CallConnectionAsync>> createCallConnectionWithResponse(com.azure.communication.common.CommunicationIdentifier source, List<com.azure.communication.common.CommunicationIdentifier> targets, CreateCallOptions createCallOptions)
source - The source identity.targets - The target identities.createCallOptions - The call options.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<CallConnectionAsync> joinCall(String serverCallId, com.azure.communication.common.CommunicationIdentifier source, JoinCallOptions joinCallOptions)
serverCallId - Server call id.source - Source identity.joinCallOptions - Join call options.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public Mono<com.azure.core.http.rest.Response<CallConnectionAsync>> joinCallWithResponse(String serverCallId, com.azure.communication.common.CommunicationIdentifier source, JoinCallOptions joinCallOptions)
serverCallId - Server call id.source - Source identity.joinCallOptions - Join call options.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public CallConnectionAsync getCallConnection(String callConnectionId)
callConnectionId - Call connection id.public ServerCallAsync initializeServerCall(String serverCallId)
serverCallId - Server call id.public Flux<ByteBuffer> downloadStream(String sourceEndpoint)
sourceEndpoint - - URL where the content is located.Flux object containing the byte stream of the content requested.public Flux<ByteBuffer> downloadStream(String sourceEndpoint, com.azure.core.http.HttpRange httpRange)
sourceEndpoint - - URL where the content is located.httpRange - - An optional HttpRange value containing the range of bytes to download. If missing,
the whole content will be downloaded.Flux object containing the byte stream of the content requested.public Mono<com.azure.core.http.rest.Response<Flux<ByteBuffer>>> downloadStreamWithResponse(String sourceEndpoint, com.azure.core.http.HttpRange range)
endpoint.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.Mono object containing a Response with the byte stream of the content requested.public Mono<Void> downloadTo(String sourceEndpoint, Path destinationPath, ParallelDownloadOptions parallelDownloadOptions, boolean overwrite)
endpoint into a file marked by path.
This download will be done using parallel workers.sourceEndpoint - - ACS URL where the content is located.destinationPath - - File location.parallelDownloadOptions - - an optional ParallelDownloadOptions object to modify how the parallel
download will work.overwrite - - True to overwrite the file if it exists.public Mono<com.azure.core.http.rest.Response<Void>> downloadToWithResponse(String sourceEndpoint, Path destinationPath, ParallelDownloadOptions parallelDownloadOptions, boolean overwrite)
endpoint into a file marked by path.
This download will be done using parallel workers.sourceEndpoint - - ACS URL where the content is located.destinationPath - - File location.parallelDownloadOptions - - an optional ParallelDownloadOptions object to modify how the parallel
download will work.overwrite - - True to overwrite the file if it exists.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.