public abstract class AbstractMessageHandler<T> extends java.lang.Object implements MessageHandler
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MESSAGE_TYPE_NOTIFICATION_ARRIVED |
static int |
MESSAGE_TYPE_NOTIFICATION_CLICK |
static int |
MESSAGE_TYPE_NOTIFICATION_DELETE |
static int |
MESSAGE_TYPE_NOTIFICATION_STATE |
static int |
MESSAGE_TYPE_NOTIFICATION_WITHDRAW |
static int |
MESSAGE_TYPE_PUSH_REGISTER_STATUS |
static int |
MESSAGE_TYPE_PUSH_SERVICE_V2 |
static int |
MESSAGE_TYPE_PUSH_SERVICE_V3 |
static int |
MESSAGE_TYPE_PUSH_SUBALIAS_STATUS |
static int |
MESSAGE_TYPE_PUSH_SUBTAGS_STATUS |
static int |
MESSAGE_TYPE_PUSH_SWITCH_STATUS |
static int |
MESSAGE_TYPE_PUSH_UNREGISTER_STATUS |
static int |
MESSAGE_TYPE_RECEIVE_NOTIFY_MESSAGE |
static int |
MESSAGE_TYPE_REGISTER |
static int |
MESSAGE_TYPE_SCHEDULE_NOTIFICATION |
static int |
MESSAGE_TYPE_THROUGH |
static int |
MESSAGE_TYPE_UNREGISTER |
static int |
MESSAGE_TYPE_UPLOAD_FILE_LOG |
static int |
SCHEDULE_OFF
schedule status code
|
static int |
SCHEDULE_ON_DELAY |
static int |
SCHEDULE_ON_EXPIRE |
static int |
SCHEDULE_ON_TIME |
protected static java.lang.String |
TAG |
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractMessageHandler(android.content.Context context) |
protected |
AbstractMessageHandler(android.content.Context context,
AbstractAppLogicListener abstractAppLogicListener) |
| 限定符和类型 | 方法和说明 |
|---|---|
AbstractAppLogicListener |
appLogicListener() |
protected boolean |
canReceiveMessage(int pushType,
java.lang.String destPackageName) |
protected boolean |
canSendMessage(T message)
can show message
|
protected void |
clearNotifyOption(MessageV3 message) |
android.content.Context |
context() |
java.lang.String |
getDeskTopNotificationPkg(java.lang.String deskTopNotificationJson)
check the deskTop notification json
|
protected java.lang.String |
getDeviceId(android.content.Intent intent)
get deviceId for onEvent
|
java.lang.String |
getIntentMethod(android.content.Intent intent)
get intent method
|
protected abstract T |
getMessage(android.content.Intent intent) |
protected java.lang.String |
getPushServiceDefaultPackageName(android.content.Intent intent) |
protected java.lang.String |
getPushTimestamp(android.content.Intent intent) |
protected java.lang.String |
getSeqId(android.content.Intent intent) |
protected java.lang.String |
getTaskId(android.content.Intent intent) |
boolean |
isNotificationJson(java.lang.String notificationJson)
check the notification json type
|
protected void |
onAfterEvent(T Message) |
protected void |
onBeforeEvent(T message)
record receive push event
|
protected PushNotification |
onCreateNotification(T message) |
protected int |
scheduleNotificationStatus(T message)
schedule notification status
default is schedule off
|
protected void |
scheduleShowNotification(T message) |
protected boolean |
securityCheck(T message)
消息安全校验,未通过认证的消息将会丢弃
|
protected boolean |
securityCheck0(MessageV3 message) |
protected void |
sendArrivedMessage(MessageV3 message)
通知应用通知栏已经展示
|
boolean |
sendMessage(android.content.Intent intent)
send message
|
protected abstract void |
unsafeSend(T message,
PushNotification pushNotification) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessorType, messageMatchprotected static final java.lang.String TAG
public static final int MESSAGE_TYPE_PUSH_SERVICE_V2
public static final int MESSAGE_TYPE_PUSH_SERVICE_V3
public static final int MESSAGE_TYPE_THROUGH
public static final int MESSAGE_TYPE_REGISTER
public static final int MESSAGE_TYPE_UNREGISTER
public static final int MESSAGE_TYPE_NOTIFICATION_CLICK
public static final int MESSAGE_TYPE_NOTIFICATION_DELETE
public static final int MESSAGE_TYPE_PUSH_SWITCH_STATUS
public static final int MESSAGE_TYPE_PUSH_REGISTER_STATUS
public static final int MESSAGE_TYPE_PUSH_UNREGISTER_STATUS
public static final int MESSAGE_TYPE_PUSH_SUBTAGS_STATUS
public static final int MESSAGE_TYPE_PUSH_SUBALIAS_STATUS
public static final int MESSAGE_TYPE_SCHEDULE_NOTIFICATION
public static final int MESSAGE_TYPE_RECEIVE_NOTIFY_MESSAGE
public static final int MESSAGE_TYPE_NOTIFICATION_STATE
public static final int MESSAGE_TYPE_UPLOAD_FILE_LOG
public static final int MESSAGE_TYPE_NOTIFICATION_ARRIVED
public static final int MESSAGE_TYPE_NOTIFICATION_WITHDRAW
public static final int SCHEDULE_OFF
public static final int SCHEDULE_ON_EXPIRE
public static final int SCHEDULE_ON_TIME
public static final int SCHEDULE_ON_DELAY
protected AbstractMessageHandler(android.content.Context context)
protected AbstractMessageHandler(android.content.Context context,
AbstractAppLogicListener abstractAppLogicListener)
protected abstract T getMessage(android.content.Intent intent)
protected abstract void unsafeSend(T message, PushNotification pushNotification)
protected PushNotification onCreateNotification(T message)
protected void onBeforeEvent(T message)
protected void onAfterEvent(T Message)
protected int scheduleNotificationStatus(T message)
protected void scheduleShowNotification(T message)
protected boolean canSendMessage(T message)
protected boolean securityCheck(T message)
protected final boolean securityCheck0(MessageV3 message)
protected java.lang.String getDeviceId(android.content.Intent intent)
protected java.lang.String getTaskId(android.content.Intent intent)
protected java.lang.String getSeqId(android.content.Intent intent)
protected java.lang.String getPushServiceDefaultPackageName(android.content.Intent intent)
protected java.lang.String getPushTimestamp(android.content.Intent intent)
public boolean sendMessage(android.content.Intent intent)
MessageHandlersendMessage 在接口中 MessageHandlerpublic AbstractAppLogicListener appLogicListener()
public android.content.Context context()
public java.lang.String getIntentMethod(android.content.Intent intent)
public boolean isNotificationJson(java.lang.String notificationJson)
public java.lang.String getDeskTopNotificationPkg(java.lang.String deskTopNotificationJson)
protected boolean canReceiveMessage(int pushType,
java.lang.String destPackageName)
protected void clearNotifyOption(MessageV3 message)
protected void sendArrivedMessage(MessageV3 message)
message -