当前位置: 首页>>代码示例>>Java>>正文


Java ClientConfig.get方法代码示例

本文整理汇总了Java中cn.jiguang.common.ClientConfig.get方法的典型用法代码示例。如果您正苦于以下问题:Java ClientConfig.get方法的具体用法?Java ClientConfig.get怎么用?Java ClientConfig.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cn.jiguang.common.ClientConfig的用法示例。


在下文中一共展示了ClientConfig.get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PushClient

import cn.jiguang.common.ClientConfig; //导入方法依赖的package包/类
/**
 * Create a Push Client with max retry times.
 * This will be removed in the future. Please use ClientConfig{jiguang-common cn.jiguang.common.ClientConfig} instead of this constructor.
    *
 * @param masterSecret  API access secret of the appKey.
 * @param appKey The KEY of one application on JPush.
 * @param maxRetryTimes max retry times
    * @param proxy The max retry times.
 */
   @Deprecated
public PushClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy proxy) {
       ServiceHelper.checkBasic(appKey, masterSecret);

       ClientConfig conf = ClientConfig.getInstance();
       conf.setMaxRetryTimes(maxRetryTimes);

       this._baseUrl = (String) conf.get(ClientConfig.PUSH_HOST_NAME);
       this._pushPath = (String) conf.get(ClientConfig.PUSH_PATH);
       this._pushValidatePath = (String) conf.get(ClientConfig.PUSH_VALIDATE_PATH);

       this._apnsProduction = (Integer) conf.get(ClientConfig.APNS_PRODUCTION);
       this._timeToLive = (Long) conf.get(ClientConfig.TIME_TO_LIVE);

       String authCode = ServiceHelper.getBasicAuthorization(appKey, masterSecret);
       this._httpClient = new NativeHttpClient(authCode, proxy, conf);
}
 
开发者ID:cowthan,项目名称:JavaAyo,代码行数:27,代码来源:PushClient.java

示例2: DeviceClient

import cn.jiguang.common.ClientConfig; //导入方法依赖的package包/类
/**
 * This will be removed in the future. Please use ClientConfig{jiguang-common cn.jiguang.common.ClientConfig#setMaxRetryTimes} instead of this constructor.
 * @param masterSecret API access secret of the appKey.
 * @param appKey The KEY of one application on JPush.
 * @param maxRetryTimes The max retry times.
 * @param proxy The HTTP proxy.
 *
 */
@Deprecated
public DeviceClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy proxy) {
    ClientConfig conf = ClientConfig.getInstance();
    conf.setMaxRetryTimes(maxRetryTimes);
    ServiceHelper.checkBasic(appKey, masterSecret);

    hostName = (String) conf.get(ClientConfig.DEVICE_HOST_NAME);
    devicesPath = (String) conf.get(ClientConfig.DEVICES_PATH);
    tagsPath = (String) conf.get(ClientConfig.TAGS_PATH);
    aliasesPath = (String) conf.get(ClientConfig.ALIASES_PATH);

    String authCode = ServiceHelper.getBasicAuthorization(appKey, masterSecret);
    _httpClient = new NativeHttpClient(authCode, proxy, conf);

}
 
开发者ID:cowthan,项目名称:JavaAyo,代码行数:24,代码来源:DeviceClient.java

示例3: ScheduleClient

import cn.jiguang.common.ClientConfig; //导入方法依赖的package包/类
/**
 * This will be removed in the future. Please use ClientConfig{jiguang-common cn.jiguang.common.ClientConfig#setMaxRetryTimes} instead of this constructor.
 * @param masterSecret API access secret of the appKey.
 * @param appKey The KEY of one application on JPush.
 * @param maxRetryTimes The mas retry times.
 * @param proxy The proxy, if there is no proxy, should be null.
 */
@Deprecated
public ScheduleClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy proxy) {
    ServiceHelper.checkBasic(appKey, masterSecret);

    ClientConfig conf = ClientConfig.getInstance();
    conf.setMaxRetryTimes(maxRetryTimes);

    hostName = (String) conf.get(ClientConfig.SCHEDULE_HOST_NAME);
    schedulePath = (String) conf.get(ClientConfig.SCHEDULE_PATH);
    apnsProduction = (Integer) conf.get(ClientConfig.APNS_PRODUCTION);
    timeToLive = (Long) conf.get(ClientConfig.TIME_TO_LIVE);

    String authCode = ServiceHelper.getBasicAuthorization(appKey, masterSecret);
    this._httpClient = new NativeHttpClient(authCode, proxy, conf);
}
 
开发者ID:cowthan,项目名称:JavaAyo,代码行数:23,代码来源:ScheduleClient.java

示例4: ReportClient

import cn.jiguang.common.ClientConfig; //导入方法依赖的package包/类
/**
    * This will be removed in the future. Please use ClientConfig{jiguang-common cn.jiguang.common.ClientConfig#setMaxRetryTimes} instead of this constructor.
    * @param masterSecret  API access secret of the appKey.
    * @param appKey The KEY of one application on JPush.
    * @param maxRetryTimes max retry times
    * @param proxy The max retry times.
    *
    */
   @Deprecated
public ReportClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy proxy) {
       ServiceHelper.checkBasic(appKey, masterSecret);

       ClientConfig conf = ClientConfig.getInstance();
       conf.setMaxRetryTimes(maxRetryTimes);

       _hostName = (String) conf.get(ClientConfig.REPORT_HOST_NAME);
       _receivePath = (String) conf.get(ClientConfig.REPORT_RECEIVE_PATH);
       _userPath = (String) conf.get(ClientConfig.REPORT_USER_PATH);
       _messagePath = (String) conf.get(ClientConfig.REPORT_MESSAGE_PATH);

       String authCode = ServiceHelper.getBasicAuthorization(appKey, masterSecret);
       _httpClient = new NativeHttpClient(authCode, proxy, conf);
}
 
开发者ID:cowthan,项目名称:JavaAyo,代码行数:24,代码来源:ReportClient.java


注:本文中的cn.jiguang.common.ClientConfig.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。