本文整理汇总了Java中cn.jiguang.common.connection.HttpProxy类的典型用法代码示例。如果您正苦于以下问题:Java HttpProxy类的具体用法?Java HttpProxy怎么用?Java HttpProxy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HttpProxy类属于cn.jiguang.common.connection包,在下文中一共展示了HttpProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PushClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的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);
}
示例2: DeviceClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的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);
}
示例3: ScheduleClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的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);
}
示例4: ReportClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的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);
}
示例5: JPushClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的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 proxy, if there is no proxy, should be null.
*/
@Deprecated
public JPushClient(String masterSecret, String appKey, int maxRetryTimes, HttpProxy proxy) {
_pushClient = new PushClient(masterSecret, appKey, maxRetryTimes, proxy);
_reportClient = new ReportClient(masterSecret, appKey, maxRetryTimes, proxy);
_deviceClient = new DeviceClient(masterSecret, appKey, maxRetryTimes, proxy);
_scheduleClient = new ScheduleClient(masterSecret, appKey, maxRetryTimes, proxy);
}
示例6: SMSClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
public SMSClient(String masterSecret, String appkey, HttpProxy proxy, JSMSConfig conf) {
ServiceHelper.checkBasic(appkey, masterSecret);
_baseUrl = (String) conf.get(JSMSConfig.API_HOST_NAME);
_smsCodePath = (String) conf.get(JSMSConfig.CODE_PATH);
_validPath = (String) conf.get(JSMSConfig.VALID_PATH);
_voiceCodePath = (String) conf.get(JSMSConfig.VOICE_CODE_PATH);
_shortMsgPath = (String) conf.get(JSMSConfig.SHORT_MESSAGE_PATH);
_tempMsgPath = (String) conf.get(JSMSConfig.TEMPlATE_MESSAGE_PATH);
_schedulePath = (String) conf.get(JSMSConfig.SCHEDULE_PATH);
_accountPath = (String) conf.get(JSMSConfig.ACCOUNT_PATH);
String authCode = ServiceHelper.getBasicAuthorization(appkey, masterSecret);
this._httpClient = new NativeHttpClient(authCode, proxy, conf.getClientConfig());
}
示例7: ReportClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
/**
* Create a JMessage Base Client
*
* @param appKey The KEY of one application on JPush.
* @param masterSecret API access secret of the appKey.
* @param proxy The proxy, if there is no proxy, should be null.
* @param config The client configuration. Can use JMessageConfig.getInstance() as default.
*/
public ReportClient(String appKey, String masterSecret, HttpProxy proxy, JMessageConfig config) {
super(appKey, masterSecret, proxy, config);
mBaseReportPath = (String) config.get(JMessageConfig.API_REPORT_HOST_NAME);
mV2MessagePath = (String) config.get(JMessageConfig.V2_MESSAGE_PATH);
mV2UserPath = (String) config.get(JMessageConfig.V2_USER_PATH);
mV2GroupPath = (String) config.get(JMessageConfig.V2_GROUP_PATH);
mV2StatisticPath = (String) config.get(JMessageConfig.V2_STATISTIC_PATH);
}
示例8: MessageClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
public MessageClient(String appKey, String masterSecret, HttpProxy proxy, JMessageConfig config) {
super(appKey, masterSecret, proxy, config);
this.messagePath = (String) config.get(JMessageConfig.MESSAGE_PATH);
this.reportBaseUrl = (String) config.get(JMessageConfig.API_REPORT_HOST_NAME);
this.v2_userPath = (String) config.get(JMessageConfig.V2_USER_PATH);
this.v2_messagePath = (String) config.get(JMessageConfig.V2_MESSAGE_PATH);
}
示例9: JMessageClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
/**
* Create a JMessage Client by custom Client configuration.
* If you are using custom parameters, maybe this constructor is what you needed.
*
* @param appkey The KEY of one application on JPush.
* @param masterSecret API access secret of the appKey.
* @param proxy The proxy, if there is no proxy, should be null.
* @param config The client configuration. Can use JMessageConfig.getInstance() as default.
*/
public JMessageClient(String appkey, String masterSecret, HttpProxy proxy, JMessageConfig config) {
_userClient = new UserClient(appkey, masterSecret, proxy, config);
_groupClient = new GroupClient(appkey, masterSecret, proxy, config);
_messageClient = new MessageClient(appkey, masterSecret, proxy, config);
_crossAppClient = new CrossAppClient(appkey, masterSecret, proxy, config);
_resourceClient = new ResourceClient(appkey, masterSecret, proxy, config);
_sensitiveWordClient = new SensitiveWordClient(appkey, masterSecret, proxy, config);
_chatRoomClient = new ChatRoomClient(appkey, masterSecret, proxy, config);
_reportClient = new ReportClient(appkey, masterSecret, proxy, config);
_sendVersion = (Integer) config.get(JMessageConfig.SEND_VERSION);
}
示例10: JSMSClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
public JSMSClient(String masterSecret, String appkey, HttpProxy proxy, JSMSConfig conf) {
_smsClient = new SMSClient(masterSecret, appkey, proxy, conf);
}
示例11: ResourceClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
public ResourceClient(String appkey, String masterSecret, HttpProxy proxy) {
this(appkey, masterSecret, proxy, JMessageConfig.getInstance());
}
示例12: ChatRoomClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
public ChatRoomClient(String appKey, String masterSecret, HttpProxy proxy) {
this(appKey, masterSecret, proxy, JMessageConfig.getInstance());
}
示例13: BaseClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
/**
* Create a JMessage Base Client
*
* @param appKey The KEY of one application on JPush.
* @param masterSecret API access secret of the appKey.
* @param proxy The proxy, if there is no proxy, should be null.
* @param config The client configuration. Can use JMessageConfig.getInstance() as default.
*/
public BaseClient(String appKey, String masterSecret, HttpProxy proxy, JMessageConfig config) {
ServiceHelper.checkBasic(appKey, masterSecret);
String authCode = ServiceHelper.getBasicAuthorization(appKey, masterSecret);
this._baseUrl = (String) config.get(JMessageConfig.API_HOST_NAME);
this._httpClient = new NativeHttpClient(authCode, proxy, config.getClientConfig());
}
示例14: GroupClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
/**
* Create a Group Client with a proxy.
*
* @param appkey The key of one application on JPush.
* @param masterSecret API access secret of the appKey.
* @param proxy The proxy, if there is no proxy, should be null.
*/
public GroupClient(String appkey, String masterSecret, HttpProxy proxy) {
this(appkey, masterSecret, proxy, JMessageConfig.getInstance());
}
示例15: SensitiveWordClient
import cn.jiguang.common.connection.HttpProxy; //导入依赖的package包/类
/**
* Create a JMessage Base Client
*
* @param appkey The KEY of one application on JPush.
* @param masterSecret API access secret of the appKey.
* @param proxy The proxy, if there is no proxy, should be null.
* @param config The client configuration. Can use JMessageConfig.getInstance() as default.
*/
public SensitiveWordClient(String appkey, String masterSecret, HttpProxy proxy, JMessageConfig config) {
super(appkey, masterSecret, proxy, config);
this.sensitiveWordPath = (String) config.get(JMessageConfig.SENSITIVE_WORD_PATH);
}