com.aliyun.mns.client
接口 MNSClient

所有已知实现类:
DefaultMNSClient

public interface MNSClient


方法摘要
 void close()
          关闭 client
 CloudQueue createQueue(QueueMeta queue)
          创建队列
 CloudTopic createTopic(TopicMeta meta)
          根据Topic的meta数据,创建CloudTopic对象,用于后续的消息发送等
 CloudQueue getQueueRef(String queueName)
          根据队列的URL创建CloudQueue对象,后于后续对改对象的创建、查询等
 CloudTopic getTopicRef(String topicName)
          根据Tpoic的URL创建CloudTopic对象,后于后续对改对象的创建、查询等
 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 open()
          打开 client
 

方法详细信息

close

void close()
关闭 client


open

void open()
打开 client


isOpen

boolean isOpen()
检查client是否为打开状态

返回:
true if client is open, else false

getQueueRef

CloudQueue getQueueRef(String queueName)
根据队列的URL创建CloudQueue对象,后于后续对改对象的创建、查询等

参数:
queueName -
返回:
CloudQueue object

createQueue

CloudQueue createQueue(QueueMeta queue)
                       throws ClientException,
                              ServiceException
创建队列

参数:
queue - 队列属性
返回:
CloudQueue object
抛出:
ClientException
ServiceException

listQueue

PagingListResult<QueueMeta> listQueue(String prefix,
                                      String marker,
                                      Integer retNumber)
                                      throws ClientException,
                                             ServiceException
列举队列

参数:
prefix - 队列名前缀
marker - 列举的起始位置,""表示从第一个开始,也可以是前一次列举返回的marker
retNumber - 最多返回的个数
返回:
返回队列属性列表及marker
抛出:
ClientException
ServiceException

listQueueURL

PagingListResult<String> listQueueURL(String prefix,
                                      String marker,
                                      Integer retNumber)
                                      throws ClientException,
                                             ServiceException
列举队列

参数:
prefix - 队列名前缀
marker - 列举的起始位置,""表示从第一个开始,也可以是前一次列举返回的marker
retNumber - 最多返回的个数
返回:
返回队列URL列表及marker
抛出:
ClientException
ServiceException

getTopicRef

CloudTopic getTopicRef(String topicName)
根据Tpoic的URL创建CloudTopic对象,后于后续对改对象的创建、查询等

参数:
topicName - topic name
返回:
CloudTpoic对象

createTopic

CloudTopic createTopic(TopicMeta meta)
根据Topic的meta数据,创建CloudTopic对象,用于后续的消息发送等

参数:
meta - CloudTpoic的meta数据
返回:
CloudTpoic对象

listTopic

PagingListResult<TopicMeta> listTopic(String prefix,
                                      String marker,
                                      Integer retNumber)
                                      throws ClientException,
                                             ServiceException
参数:
prefix - topic name前缀
marker - topic的起始位置,""表示从第一个开始,也可以是前一次列举返回的marker
retNumber - 最多返回的个数
返回:
topic meta列表及marker数据
抛出:
ClientException
ServiceException

listTopicURL

PagingListResult<String> listTopicURL(String prefix,
                                      String marker,
                                      Integer retNumber)
                                      throws ClientException,
                                             ServiceException
参数:
prefix - topic name前缀
marker - topic的起始位置,""表示从第一个开始,也可以是前一次列举返回的marker
retNumber - 最多返回的个数
返回:
topic url列表及marker数据
抛出:
ClientException
ServiceException


Copyright © 2016. All Rights Reserved.