@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface ConnectParticipantAsyncClient extends AwsClient
builder() method.
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static ConnectParticipantAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
ConnectParticipantAsyncClient. |
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.
|
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.
|
static ConnectParticipantAsyncClient |
create()
Create a
ConnectParticipantAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<CreateParticipantConnectionResponse> |
createParticipantConnection(Consumer<CreateParticipantConnectionRequest.Builder> createParticipantConnectionRequest)
Creates the participant's connection.
|
default CompletableFuture<CreateParticipantConnectionResponse> |
createParticipantConnection(CreateParticipantConnectionRequest createParticipantConnectionRequest)
Creates the participant's connection.
|
default CompletableFuture<DisconnectParticipantResponse> |
disconnectParticipant(Consumer<DisconnectParticipantRequest.Builder> disconnectParticipantRequest)
Disconnects a participant.
|
default CompletableFuture<DisconnectParticipantResponse> |
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)
Retrieves a transcript of the session, including details about any attachments.
|
default GetTranscriptPublisher |
getTranscriptPaginator(GetTranscriptRequest getTranscriptRequest)
Retrieves a transcript of the session, including details about any attachments.
|
default CompletableFuture<SendEventResponse> |
sendEvent(Consumer<SendEventRequest.Builder> sendEventRequest)
Sends an event.
|
default CompletableFuture<SendEventResponse> |
sendEvent(SendEventRequest sendEventRequest)
Sends an event.
|
default CompletableFuture<SendMessageResponse> |
sendMessage(Consumer<SendMessageRequest.Builder> sendMessageRequest)
Sends a message.
|
default CompletableFuture<SendMessageResponse> |
sendMessage(SendMessageRequest sendMessageRequest)
Sends a message.
|
default ConnectParticipantServiceClientConfiguration |
serviceClientConfiguration() |
default CompletableFuture<StartAttachmentUploadResponse> |
startAttachmentUpload(Consumer<StartAttachmentUploadRequest.Builder> startAttachmentUploadRequest)
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
|
default CompletableFuture<StartAttachmentUploadResponse> |
startAttachmentUpload(StartAttachmentUploadRequest startAttachmentUploadRequest)
Provides a pre-signed Amazon S3 URL in response for uploading the file directly to S3.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.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.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
completeAttachmentUploadRequest - 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.
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()
completeAttachmentUploadRequest - A Consumer that will call methods on CompleteAttachmentUploadRequest.Builder to create a
request.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.
createParticipantConnectionRequest - 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()
createParticipantConnectionRequest - A Consumer that will call methods on CreateParticipantConnectionRequest.Builder to create
a request.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.
disconnectParticipantRequest - 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()
disconnectParticipantRequest - A Consumer that will call methods on DisconnectParticipantRequest.Builder to create a
request.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.
getAttachmentRequest - 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()
getAttachmentRequest - A Consumer that will call methods on GetAttachmentRequest.Builder to create a request.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.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
getTranscriptRequest - 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.
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()
getTranscriptRequest - A Consumer that will call methods on GetTranscriptRequest.Builder to create a request.default GetTranscriptPublisher getTranscriptPaginator(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.
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 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.
getTranscriptRequest - default GetTranscriptPublisher getTranscriptPaginator(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.
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 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()
getTranscriptRequest - A Consumer that will call methods on GetTranscriptRequest.Builder to create a request.default CompletableFuture<SendEventResponse> sendEvent(SendEventRequest sendEventRequest)
Sends an event.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
sendEventRequest - default CompletableFuture<SendEventResponse> sendEvent(Consumer<SendEventRequest.Builder> sendEventRequest)
Sends an event.
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()
sendEventRequest - A Consumer that will call methods on SendEventRequest.Builder to create a request.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.
sendMessageRequest - 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()
sendMessageRequest - A Consumer that will call methods on SendMessageRequest.Builder to create a request.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.
startAttachmentUploadRequest - 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()
startAttachmentUploadRequest - A Consumer that will call methods on StartAttachmentUploadRequest.Builder to create a
request.default ConnectParticipantServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientstatic ConnectParticipantAsyncClient create()
ConnectParticipantAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static ConnectParticipantAsyncClientBuilder builder()
ConnectParticipantAsyncClient.Copyright © 2023. All rights reserved.