public final class CallingServerClient extends Object
Instantiating a synchronous Calling Server Client
HttpPipeline pipeline = new HttpPipelineBuilder()
.policies(/* add policies */)
.build();
CallingServerClient callingServerClient = new CallingServerClientBuilder()
.pipeline(pipeline)
.connectionString(connectionString)
.buildClient();
View this for additional ways to construct the client.
CallingServerClientBuilder| Modifier and Type | Method and Description |
|---|---|
CallConnection |
createCallConnection(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.
|
com.azure.core.http.rest.Response<CallConnection> |
createCallConnectionWithResponse(com.azure.communication.common.CommunicationIdentifier source,
List<com.azure.communication.common.CommunicationIdentifier> targets,
CreateCallOptions createCallOptions,
com.azure.core.util.Context context)
Create a Call Connection Request from source identity to targets identity.
|
void |
downloadTo(String sourceEndpoint,
OutputStream destinationStream,
com.azure.core.http.HttpRange httpRange)
Download the recording content, e.g.
|
void |
downloadTo(String sourceEndpoint,
Path destinationPath,
ParallelDownloadOptions parallelDownloadOptions,
boolean overwrite)
Download the content located in
endpoint into a file marked by path. |
com.azure.core.http.rest.Response<Void> |
downloadToWithResponse(String sourceEndpoint,
OutputStream destinationStream,
com.azure.core.http.HttpRange httpRange,
com.azure.core.util.Context context)
Download the recording content, e.g.
|
com.azure.core.http.rest.Response<Void> |
downloadToWithResponse(String sourceEndpoint,
Path destinationPath,
ParallelDownloadOptions parallelDownloadOptions,
boolean overwrite,
com.azure.core.util.Context context)
Download the content located in
endpoint into a file marked by path. |
CallConnection |
getCallConnection(String callConnectionId)
Get CallConnection object
|
ServerCall |
initializeServerCall(String serverCallId)
Get ServerCall object
|
CallConnection |
joinCall(String serverCallId,
com.azure.communication.common.CommunicationIdentifier source,
JoinCallOptions joinCallOptions)
Join a call
|
com.azure.core.http.rest.Response<CallConnection> |
joinCallWithResponse(String serverCallId,
com.azure.communication.common.CommunicationIdentifier source,
JoinCallOptions joinCallOptions,
com.azure.core.util.Context context)
Join a call
|
public CallConnection createCallConnection(com.azure.communication.common.CommunicationIdentifier source, List<com.azure.communication.common.CommunicationIdentifier> targets, CreateCallOptions createCallOptions)
source - The source of the call.targets - The targets of the call.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);
CallConnection callConnection = callingServerClient.createCallConnection(source, targets, createCallOptions);
CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<CallConnection> createCallConnectionWithResponse(com.azure.communication.common.CommunicationIdentifier source, List<com.azure.communication.common.CommunicationIdentifier> targets, CreateCallOptions createCallOptions, com.azure.core.util.Context context)
source - The source of the call.targets - The targets of the call.createCallOptions - The call Options.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public CallConnection joinCall(String serverCallId, com.azure.communication.common.CommunicationIdentifier source, JoinCallOptions joinCallOptions)
serverCallId - The server call id.source - of Join Call request.joinCallOptions - to Join Call.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public com.azure.core.http.rest.Response<CallConnection> joinCallWithResponse(String serverCallId, com.azure.communication.common.CommunicationIdentifier source, JoinCallOptions joinCallOptions, com.azure.core.util.Context context)
serverCallId - The server call id.source - of Join Call request.joinCallOptions - to Join Call.context - A Context representing the request context.CallingServerErrorException - thrown if the request is rejected by server.RuntimeException - all other wrapped checked exceptions if the request fails to be sent.public CallConnection getCallConnection(String callConnectionId)
callConnectionId - The call connection id.public ServerCall initializeServerCall(String serverCallId)
serverCallId - Server call id.public void downloadTo(String sourceEndpoint, OutputStream destinationStream, com.azure.core.http.HttpRange httpRange)
endpoint and write it into the OutputStream passed as parameter.sourceEndpoint - - ACS URL where the content is located.destinationStream - - A stream where to write the downloaded content.httpRange - - An optional HttpRange value containing the range of bytes to download. If missing,
the whole content will be downloaded.public com.azure.core.http.rest.Response<Void> downloadToWithResponse(String sourceEndpoint, OutputStream destinationStream, com.azure.core.http.HttpRange httpRange, com.azure.core.util.Context context)
endpoint and write it in the OutputStream passed as parameter.sourceEndpoint - - ACS URL where the content is located.destinationStream - - A stream where to write the downloaded content.httpRange - - An optional HttpRange value containing the range of bytes to download. If missing,
the whole content will be downloaded.context - A Context representing the request context.public 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 com.azure.core.http.rest.Response<Void> downloadToWithResponse(String sourceEndpoint, Path destinationPath, ParallelDownloadOptions parallelDownloadOptions, boolean overwrite, com.azure.core.util.Context context)
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.context - A Context representing the request context.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.