Class DeviceClient


  • public class DeviceClient
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      DeviceClient​(java.lang.String masterSecret, java.lang.String appKey)  
      DeviceClient​(java.lang.String masterSecret, java.lang.String appKey, int maxRetryTimes)
      Deprecated.
      DeviceClient​(java.lang.String masterSecret, java.lang.String appKey, int maxRetryTimes, cn.jiguang.common.connection.HttpProxy proxy)
      Deprecated.
      DeviceClient​(java.lang.String masterSecret, java.lang.String appKey, cn.jiguang.common.connection.HttpProxy proxy, cn.jiguang.common.ClientConfig conf)
      Create a Device Client by client configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      cn.jiguang.common.resp.DefaultResult addRemoveDevicesFromTag​(java.lang.String theTag, java.util.Set<java.lang.String> toAddUsers, java.util.Set<java.lang.String> toRemoveUsers)  
      cn.jiguang.common.resp.DefaultResult bindMobile​(java.lang.String registrationId, java.lang.String mobile)  
      cn.jiguang.common.resp.DefaultResult deleteAlias​(java.lang.String alias, java.lang.String platform)  
      cn.jiguang.common.resp.DefaultResult deleteTag​(java.lang.String theTag, java.lang.String platform)  
      AliasDeviceListResult getAliasDeviceList​(java.lang.String alias, java.lang.String platform)  
      TagAliasResult getDeviceTagAlias​(java.lang.String registrationId)  
      TagListResult getTagList()  
      java.util.Map<java.lang.String,​OnlineStatus> getUserOnlineStatus​(java.lang.String... registrationIds)  
      cn.jiguang.common.resp.BooleanResult isDeviceInTag​(java.lang.String theTag, java.lang.String registrationID)  
      cn.jiguang.common.resp.DefaultResult updateDeviceTagAlias​(java.lang.String registrationId, boolean clearAlias, boolean clearTag)  
      cn.jiguang.common.resp.DefaultResult updateDeviceTagAlias​(java.lang.String registrationId, java.lang.String alias, java.util.Set<java.lang.String> tagsToAdd, java.util.Set<java.lang.String> tagsToRemove)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeviceClient

        public DeviceClient​(java.lang.String masterSecret,
                            java.lang.String appKey)
      • DeviceClient

        @Deprecated
        public DeviceClient​(java.lang.String masterSecret,
                            java.lang.String appKey,
                            int maxRetryTimes)
        Deprecated.
        This will be removed in the future. Please use ClientConfig{jiguang-common cn.jiguang.common.ClientConfig#setMaxRetryTimes} instead of this constructor.
        Parameters:
        masterSecret - API access secret of the appKey.
        appKey - The KEY of one application on JPush.
        maxRetryTimes - The max retry times.
      • DeviceClient

        @Deprecated
        public DeviceClient​(java.lang.String masterSecret,
                            java.lang.String appKey,
                            int maxRetryTimes,
                            cn.jiguang.common.connection.HttpProxy proxy)
        Deprecated.
        This will be removed in the future. Please use ClientConfig{jiguang-common cn.jiguang.common.ClientConfig#setMaxRetryTimes} instead of this constructor.
        Parameters:
        masterSecret - API access secret of the appKey.
        appKey - The KEY of one application on JPush.
        maxRetryTimes - The max retry times.
        proxy - The HTTP proxy.
      • DeviceClient

        public DeviceClient​(java.lang.String masterSecret,
                            java.lang.String appKey,
                            cn.jiguang.common.connection.HttpProxy proxy,
                            cn.jiguang.common.ClientConfig conf)
        Create a Device Client by client configuration.
        Parameters:
        masterSecret - API access secret of the appKey.
        appKey - The KEY of one application on JPush.
        proxy - The proxy, if there is no proxy, should be null.
        conf - The client configuration. Can use ClientConfig.getInstance() as default.
    • Method Detail

      • getDeviceTagAlias

        public TagAliasResult getDeviceTagAlias​(java.lang.String registrationId)
                                         throws cn.jiguang.common.resp.APIConnectionException,
                                                cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • updateDeviceTagAlias

        public cn.jiguang.common.resp.DefaultResult updateDeviceTagAlias​(java.lang.String registrationId,
                                                                         boolean clearAlias,
                                                                         boolean clearTag)
                                                                  throws cn.jiguang.common.resp.APIConnectionException,
                                                                         cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • updateDeviceTagAlias

        public cn.jiguang.common.resp.DefaultResult updateDeviceTagAlias​(java.lang.String registrationId,
                                                                         java.lang.String alias,
                                                                         java.util.Set<java.lang.String> tagsToAdd,
                                                                         java.util.Set<java.lang.String> tagsToRemove)
                                                                  throws cn.jiguang.common.resp.APIConnectionException,
                                                                         cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • bindMobile

        public cn.jiguang.common.resp.DefaultResult bindMobile​(java.lang.String registrationId,
                                                               java.lang.String mobile)
                                                        throws cn.jiguang.common.resp.APIConnectionException,
                                                               cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • getTagList

        public TagListResult getTagList()
                                 throws cn.jiguang.common.resp.APIConnectionException,
                                        cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • isDeviceInTag

        public cn.jiguang.common.resp.BooleanResult isDeviceInTag​(java.lang.String theTag,
                                                                  java.lang.String registrationID)
                                                           throws cn.jiguang.common.resp.APIConnectionException,
                                                                  cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • addRemoveDevicesFromTag

        public cn.jiguang.common.resp.DefaultResult addRemoveDevicesFromTag​(java.lang.String theTag,
                                                                            java.util.Set<java.lang.String> toAddUsers,
                                                                            java.util.Set<java.lang.String> toRemoveUsers)
                                                                     throws cn.jiguang.common.resp.APIConnectionException,
                                                                            cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • deleteTag

        public cn.jiguang.common.resp.DefaultResult deleteTag​(java.lang.String theTag,
                                                              java.lang.String platform)
                                                       throws cn.jiguang.common.resp.APIConnectionException,
                                                              cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • getAliasDeviceList

        public AliasDeviceListResult getAliasDeviceList​(java.lang.String alias,
                                                        java.lang.String platform)
                                                 throws cn.jiguang.common.resp.APIConnectionException,
                                                        cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • deleteAlias

        public cn.jiguang.common.resp.DefaultResult deleteAlias​(java.lang.String alias,
                                                                java.lang.String platform)
                                                         throws cn.jiguang.common.resp.APIConnectionException,
                                                                cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException
      • getUserOnlineStatus

        public java.util.Map<java.lang.String,​OnlineStatus> getUserOnlineStatus​(java.lang.String... registrationIds)
                                                                               throws cn.jiguang.common.resp.APIConnectionException,
                                                                                      cn.jiguang.common.resp.APIRequestException
        Throws:
        cn.jiguang.common.resp.APIConnectionException
        cn.jiguang.common.resp.APIRequestException