public interface MNSClient
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
关闭 client, close之后这个client的资源可能随时被释放
|
CloudPullTopic |
createPullTopic(TopicMeta topicMeta,
Vector<String> queueNameList)
Creates transaction queue with default message life time and delayTime
|
CloudPullTopic |
createPullTopic(TopicMeta topicMeta,
Vector<String> queueNameList,
boolean needCreateQueue,
QueueMeta queueMetaTemplate)
Creates transaction queue with default message life time and delayTime
|
CloudQueue |
createQueue(QueueMeta queue)
创建队列
|
CloudTopic |
createTopic(TopicMeta meta)
根据Topic的meta数据,创建CloudTopic对象,用于后续的消息发送等
|
TransactionQueue |
createTransQueue(QueueMeta queueMeta)
Creates transaction queue with default message life time and delayTime
|
TransactionQueue |
createTransQueue(QueueMeta queueMeta,
TransactionChecker checker)
Creates transaction queue with default message life time and delayTime
|
TransactionQueue |
createTransQueue(QueueMeta queueMeta,
TransactionChecker checker,
long lifeTime,
long delayTime)
Creates transaction queue.
|
AccountAttributes |
GetAccountAttributes()
获取当前用户的账号级别属性
|
CloudQueue |
getQueueRef(String queueName)
根据队列的URL创建CloudQueue对象,后于后续对改对象的创建、查询等
|
CloudTopic |
getTopicRef(String topicName)
根据Tpoic的URL创建CloudTopic对象,后于后续对改对象的创建、查询等
|
TransactionQueue |
getTransQueueRef(String queueName,
TransactionChecker checker)
Get reference to a transaction queue object by given queue name.
|
boolean |
isOpen()
检查client是否为打开状态
|
PagingListResult<QueueMeta> |
listQueue(String prefix,
String marker,
Integer retNumber)
列举队列
|
PagingListResult<String> |
listQueueURL(String prefix,
String marker,
Integer retNumber)
列举队列
|
PagingListResult<TopicMeta> |
listTopic(String prefix,
String marker,
Integer retNumber) |
PagingListResult<String> |
listTopicURL(String prefix,
String marker,
Integer retNumber) |
void |
SetAccountAttributes(AccountAttributes accountAttributes)
设置当前用户的账号级别属性
|
void close()
boolean isOpen()
void SetAccountAttributes(AccountAttributes accountAttributes) throws ServiceException, ClientException
accountAttributes - objectServiceExceptionClientExceptionAccountAttributes GetAccountAttributes() throws ServiceException, ClientException
ServiceExceptionClientExceptionCloudQueue getQueueRef(String queueName)
queueName - CloudQueue createQueue(QueueMeta queue) throws ClientException, ServiceException
queue - 队列属性ClientExceptionServiceExceptionTransactionQueue getTransQueueRef(String queueName, TransactionChecker checker)
queueName - checker - TransactionChecker to check the transaction message status.TransactionQueue createTransQueue(QueueMeta queueMeta, TransactionChecker checker, long lifeTime, long delayTime) throws ClientException, ServiceException
queueMeta - queue properties.checker - TransactionChecker to check the transaction message status.lifeTime - message life time in secondsdelayTime - message delay time in secondsClientException - note:delayTime should be bigger than lifetime to make sure that that message
will not be visible to consumer by default.ServiceExceptionTransactionQueue createTransQueue(QueueMeta queueMeta, TransactionChecker checker) throws ClientException, ServiceException
queueMeta - queue properties.checker - TransactionChecker to check the transaction message status.ClientExceptionServiceExceptionCloudPullTopic createPullTopic(TopicMeta topicMeta, Vector<String> queueNameList, boolean needCreateQueue, QueueMeta queueMetaTemplate) throws ClientException, ServiceException
topicMeta - topic properties.queueNameList - the queue name list which are going to be endpoint of new created topic.needCreateQueue - flag to indicate that if we need to create the queue in the queueNameList.queueMetaTemplate - the queueMeta template used to create queues in queueNamelist if need.ClientExceptionServiceExceptionCloudPullTopic createPullTopic(TopicMeta topicMeta, Vector<String> queueNameList) throws ClientException, ServiceException
topicMeta - topic properties.queueNameList - the queue name list which are going to be endpoint of new created topic.ClientExceptionServiceExceptionTransactionQueue createTransQueue(QueueMeta queueMeta) throws ClientException, ServiceException
queueMeta - queue properties.ClientExceptionServiceExceptionPagingListResult<QueueMeta> listQueue(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
prefix - 队列名前缀marker - 列举的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionPagingListResult<String> listQueueURL(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
prefix - 队列名前缀marker - 列举的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionCloudTopic getTopicRef(String topicName)
topicName - topic nameCloudTopic createTopic(TopicMeta meta)
meta - CloudTpoic的meta数据PagingListResult<TopicMeta> listTopic(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
prefix - topic name前缀marker - topic的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionPagingListResult<String> listTopicURL(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
prefix - topic name前缀marker - topic的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionCopyright © 2016. All Rights Reserved.