Interface ConnectParticipantAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
Amazon Connect is an easy-to-use omnichannel cloud contact center service that enables companies of any size to deliver superior customer service at a lower cost. Amazon Connect communications capabilities make it easy for companies to deliver personalized interactions across communication channels, including chat.
Use the Amazon Connect Participant Service to manage participants (for example, agents, customers, and managers listening in), and to send messages and events within a chat contact. The APIs in the service enable the following: sending chat messages, attachment sharing, managing a participant's connection state and message events, and retrieving chat transcripts.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aConnectParticipantAsyncClient
.completeAttachmentUpload
(Consumer<CompleteAttachmentUploadRequest.Builder> completeAttachmentUploadRequest) Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API.completeAttachmentUpload
(CompleteAttachmentUploadRequest completeAttachmentUploadRequest) Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API.create()
Create aConnectParticipantAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.createParticipantConnection
(Consumer<CreateParticipantConnectionRequest.Builder> createParticipantConnectionRequest) Creates the participant's connection.createParticipantConnection
(CreateParticipantConnectionRequest createParticipantConnectionRequest) Creates the participant's connection.default CompletableFuture
<DescribeViewResponse> describeView
(Consumer<DescribeViewRequest.Builder> describeViewRequest) Retrieves the view for the specified view token.default CompletableFuture
<DescribeViewResponse> describeView
(DescribeViewRequest describeViewRequest) Retrieves the view for the specified view token.disconnectParticipant
(Consumer<DisconnectParticipantRequest.Builder> disconnectParticipantRequest) Disconnects a participant.disconnectParticipant
(DisconnectParticipantRequest disconnectParticipantRequest) Disconnects a participant.default CompletableFuture
<GetAttachmentResponse> getAttachment
(Consumer<GetAttachmentRequest.Builder> getAttachmentRequest) Provides a pre-signed URL for download of a completed attachment.default CompletableFuture
<GetAttachmentResponse> getAttachment
(GetAttachmentRequest getAttachmentRequest) Provides a pre-signed URL for download of a completed attachment.default CompletableFuture
<GetTranscriptResponse> getTranscript
(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest) Retrieves a transcript of the session, including details about any attachments.default CompletableFuture
<GetTranscriptResponse> getTranscript
(GetTranscriptRequest getTranscriptRequest) Retrieves a transcript of the session, including details about any attachments.default GetTranscriptPublisher
getTranscriptPaginator
(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest) This is a variant ofgetTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation.default GetTranscriptPublisher
getTranscriptPaginator
(GetTranscriptRequest getTranscriptRequest) This is a variant ofgetTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation.default CompletableFuture
<SendEventResponse> sendEvent
(Consumer<SendEventRequest.Builder> sendEventRequest) default CompletableFuture
<SendEventResponse> sendEvent
(SendEventRequest sendEventRequest) default CompletableFuture
<SendMessageResponse> sendMessage
(Consumer<SendMessageRequest.Builder> sendMessageRequest) Sends a message.default CompletableFuture
<SendMessageResponse> sendMessage
(SendMessageRequest sendMessageRequest) Sends a message.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstartAttachmentUpload
(Consumer<StartAttachmentUploadRequest.Builder> startAttachmentUploadRequest) Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.startAttachmentUpload
(StartAttachmentUploadRequest startAttachmentUploadRequest) Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
completeAttachmentUpload
default CompletableFuture<CompleteAttachmentUploadResponse> completeAttachmentUpload(CompleteAttachmentUploadRequest completeAttachmentUploadRequest) Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment with that identifier is already being uploaded.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
completeAttachmentUploadRequest
-- Returns:
- A Java Future containing the result of the CompleteAttachmentUpload operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- ServiceQuotaExceededException The number of attachments per contact exceeds the quota.
- ConflictException The requested operation conflicts with the current state of a service resource associated with the request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
completeAttachmentUpload
default CompletableFuture<CompleteAttachmentUploadResponse> completeAttachmentUpload(Consumer<CompleteAttachmentUploadRequest.Builder> completeAttachmentUploadRequest) Allows you to confirm that the attachment has been uploaded using the pre-signed URL provided in StartAttachmentUpload API. A conflict exception is thrown when an attachment with that identifier is already being uploaded.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
CompleteAttachmentUploadRequest.Builder
avoiding the need to create one manually viaCompleteAttachmentUploadRequest.builder()
- Parameters:
completeAttachmentUploadRequest
- AConsumer
that will call methods onCompleteAttachmentUploadRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CompleteAttachmentUpload operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- ServiceQuotaExceededException The number of attachments per contact exceeds the quota.
- ConflictException The requested operation conflicts with the current state of a service resource associated with the request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createParticipantConnection
default CompletableFuture<CreateParticipantConnectionResponse> createParticipantConnection(CreateParticipantConnectionRequest createParticipantConnectionRequest) Creates the participant's connection.
ParticipantToken
is used for invoking this API instead ofConnectionToken
.The participant token is valid for the lifetime of the participant – until they are part of a contact.
The response URL for
WEBSOCKET
Type has a connect expiry timeout of 100s. Clients must manually connect to the returned websocket URL and subscribe to the desired topic.For chat, you need to publish the following on the established websocket connection:
{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter, clients need to call this API again to obtain a new websocket URL and perform the same steps as before.
Message streaming support: This API can also be used together with the StartContactStreaming API to create a participant connection for chat contacts that are not using a websocket. For more information about message streaming, Enable real-time chat message streaming in the Amazon Connect Administrator Guide.
Feature specifications: For information about feature specifications, such as the allowed number of open websocket connections per participant, see Feature specifications in the Amazon Connect Administrator Guide.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
createParticipantConnectionRequest
-- Returns:
- A Java Future containing the result of the CreateParticipantConnection operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createParticipantConnection
default CompletableFuture<CreateParticipantConnectionResponse> createParticipantConnection(Consumer<CreateParticipantConnectionRequest.Builder> createParticipantConnectionRequest) Creates the participant's connection.
ParticipantToken
is used for invoking this API instead ofConnectionToken
.The participant token is valid for the lifetime of the participant – until they are part of a contact.
The response URL for
WEBSOCKET
Type has a connect expiry timeout of 100s. Clients must manually connect to the returned websocket URL and subscribe to the desired topic.For chat, you need to publish the following on the established websocket connection:
{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter, clients need to call this API again to obtain a new websocket URL and perform the same steps as before.
Message streaming support: This API can also be used together with the StartContactStreaming API to create a participant connection for chat contacts that are not using a websocket. For more information about message streaming, Enable real-time chat message streaming in the Amazon Connect Administrator Guide.
Feature specifications: For information about feature specifications, such as the allowed number of open websocket connections per participant, see Feature specifications in the Amazon Connect Administrator Guide.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
CreateParticipantConnectionRequest.Builder
avoiding the need to create one manually viaCreateParticipantConnectionRequest.builder()
- Parameters:
createParticipantConnectionRequest
- AConsumer
that will call methods onCreateParticipantConnectionRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateParticipantConnection operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeView
default CompletableFuture<DescribeViewResponse> describeView(DescribeViewRequest describeViewRequest) Retrieves the view for the specified view token.
- Parameters:
describeViewRequest
-- Returns:
- A Java Future containing the result of the DescribeView operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ResourceNotFoundException The resource was not found.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeView
default CompletableFuture<DescribeViewResponse> describeView(Consumer<DescribeViewRequest.Builder> describeViewRequest) Retrieves the view for the specified view token.
This is a convenience which creates an instance of the
DescribeViewRequest.Builder
avoiding the need to create one manually viaDescribeViewRequest.builder()
- Parameters:
describeViewRequest
- AConsumer
that will call methods onDescribeViewRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DescribeView operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ResourceNotFoundException The resource was not found.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
disconnectParticipant
default CompletableFuture<DisconnectParticipantResponse> disconnectParticipant(DisconnectParticipantRequest disconnectParticipantRequest) Disconnects a participant.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
disconnectParticipantRequest
-- Returns:
- A Java Future containing the result of the DisconnectParticipant operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
disconnectParticipant
default CompletableFuture<DisconnectParticipantResponse> disconnectParticipant(Consumer<DisconnectParticipantRequest.Builder> disconnectParticipantRequest) Disconnects a participant.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
DisconnectParticipantRequest.Builder
avoiding the need to create one manually viaDisconnectParticipantRequest.builder()
- Parameters:
disconnectParticipantRequest
- AConsumer
that will call methods onDisconnectParticipantRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DisconnectParticipant operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAttachment
default CompletableFuture<GetAttachmentResponse> getAttachment(GetAttachmentRequest getAttachmentRequest) Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
getAttachmentRequest
-- Returns:
- A Java Future containing the result of the GetAttachment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAttachment
default CompletableFuture<GetAttachmentResponse> getAttachment(Consumer<GetAttachmentRequest.Builder> getAttachmentRequest) Provides a pre-signed URL for download of a completed attachment. This is an asynchronous API for use with active contacts.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
GetAttachmentRequest.Builder
avoiding the need to create one manually viaGetAttachmentRequest.builder()
- Parameters:
getAttachmentRequest
- AConsumer
that will call methods onGetAttachmentRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetAttachment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getTranscript
default CompletableFuture<GetTranscriptResponse> getTranscript(GetTranscriptRequest getTranscriptRequest) Retrieves a transcript of the session, including details about any attachments. For information about accessing past chat contact transcripts for a persistent chat, see Enable persistent chat.
If you have a process that consumes events in the transcript of an chat that has ended, note that chat transcripts contain the following event content types if the event has occurred during the chat session:
-
application/vnd.amazonaws.connect.event.participant.left
-
application/vnd.amazonaws.connect.event.participant.joined
-
application/vnd.amazonaws.connect.event.chat.ended
-
application/vnd.amazonaws.connect.event.transfer.succeeded
-
application/vnd.amazonaws.connect.event.transfer.failed
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
getTranscriptRequest
-- Returns:
- A Java Future containing the result of the GetTranscript operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getTranscript
default CompletableFuture<GetTranscriptResponse> getTranscript(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest) Retrieves a transcript of the session, including details about any attachments. For information about accessing past chat contact transcripts for a persistent chat, see Enable persistent chat.
If you have a process that consumes events in the transcript of an chat that has ended, note that chat transcripts contain the following event content types if the event has occurred during the chat session:
-
application/vnd.amazonaws.connect.event.participant.left
-
application/vnd.amazonaws.connect.event.participant.joined
-
application/vnd.amazonaws.connect.event.chat.ended
-
application/vnd.amazonaws.connect.event.transfer.succeeded
-
application/vnd.amazonaws.connect.event.transfer.failed
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
GetTranscriptRequest.Builder
avoiding the need to create one manually viaGetTranscriptRequest.builder()
- Parameters:
getTranscriptRequest
- AConsumer
that will call methods onGetTranscriptRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetTranscript operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getTranscriptPaginator
This is a variant of
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation.- Parameters:
getTranscriptRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getTranscriptPaginator
default GetTranscriptPublisher getTranscriptPaginator(Consumer<GetTranscriptRequest.Builder> getTranscriptRequest) This is a variant of
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTranscript(software.amazon.awssdk.services.connectparticipant.model.GetTranscriptRequest)
operation.
This is a convenience which creates an instance of the
GetTranscriptRequest.Builder
avoiding the need to create one manually viaGetTranscriptRequest.builder()
- Parameters:
getTranscriptRequest
- AConsumer
that will call methods onGetTranscriptRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
sendEvent
The
application/vnd.amazonaws.connect.event.connection.acknowledged
ContentType will no longer be supported starting December 31, 2024. This event has been migrated to the CreateParticipantConnection API using theConnectParticipant
field.Sends an event. Message receipts are not supported when there are more than two active participants in the chat. Using the SendEvent API for message receipts when a supervisor is barged-in will result in a conflict exception.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
sendEventRequest
-- Returns:
- A Java Future containing the result of the SendEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- ConflictException The requested operation conflicts with the current state of a service resource associated with the request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
sendEvent
default CompletableFuture<SendEventResponse> sendEvent(Consumer<SendEventRequest.Builder> sendEventRequest) The
application/vnd.amazonaws.connect.event.connection.acknowledged
ContentType will no longer be supported starting December 31, 2024. This event has been migrated to the CreateParticipantConnection API using theConnectParticipant
field.Sends an event. Message receipts are not supported when there are more than two active participants in the chat. Using the SendEvent API for message receipts when a supervisor is barged-in will result in a conflict exception.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
SendEventRequest.Builder
avoiding the need to create one manually viaSendEventRequest.builder()
- Parameters:
sendEventRequest
- AConsumer
that will call methods onSendEventRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the SendEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- ConflictException The requested operation conflicts with the current state of a service resource associated with the request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
sendMessage
Sends a message.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
sendMessageRequest
-- Returns:
- A Java Future containing the result of the SendMessage operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
sendMessage
default CompletableFuture<SendMessageResponse> sendMessage(Consumer<SendMessageRequest.Builder> sendMessageRequest) Sends a message.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
SendMessageRequest.Builder
avoiding the need to create one manually viaSendMessageRequest.builder()
- Parameters:
sendMessageRequest
- AConsumer
that will call methods onSendMessageRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the SendMessage operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startAttachmentUpload
default CompletableFuture<StartAttachmentUploadResponse> startAttachmentUpload(StartAttachmentUploadRequest startAttachmentUploadRequest) Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
- Parameters:
startAttachmentUploadRequest
-- Returns:
- A Java Future containing the result of the StartAttachmentUpload operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- ServiceQuotaExceededException The number of attachments per contact exceeds the quota.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startAttachmentUpload
default CompletableFuture<StartAttachmentUploadResponse> startAttachmentUpload(Consumer<StartAttachmentUploadRequest.Builder> startAttachmentUploadRequest) Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
ConnectionToken
is used for invoking this API instead ofParticipantToken
.The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
This is a convenience which creates an instance of the
StartAttachmentUploadRequest.Builder
avoiding the need to create one manually viaStartAttachmentUploadRequest.builder()
- Parameters:
startAttachmentUploadRequest
- AConsumer
that will call methods onStartAttachmentUploadRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the StartAttachmentUpload operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- InternalServerException This exception occurs when there is an internal failure in the Amazon Connect service.
- ThrottlingException The request was denied due to request throttling.
- ValidationException The input fails to satisfy the constraints specified by Amazon Connect.
- ServiceQuotaExceededException The number of attachments per contact exceeds the quota.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- ConnectParticipantException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aConnectParticipantAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aConnectParticipantAsyncClient
.
-