Interface SentClientAsync
-
- All Implemented Interfaces:
public interface SentClientAsyncA client for interacting with the Sent REST API asynchronously. You can also switch to synchronous execution via the sync method.
This client performs best when you create a single instance and reuse it for all interactions with the REST API. This is because each client holds its own connection pool and thread pools. Reusing connections and threads reduces latency and saves memory. The client also handles rate limiting per client. This means that creating and using multiple instances at the same time will not respect rate limits.
The threads and connections that are held will be released automatically if they remain idle. But if you are writing an application that needs to aggressively release unused resources, then you may call close.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSentClientAsync.WithRawResponseA view of SentClientAsync that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract SentClientsync()Returns a version of this client that uses synchronous execution. abstract SentClientAsync.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. abstract SentClientAsyncwithOptions(Consumer<ClientOptions.Builder> modifier)Returns a view of this service with the given option modifications applied. abstract WebhookServiceAsyncwebhooks()Configure webhook endpoints for real-time event delivery abstract UserServiceAsyncusers()Invite, update, and manage organization users and roles abstract TemplateServiceAsynctemplates()Manage message templates with variable substitution abstract ProfileServiceAsyncprofiles()Manage organization profiles abstract NumberServiceAsyncnumbers()Manage and lookup phone numbers abstract MessageServiceAsyncmessages()Send and track SMS and WhatsApp messages abstract ContactServiceAsynccontacts()Create, update, and manage customer contact lists abstract MeServiceAsyncme()Retrieve account details abstract Unitclose()Closes this client, relinquishing any underlying resources. -
-
Method Detail
-
sync
abstract SentClient sync()
Returns a version of this client that uses synchronous execution.
The returned client shares its resources, like its connection pool and thread pools, with this client.
-
withRawResponse
abstract SentClientAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract SentClientAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
webhooks
abstract WebhookServiceAsync webhooks()
Configure webhook endpoints for real-time event delivery
-
users
abstract UserServiceAsync users()
Invite, update, and manage organization users and roles
-
templates
abstract TemplateServiceAsync templates()
Manage message templates with variable substitution
-
profiles
abstract ProfileServiceAsync profiles()
Manage organization profiles
-
numbers
abstract NumberServiceAsync numbers()
Manage and lookup phone numbers
-
messages
abstract MessageServiceAsync messages()
Send and track SMS and WhatsApp messages
-
contacts
abstract ContactServiceAsync contacts()
Create, update, and manage customer contact lists
-
me
abstract MeServiceAsync me()
Retrieve account details
-
close
abstract Unit close()
Closes this client, relinquishing any underlying resources.
This is purposefully not inherited from AutoCloseable because the client is long-lived and usually should not be synchronously closed via try-with-resources.
It's also usually not necessary to call this method at all. the default HTTP client automatically releases threads and connections if they remain idle, but if you are writing an application that needs to aggressively release unused resources, then you may call this method.
-
-
-
-