@Value.Immutable(copy=false) public abstract class ApiConnection extends Object implements Closeable
To instantiate this class it is necessary to use a builder, see
builder()
. The builder can be used to configure the connection as
necessary, once the connection is opened with ApiConnection.Builder.start()
or
start()
it is necessary to later close the connection using
close()
.
Modifier and Type | Class and Description |
---|---|
static class |
ApiConnection.Builder
A builder of API connections.
|
Modifier and Type | Field and Description |
---|---|
static URI |
DEFAULT_ENDPOINT
The default endpoint of this API connection.
|
Modifier and Type | Method and Description |
---|---|
static ApiConnection.Builder |
builder()
Returns a fresh builder of API connections.
|
CallbackWrapper |
callbackWrapper()
The future callback wrapper to use in all API calls.
|
MtBatchSmsResult |
cancelBatch(BatchId batchId)
Cancels the batch with the given batch ID.
|
Future<MtBatchSmsResult> |
cancelBatchAsync(BatchId batchId,
FutureCallback<MtBatchSmsResult> callback)
Cancels the batch with the given batch ID.
|
protected void |
check()
Validates that this object is in a coherent state.
|
void |
close()
Closes this API connection and releases associated resources.
|
MtBatchBinarySmsResult |
createBatch(MtBatchBinarySmsCreate sms)
Creates the given batch and schedules it for submission.
|
MtBatchTextSmsResult |
createBatch(MtBatchTextSmsCreate sms)
Creates the given batch and schedules it for submission.
|
Future<MtBatchBinarySmsResult> |
createBatchAsync(MtBatchBinarySmsCreate sms,
FutureCallback<MtBatchBinarySmsResult> callback)
Asynchronously creates the given binary batch and schedules it for
submission.
|
Future<MtBatchTextSmsResult> |
createBatchAsync(MtBatchTextSmsCreate sms,
FutureCallback<MtBatchTextSmsResult> callback)
Asynchronously creates the given text batch and schedules it for
submission.
|
MtBatchDryRunResult |
createBatchDryRun(MtBatchSmsCreate sms,
Boolean perRecipient,
Integer numRecipients)
Attempts to perform a dry run of the given batch.
|
Future<MtBatchDryRunResult> |
createBatchDryRunAsync(MtBatchSmsCreate sms,
Boolean perRecipient,
Integer numRecipients,
FutureCallback<MtBatchDryRunResult> callback)
Asynchronously performs a dry run of the given batch.
|
GroupResult |
createGroup(GroupCreate group)
Attempts to create the given group synchronously.
|
Future<GroupResult> |
createGroupAsync(GroupCreate group,
FutureCallback<GroupResult> callback)
Asynchronously creates the given group.
|
void |
deleteGroup(GroupId id)
Deletes the given group.
|
Future<Void> |
deleteGroupAsync(GroupId id,
FutureCallback<Void> callback)
Asynchronously deletes the group with the given group ID.
|
URI |
endpoint()
The base endpoint of the XMS API.
|
protected HttpHost |
endpointHost()
The HTTP host providing the XMS API.
|
MtBatchSmsResult |
fetchBatch(BatchId id)
Fetches the given batch.
|
Future<MtBatchSmsResult> |
fetchBatchAsync(BatchId batchId,
FutureCallback<MtBatchSmsResult> callback)
Fetches a batch with the given batch ID.
|
PagedFetcher<MtBatchSmsResult> |
fetchBatches(BatchFilter filter)
Creates a page fetcher to retrieve a paged list of batches.
|
BatchDeliveryReport |
fetchDeliveryReport(BatchId id,
BatchDeliveryReportParams filter)
Fetches a delivery report for the batch with the given batch ID.
|
RecipientDeliveryReport |
fetchDeliveryReport(BatchId id,
String recipient)
Fetches a delivery report for the batch with the given batch ID and
recipient.
|
Future<BatchDeliveryReport> |
fetchDeliveryReportAsync(BatchId id,
BatchDeliveryReportParams filter,
FutureCallback<BatchDeliveryReport> callback)
Fetches a delivery report for the batch with the given batch ID.
|
Future<RecipientDeliveryReport> |
fetchDeliveryReportAsync(BatchId id,
String recipient,
FutureCallback<RecipientDeliveryReport> callback)
Fetches a delivery report for the batch with the given batch ID and
recipient.
|
GroupResult |
fetchGroup(GroupId id)
Attempts to fetch the given group.
|
Future<GroupResult> |
fetchGroupAsync(GroupId id,
FutureCallback<GroupResult> callback)
Asynchronously fetches the given group.
|
Set<String> |
fetchGroupMembers(GroupId id)
Attempts to fetch the members of the given group synchronously.
|
Future<Set<String>> |
fetchGroupMembersAsync(GroupId id,
FutureCallback<Set<String>> callback)
Asynchronously fetches the members of the given group.
|
PagedFetcher<GroupResult> |
fetchGroups(GroupFilter filter)
Creates a page fetcher to retrieve a paged list of groups.
|
MoSms |
fetchInbound(String id)
Fetches the inbound message having the given identifier.
|
Future<MoSms> |
fetchInboundAsync(String id,
FutureCallback<MoSms> callback)
Fetches the inbound message having the given identifier.
|
PagedFetcher<MoSms> |
fetchInbounds(InboundsFilter filter)
Creates a page fetcher to retrieve a paged list of inbound messages.
|
Tags |
fetchTags(BatchId id)
Fetches the tags of the batch with the given batch ID.
|
Tags |
fetchTags(GroupId id)
Fetches the tags of the group with the given identifier.
|
Future<Tags> |
fetchTagsAsync(BatchId id,
FutureCallback<Tags> callback)
Fetches the tags of the batch with the given batch ID.
|
Future<Tags> |
fetchTagsAsync(GroupId id,
FutureCallback<Tags> callback)
Fetches the tags of the group with the given identifier.
|
HttpAsyncClient |
httpClient()
The HTTP client used by this connection.
|
boolean |
prettyPrintJson()
Whether the JSON sent to the server should be printed with indentation.
|
MtBatchBinarySmsResult |
replaceBatch(BatchId id,
MtBatchBinarySmsCreate sms)
Replaces the batch with the given identifier.
|
MtBatchTextSmsResult |
replaceBatch(BatchId id,
MtBatchTextSmsCreate sms)
Replaces the batch with the given identifier.
|
Future<MtBatchBinarySmsResult> |
replaceBatchAsync(BatchId id,
MtBatchBinarySmsCreate sms,
FutureCallback<MtBatchBinarySmsResult> callback)
Asynchronously replaces the batch with the given identifier.
|
Future<MtBatchTextSmsResult> |
replaceBatchAsync(BatchId id,
MtBatchTextSmsCreate sms,
FutureCallback<MtBatchTextSmsResult> callback)
Asynchronously replaces the batch with the given identifier.
|
GroupResult |
replaceGroup(GroupId id,
GroupCreate group)
Replaces the given group.
|
Future<GroupResult> |
replaceGroupAsync(GroupId id,
GroupCreate group,
FutureCallback<GroupResult> callback)
Asynchronously replaces the group with the given group ID.
|
Tags |
replaceTags(BatchId id,
Tags tags)
Replaces the tags of the batch with the given batch ID.
|
Tags |
replaceTags(GroupId id,
Tags tags)
Replaces the tags of the group with the given identifier.
|
Future<Tags> |
replaceTagsAsync(BatchId id,
Tags tags,
FutureCallback<Tags> callback)
Replaces the tags of the batch with the given batch ID.
|
Future<Tags> |
replaceTagsAsync(GroupId id,
Tags tags,
FutureCallback<Tags> callback)
Replaces the tags of the group with the given identifier.
|
abstract String |
servicePlanId()
The XMS service plan identifier.
|
void |
start()
Starts up this API connection.
|
abstract String |
token()
The XMS authentication token.
|
MtBatchBinarySmsResult |
updateBatch(BatchId id,
MtBatchBinarySmsUpdate sms)
Updates the given binary batch.
|
MtBatchTextSmsResult |
updateBatch(BatchId id,
MtBatchTextSmsUpdate sms)
Updates the given text batch.
|
Future<MtBatchBinarySmsResult> |
updateBatchAsync(BatchId batchId,
MtBatchBinarySmsUpdate sms,
FutureCallback<MtBatchBinarySmsResult> callback)
Asynchronously updates the binary batch with the given batch ID.
|
Future<MtBatchTextSmsResult> |
updateBatchAsync(BatchId batchId,
MtBatchTextSmsUpdate sms,
FutureCallback<MtBatchTextSmsResult> callback)
Asynchronously updates the text batch with the given batch ID.
|
GroupResult |
updateGroup(GroupId id,
GroupUpdate group)
Updates the given group.
|
Future<GroupResult> |
updateGroupAsync(GroupId id,
GroupUpdate group,
FutureCallback<GroupResult> callback)
Asynchronously updates the group with the given group ID.
|
Tags |
updateTags(BatchId id,
TagsUpdate tags)
Updates the tags of the batch with the given batch ID.
|
Tags |
updateTags(GroupId id,
TagsUpdate tags)
Updates the tags of the group with the given identifier.
|
Future<Tags> |
updateTagsAsync(BatchId id,
TagsUpdate tags,
FutureCallback<Tags> callback)
Updates the tags of the batch with the given batch ID.
|
Future<Tags> |
updateTagsAsync(GroupId id,
TagsUpdate tags,
FutureCallback<Tags> callback)
Updates the tags of the group with the given identifier.
|
public static final URI DEFAULT_ENDPOINT
@Nonnull public static ApiConnection.Builder builder()
public void start()
public void close() throws IOException
Note, this will not shut down the HTTP client if the API
connection was initialized with a custom http
client
.
close
in interface Closeable
close
in interface AutoCloseable
IOException
Closeable.close()
public abstract String token()
public abstract String servicePlanId()
@Value.Default public boolean prettyPrintJson()
@Value.Default public HttpAsyncClient httpClient()
Note, when this API connection is closed then this HTTP client is also
closed only if the default HTTP client is used. That is, if
ApiConnectionImpl.Builder.httpClient(HttpAsyncClient)
was used to initialize using
an external HttpAsyncClient
then this client must also be started
up and shut down externally.
@Value.Default public CallbackWrapper callbackWrapper()
CallbackWrapper.exceptionDropper
, that is, any exception thrown
in a given callback is logged and dropped.@Value.Default public URI endpoint()
@Value.Derived protected HttpHost endpointHost()
@Value.Check protected void check()
public MtBatchTextSmsResult createBatch(MtBatchTextSmsCreate sms) throws InterruptedException, ApiException
MtBatchSmsCreate.sendAt()
returns null
then the
batch submission will begin immediately.
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
createBatchAsync(MtBatchTextSmsCreate, FutureCallback)
instead.
sms
- the batch to createInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchTextSmsResult> createBatchAsync(MtBatchTextSmsCreate sms, FutureCallback<MtBatchTextSmsResult> callback)
MtBatchSmsCreate.sendAt()
returns
null
then the batch submission will begin immediately.sms
- the batch to createcallback
- a callback that is invoked when batch is createdpublic MtBatchBinarySmsResult createBatch(MtBatchBinarySmsCreate sms) throws InterruptedException, ApiException
MtBatchSmsCreate.sendAt()
returns null
then
the batch submission will begin immediately.
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
createBatchAsync(MtBatchBinarySmsCreate, FutureCallback)
instead.
sms
- the batch to createInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchBinarySmsResult> createBatchAsync(MtBatchBinarySmsCreate sms, FutureCallback<MtBatchBinarySmsResult> callback)
MtBatchSmsCreate.sendAt()
returns
null
then the batch submission will begin immediately.sms
- the batch to createcallback
- a callback that is invoked when batch is createdpublic MtBatchTextSmsResult replaceBatch(BatchId id, MtBatchTextSmsCreate sms) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
replaceBatchAsync(BatchId, MtBatchTextSmsCreate, FutureCallback)
instead.
id
- identifier of the batch to replacesms
- the batch descriptionInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchTextSmsResult> replaceBatchAsync(BatchId id, MtBatchTextSmsCreate sms, FutureCallback<MtBatchTextSmsResult> callback)
id
- identifier of the batch to replacesms
- the new batch descriptioncallback
- a callback that is invoked when replace is completedpublic MtBatchBinarySmsResult replaceBatch(BatchId id, MtBatchBinarySmsCreate sms) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
replaceBatchAsync(BatchId, MtBatchBinarySmsCreate, FutureCallback)
instead.
id
- identifier of the batch to replacesms
- the batch descriptionInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchBinarySmsResult> replaceBatchAsync(BatchId id, MtBatchBinarySmsCreate sms, FutureCallback<MtBatchBinarySmsResult> callback)
id
- identifier of the batch to replacesms
- the new batch descriptioncallback
- a callback that is invoked when replace is completedpublic MtBatchTextSmsResult updateBatch(BatchId id, MtBatchTextSmsUpdate sms) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
updateBatchAsync(BatchId, MtBatchTextSmsUpdate, FutureCallback)
instead.
id
- identifier of the batch to updatesms
- a description of the desired updatedInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchTextSmsResult> updateBatchAsync(BatchId batchId, MtBatchTextSmsUpdate sms, FutureCallback<MtBatchTextSmsResult> callback)
batchId
- the batch that should be updatedsms
- description of the desired updatecallback
- called at call success, failure, or cancellationpublic MtBatchBinarySmsResult updateBatch(BatchId id, MtBatchBinarySmsUpdate sms) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
updateBatchAsync(BatchId, MtBatchBinarySmsUpdate, FutureCallback)
instead.
id
- identifier of the batch to updatesms
- a description of the desired updatedInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchBinarySmsResult> updateBatchAsync(BatchId batchId, MtBatchBinarySmsUpdate sms, FutureCallback<MtBatchBinarySmsResult> callback)
batchId
- the batch that should be updatedsms
- description of the desired updatecallback
- called at call success, failure, or cancellationpublic MtBatchSmsResult fetchBatch(BatchId id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchBatchAsync(BatchId, FutureCallback)
instead.
id
- identifier of the batch to fetchInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchSmsResult> fetchBatchAsync(BatchId batchId, FutureCallback<MtBatchSmsResult> callback)
batchId
- ID of the batch to fetchcallback
- a callback that is activated at call completionpublic PagedFetcher<MtBatchSmsResult> fetchBatches(BatchFilter filter)
filter
- the batch filterpublic MtBatchSmsResult cancelBatch(BatchId batchId) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
cancelBatchAsync(BatchId, FutureCallback)
instead.
batchId
- identifier of the batch to deleteInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchSmsResult> cancelBatchAsync(BatchId batchId, FutureCallback<MtBatchSmsResult> callback)
batchId
- identifier of the batch to deletecallback
- the callback invoked when request completespublic MtBatchDryRunResult createBatchDryRun(MtBatchSmsCreate sms, Boolean perRecipient, Integer numRecipients) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
createBatchDryRunAsync(MtBatchSmsCreate, Boolean, Integer, FutureCallback)
instead.
sms
- the batch to dry runperRecipient
- whether the per-recipient result should be populatednumRecipients
- the number of recipients to populateInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MtBatchDryRunResult> createBatchDryRunAsync(MtBatchSmsCreate sms, Boolean perRecipient, Integer numRecipients, FutureCallback<MtBatchDryRunResult> callback)
sms
- the batch to dry runperRecipient
- whether the per-recipient result should be populatednumRecipients
- the number of recipients to populatecallback
- a callback that is invoked when dry run is completepublic BatchDeliveryReport fetchDeliveryReport(BatchId id, BatchDeliveryReportParams filter) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchDeliveryReportAsync(BatchId, BatchDeliveryReportParams, FutureCallback)
instead.
id
- identifier of the batch whose delivery report to fetchfilter
- parameters controlling the response contentInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<BatchDeliveryReport> fetchDeliveryReportAsync(BatchId id, BatchDeliveryReportParams filter, FutureCallback<BatchDeliveryReport> callback)
id
- batch ID of the delivery report batch to fetchfilter
- parameters controlling the response contentcallback
- a callback that is activated at call completionpublic RecipientDeliveryReport fetchDeliveryReport(BatchId id, String recipient) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchDeliveryReportAsync(BatchId, String, FutureCallback)
instead.
id
- identifier of the batchrecipient
- MSISDN of recipientInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<RecipientDeliveryReport> fetchDeliveryReportAsync(BatchId id, String recipient, FutureCallback<RecipientDeliveryReport> callback)
id
- identifier of the batchrecipient
- MSISDN of recipientcallback
- a callback that is activated at call completionpublic Tags updateTags(BatchId id, TagsUpdate tags) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
updateTagsAsync(BatchId, TagsUpdate, FutureCallback)
instead.
id
- identifier of the batchtags
- the tag update objectInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Tags> updateTagsAsync(BatchId id, TagsUpdate tags, FutureCallback<Tags> callback)
id
- identifier of the batchtags
- the tag update objectcallback
- a callback that is activated at call completionpublic Tags replaceTags(BatchId id, Tags tags) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
replaceTagsAsync(BatchId, Tags, FutureCallback)
instead.
id
- identifier of the batchtags
- the replacements tagsInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Tags> replaceTagsAsync(BatchId id, Tags tags, FutureCallback<Tags> callback)
id
- identifier of the batchtags
- the replacement tagscallback
- a callback that is activated at call completionpublic Tags fetchTags(BatchId id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchTagsAsync(BatchId, FutureCallback)
instead.
id
- identifier of the batchInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Tags> fetchTagsAsync(BatchId id, FutureCallback<Tags> callback)
id
- identifier of the batchcallback
- a callback that is activated at call completionpublic GroupResult createGroup(GroupCreate group) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
createGroupAsync(GroupCreate, FutureCallback)
instead.
group
- the group to createInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<GroupResult> createGroupAsync(GroupCreate group, FutureCallback<GroupResult> callback)
group
- the group to createcallback
- a callback that is invoked when creation is completedpublic GroupResult fetchGroup(GroupId id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchGroupAsync(GroupId, FutureCallback)
instead.
id
- the group to fetchInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<GroupResult> fetchGroupAsync(GroupId id, FutureCallback<GroupResult> callback)
id
- the group to fetchcallback
- a callback that is invoked when fetching is completedpublic Set<String> fetchGroupMembers(GroupId id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchGroupMembersAsync(GroupId, FutureCallback)
instead.
id
- the group whose members should be fetchedInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Set<String>> fetchGroupMembersAsync(GroupId id, FutureCallback<Set<String>> callback)
id
- the group whose members should be fetchedcallback
- a callback that is invoked when fetching is completedpublic PagedFetcher<GroupResult> fetchGroups(GroupFilter filter)
filter
- the group filterpublic GroupResult updateGroup(GroupId id, GroupUpdate group) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
updateGroupAsync(GroupId, GroupUpdate, FutureCallback)
instead.
id
- identifier of the group to updategroup
- a description of the desired updatesInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<GroupResult> updateGroupAsync(GroupId id, GroupUpdate group, FutureCallback<GroupResult> callback)
id
- the group that should be updatedgroup
- description of the desired updatescallback
- called at call success, failure, or cancellationpublic GroupResult replaceGroup(GroupId id, GroupCreate group) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
replaceGroupAsync(GroupId, GroupCreate, FutureCallback)
instead.
id
- identifier of the group to replacegroup
- a description of the replacement groupInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<GroupResult> replaceGroupAsync(GroupId id, GroupCreate group, FutureCallback<GroupResult> callback)
id
- the group that should be replacedgroup
- description of the new groupcallback
- called at call success, failure, or cancellationpublic void deleteGroup(GroupId id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
deleteGroupAsync(GroupId, FutureCallback)
instead.
id
- identifier of the group to deleteInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Void> deleteGroupAsync(GroupId id, FutureCallback<Void> callback)
id
- the group that should be deletedcallback
- called at call success, failure, or cancellationpublic Tags updateTags(GroupId id, TagsUpdate tags) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
updateTagsAsync(GroupId, TagsUpdate, FutureCallback)
instead.
id
- identifier of the grouptags
- the tag update objectInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Tags> updateTagsAsync(GroupId id, TagsUpdate tags, FutureCallback<Tags> callback)
id
- identifier of the grouptags
- the tag update objectcallback
- a callback that is activated at call completionpublic Tags replaceTags(GroupId id, Tags tags) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
replaceTagsAsync(GroupId, Tags, FutureCallback)
instead.
id
- identifier of the grouptags
- the replacements tagsInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Tags> replaceTagsAsync(GroupId id, Tags tags, FutureCallback<Tags> callback)
id
- identifier of the grouptags
- the replacement tagscallback
- a callback that is activated at call completionpublic Tags fetchTags(GroupId id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchTagsAsync(GroupId, FutureCallback)
instead.
id
- identifier of the groupInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<Tags> fetchTagsAsync(GroupId id, FutureCallback<Tags> callback)
id
- identifier of the groupcallback
- a callback that is activated at call completionpublic PagedFetcher<MoSms> fetchInbounds(InboundsFilter filter)
filter
- the inbounds filterpublic MoSms fetchInbound(String id) throws InterruptedException, ApiException
This method blocks until the request completes and its use is
discouraged. Please consider using the asynchronous method
fetchInboundAsync(String, FutureCallback)
instead.
id
- identifier of the inbound messageInterruptedException
- if the current thread was interrupted while waitingApiException
- if an error occurred while communicating with XMSpublic Future<MoSms> fetchInboundAsync(String id, FutureCallback<MoSms> callback)
id
- identifier of the inbound messagecallback
- a callback that is activated at call completionCopyright © 2016–2019 CLX Communications. All rights reserved.