See: Description
Interface | Description |
---|---|
CallbackWrapper |
This interface provides a method for wrapping a
FutureCallback such
that additional logic can be introduced to the callback. |
Class | Description |
---|---|
ApiConnection |
An abstract representation of an XMS connection.
|
ApiConnection.Builder |
A builder of API connections.
|
ApiHttpAsyncClient |
An asynchronous HTTP client used in API connections.
|
ApiObjectMapper |
A Jackson object mapper suitable for use with the CLX REST API objects.
|
BatchDeliveryReportParams |
Describes the a filter that restricts and controls how a batch delivery
report is returned.
|
BatchDeliveryReportParams.Builder |
A builder of batch delivery report filters.
|
BatchFilter |
Describes a filter for limiting results when fetching batches.
|
BatchFilter.Builder |
A builder of batch filters.
|
ClxApi |
A collection of convenient static methods for building XMS objects.
|
GroupFilter |
Describes a filter for limiting results when fetching groups.
|
GroupFilter.Builder |
A builder of group filters.
|
InboundsFilter |
Describes a filter for limiting results when fetching inbound messages.
|
InboundsFilter.Builder |
A builder of inbound messages filter.
|
PagedFetcher<T> |
Used for API calls that emits their result over multiple pages.
|
UpdateValue<T> |
Wrapper class for API objects used for update API methods.
|
Utils |
This class holds a number of static convenience methods for use within the
SDK.
|
Version |
A container of some static information concerning this CLX SDK.
|
Enum | Description |
---|---|
BatchDeliveryReportParams.ReportType |
The delivery report types that can be retrieved.
|
Exception | Description |
---|---|
ApiException |
Base class for all exceptions specific to the CLX SDK.
|
ConcurrentException |
An exception that wraps checked exceptions.
|
ErrorResponseException |
Exception representing an error response from XMS.
|
NotFoundException |
Exception thrown when an API connection receives a 404 response from the REST
API.
|
RuntimeApiException |
A wrapper of
ApiException for use where checked exceptions cannot be
thrown. |
UnauthorizedException |
Exception indicating that the service plan ID and authentication token were
invalid.
|
UnexpectedResponseException |
Exception thrown when an API connection receives a response from the REST API
that is neither a success response nor an API level error.
|
The typical use case of this library is to create a long lived
ApiConnection
object which is then used to
submit batches and perform other interaction with the XMS endpoint.
As a simple initial example we can consider a program that, when run, sends a single SMS and exits.
import com.clxcommunications.xms.ApiConnection; import com.clxcommunications.xms.ClxApi; import com.clxcommunications.xms.api.MtBatchTextSmsResult; public class Example { public static void main(String[] args) { ApiConnection conn = ApiConnection.builder() .servicePlanId("my spid") .token("my token") .start(); try { MtBatchTextSmsResult result = conn.createBatch(ClxApi.batchTextSms() .sender("my short code") .addRecipient("my destination") .body("my message") .build()); System.out.println("The batch ID is " + result.id()); } catch (Exception e) { System.err.println("Failed to send message: " + e.getMessage()); } } }
Copyright © 2016–2019 CLX Communications. All rights reserved.