public class SwitchStatusStrategy extends Strategy<PushSwitchStatus>
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
CHECK_PUSH |
static int |
SWITCH_ALL |
static int |
SWITCH_NOTIFICATION |
static int |
SWITCH_THROUGH_MESSAGE |
APP_ID, APP_KEY, appId, appKey, context, DEVICE_ERROR_CODE, deviceId, enableRPC, executorService, FEEDBACK_PARAMETER_ERROR_CODE, isSupportRemoteInvoke, PUSH_ID, pushAPI, STRATEGY_CHILD_TYPE, STRATEGY_ClEAR_NOTIFICATION, STRATEGY_PACKAGE_NANME, STRATEGY_PARAMS, STRATEGY_REGISTER, STRATEGY_SUBALIAS, STRATEGY_SUBTAGS, STRATEGY_SWITCH, STRATEGY_SWITCH_SYSTEM_NOTIFICATION, STRATEGY_TYPE, STRATEGY_UNREGISTER, strategyPackageNanme, SUCCESS_CODE, TAG| 构造器和说明 |
|---|
SwitchStatusStrategy(android.content.Context context,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService) |
SwitchStatusStrategy(android.content.Context context,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService,
boolean enableRPC) |
SwitchStatusStrategy(android.content.Context context,
java.lang.String appId,
java.lang.String appKey,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService) |
SwitchStatusStrategy(android.content.Context context,
java.lang.String appId,
java.lang.String appKey,
java.lang.String pushId,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected PushSwitchStatus |
feedBackErrorResponse()
回复错误状态
|
protected PushSwitchStatus |
localResponse()
先更新本地状态,防止断网后无法回调服务端开关状态
|
protected boolean |
matchCondition()
检查参数是否非空
|
protected PushSwitchStatus |
netWorkRequest()
首次订阅成功,通知栏和透传消息开关全部打开
check逻辑变更, 全部发送发推送服务进行回复
无缓存服务的云服务
一切存储与请求都在应用自身内进行
有缓存服务的推送服务
所有请求都发送到推送服务,统一进行上传存储
清除数据并且无网情况下,不再返回,等到有网之后返回
应用本地状态与推送服务存储状态一致
1 无网开关转换
2 有网开关转换
3 无网检查开关
|
protected void |
sendReceiverMessage(PushSwitchStatus message)
回调消息
|
protected android.content.Intent |
sendRpcRequest()
请消息发送给远程service
|
void |
setPushId(java.lang.String pushId) |
void |
setSwitcher(boolean switcher) |
void |
setSwitchType(int switchType) |
protected int |
strategyType()
策略类型
|
findService, getDeviceId, isRegisterStatus, process, processMainThread, sendIntentMessage, sendRpcRequests, setAppId, setAppKey, setExecutorService, setStrategyPackageNanme, setSupportRemoteInvoke, supportServiceRpcpublic static final int CHECK_PUSH
public static final int SWITCH_ALL
public static final int SWITCH_NOTIFICATION
public static final int SWITCH_THROUGH_MESSAGE
public SwitchStatusStrategy(android.content.Context context,
java.lang.String appId,
java.lang.String appKey,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService)
public SwitchStatusStrategy(android.content.Context context,
java.lang.String appId,
java.lang.String appKey,
java.lang.String pushId,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService)
public SwitchStatusStrategy(android.content.Context context,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService)
public SwitchStatusStrategy(android.content.Context context,
PushAPI pushAPI,
java.util.concurrent.ScheduledExecutorService executorService,
boolean enableRPC)
public void setSwitcher(boolean switcher)
public void setSwitchType(int switchType)
public void setPushId(java.lang.String pushId)
protected boolean matchCondition()
StrategymatchCondition 在类中 Strategy<PushSwitchStatus>protected PushSwitchStatus feedBackErrorResponse()
StrategyfeedBackErrorResponse 在类中 Strategy<PushSwitchStatus>protected android.content.Intent sendRpcRequest()
StrategysendRpcRequest 在类中 Strategy<PushSwitchStatus>protected PushSwitchStatus netWorkRequest()
netWorkRequest 在类中 Strategy<PushSwitchStatus>protected PushSwitchStatus localResponse()
localResponse 在类中 Strategy<PushSwitchStatus>protected void sendReceiverMessage(PushSwitchStatus message)
StrategysendReceiverMessage 在类中 Strategy<PushSwitchStatus>protected int strategyType()
StrategystrategyType 在类中 Strategy<PushSwitchStatus>