Interface ConnectParticipantAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface ConnectParticipantAsyncClient extends AwsClient
Service client for accessing Amazon Connect Participant asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any
invalid reference
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 Details

  • 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 of ParticipantToken.

      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 invoke Throwable.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 of ParticipantToken.

      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 via CompleteAttachmentUploadRequest.builder()

      Parameters:
      completeAttachmentUploadRequest - A Consumer that will call methods on CompleteAttachmentUploadRequest.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 invoke Throwable.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 of ConnectionToken.

      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 invoke Throwable.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 of ConnectionToken.

      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 via CreateParticipantConnectionRequest.builder()

      Parameters:
      createParticipantConnectionRequest - A Consumer that will call methods on CreateParticipantConnectionRequest.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 invoke Throwable.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 invoke Throwable.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 via DescribeViewRequest.builder()

      Parameters:
      describeViewRequest - A Consumer that will call methods on DescribeViewRequest.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 invoke Throwable.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 of ParticipantToken.

      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 invoke Throwable.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 of ParticipantToken.

      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 via DisconnectParticipantRequest.builder()

      Parameters:
      disconnectParticipantRequest - A Consumer that will call methods on DisconnectParticipantRequest.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 invoke Throwable.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 of ParticipantToken.

      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 invoke Throwable.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 of ParticipantToken.

      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 via GetAttachmentRequest.builder()

      Parameters:
      getAttachmentRequest - A Consumer that will call methods on GetAttachmentRequest.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 invoke Throwable.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 of ParticipantToken.

      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 invoke Throwable.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 of ParticipantToken.

      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 via GetTranscriptRequest.builder()

      Parameters:
      getTranscriptRequest - A Consumer that will call methods on GetTranscriptRequest.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 invoke Throwable.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(GetTranscriptRequest 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 new Subscription 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 method
       
       software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 invoke Throwable.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 new Subscription 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 method
       
       software.amazon.awssdk.services.connectparticipant.paginators.GetTranscriptPublisher publisher = client.getTranscriptPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 via GetTranscriptRequest.builder()

      Parameters:
      getTranscriptRequest - A Consumer that will call methods on GetTranscriptRequest.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 invoke Throwable.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

      default CompletableFuture<SendEventResponse> sendEvent(SendEventRequest 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 the ConnectParticipant 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 of ParticipantToken.

      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 invoke Throwable.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 the ConnectParticipant 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 of ParticipantToken.

      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 via SendEventRequest.builder()

      Parameters:
      sendEventRequest - A Consumer that will call methods on SendEventRequest.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 invoke Throwable.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

      default CompletableFuture<SendMessageResponse> sendMessage(SendMessageRequest sendMessageRequest)

      Sends a message.

      ConnectionToken is used for invoking this API instead of ParticipantToken.

      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 invoke Throwable.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 of ParticipantToken.

      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 via SendMessageRequest.builder()

      Parameters:
      sendMessageRequest - A Consumer that will call methods on SendMessageRequest.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 invoke Throwable.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 of ParticipantToken.

      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 invoke Throwable.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 of ParticipantToken.

      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 via StartAttachmentUploadRequest.builder()

      Parameters:
      startAttachmentUploadRequest - A Consumer that will call methods on StartAttachmentUploadRequest.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 invoke Throwable.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

      default ConnectParticipantServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      Create a ConnectParticipantAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a ConnectParticipantAsyncClient.