| 限定符 | 构造器和说明 |
|---|---|
protected |
DefaultMNSClient(ServiceCredentials credentials,
ServiceClient serviceClient,
String endpoint) |
|
DefaultMNSClient(String endpoint,
String accessId,
String accessKey)
使用指定的MNS Endpoint构造一个新的
MNSClient对象。 |
|
DefaultMNSClient(String endpoint,
String accessId,
String accessKey,
ClientConfiguration config)
使用指定的MNS Endpoint和配置构造一个新的
MNSClient对象。 |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addHeader(String key,
String value) |
void |
close()
关闭 client, close之后这个client的资源可能随时被释放
|
CloudPullTopic |
createPullTopic(TopicMeta topicMeta,
Vector<String> queueNameList)
Creates topic for pull.
|
CloudPullTopic |
createPullTopic(TopicMeta topicMeta,
Vector<String> queueNameList,
boolean needCreateQueue,
QueueMeta queueMetaTemplate)
Creates topic for pull.
|
CloudQueue |
createQueue(QueueMeta queueMeta)
创建队列
|
AsyncResult<String> |
createQueueAsync(QueueMeta queueMeta,
AsyncCallback<String> callback) |
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对象,后于后续对改对象的创建、查询等
|
int |
getServiceClientHashCode() |
CloudTopic |
getTopicRef(String topicName)
根据Topic的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)
设置当前用户的账号级别属性
|
public DefaultMNSClient(String endpoint, String accessId, String accessKey)
MNSClient对象。endpoint - MNS服务的Endpoint。accessId - 访问MNS的Access ID。accessKey - 访问MNS的Access Key。public DefaultMNSClient(String endpoint, String accessId, String accessKey, ClientConfiguration config)
MNSClient对象。endpoint - MNS服务的Endpoint。accessId - 访问MNS的Access ID。accessKey - 访问MNS的Access Key。config - 客户端配置 ClientConfiguration。protected DefaultMNSClient(ServiceCredentials credentials, ServiceClient serviceClient, String endpoint)
public int getServiceClientHashCode()
public void close()
MNSClientpublic void SetAccountAttributes(AccountAttributes accountAttributes) throws ServiceException, ClientException
MNSClientSetAccountAttributes 在接口中 MNSClientaccountAttributes - objectServiceExceptionClientExceptionpublic AccountAttributes GetAccountAttributes() throws ServiceException, ClientException
MNSClientGetAccountAttributes 在接口中 MNSClientServiceExceptionClientExceptionpublic CloudQueue getQueueRef(String queueName)
MNSClientgetQueueRef 在接口中 MNSClientpublic AsyncResult<String> createQueueAsync(QueueMeta queueMeta, AsyncCallback<String> callback)
public CloudQueue createQueue(QueueMeta queueMeta) throws ClientException, ServiceException
createQueue 在接口中 MNSClientqueueMeta - 队列属性ClientExceptionServiceExceptionpublic TransactionQueue getTransQueueRef(String queueName, TransactionChecker checker)
getTransQueueRef 在接口中 MNSClientqueueName - checker - TransactionChecker to check the transaction message status.public TransactionQueue createTransQueue(QueueMeta queueMeta, TransactionChecker checker, long lifeTime, long delayTime) throws ClientException, ServiceException
createTransQueue 在接口中 MNSClientqueueMeta - queue properties.checker - TransactionChecker to check the transaction message status.lifeTime - message life timedelayTime - message delay timeClientExceptionServiceExceptionpublic TransactionQueue createTransQueue(QueueMeta queueMeta, TransactionChecker checker) throws ClientException, ServiceException
createTransQueue 在接口中 MNSClientqueueMeta - queue properties.checker - TransactionChecker to check the transaction message status.ClientExceptionServiceExceptionpublic TransactionQueue createTransQueue(QueueMeta queueMeta) throws ClientException, ServiceException
createTransQueue 在接口中 MNSClientqueueMeta - queue properties.ClientExceptionServiceExceptionpublic CloudPullTopic createPullTopic(TopicMeta topicMeta, Vector<String> queueNameList, boolean needCreateQueue, QueueMeta queueMetaTemplate) throws ClientException, ServiceException
createPullTopic 在接口中 MNSClienttopicMeta - 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.ClientException,ServiceException,IllegalArgumentExceptionClientExceptionServiceExceptionpublic CloudPullTopic createPullTopic(TopicMeta topicMeta, Vector<String> queueNameList) throws ClientException, ServiceException
createPullTopic 在接口中 MNSClienttopicMeta - topic properties.queueNameList - the queue name list which are going to be endpoint of new created topic.ClientException,ServiceException,IllegalArgumentExceptionClientExceptionServiceExceptionpublic PagingListResult<String> listQueueURL(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
listQueueURL 在接口中 MNSClientprefix - 队列名前缀marker - 列举的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionpublic PagingListResult<QueueMeta> listQueue(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
listQueue 在接口中 MNSClientprefix - 队列名前缀marker - 列举的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionpublic CloudTopic getTopicRef(String topicName)
getTopicRef 在接口中 MNSClienttopicName - topic namepublic CloudTopic createTopic(TopicMeta meta)
createTopic 在接口中 MNSClientmeta - CloudTpoic的meta数据public PagingListResult<TopicMeta> listTopic(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
listTopic 在接口中 MNSClientprefix - topic name前缀marker - topic的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionpublic PagingListResult<String> listTopicURL(String prefix, String marker, Integer retNumber) throws ClientException, ServiceException
listTopicURL 在接口中 MNSClientprefix - topic name前缀marker - topic的起始位置,""表示从第一个开始,也可以是前一次列举返回的markerretNumber - 最多返回的个数ClientExceptionServiceExceptionCopyright © 2016. All Rights Reserved.