类的使用
com.walker.push.Notification
使用Notification的程序包
-
com.walker.push中Notification的使用
参数类型为Notification的com.walker.push中的方法修饰符和类型方法说明booleanStrategy.access(Notification notification) 是否允许放行,如果返回:false表明未通过策略检查,不能发送。protected abstract PushResultAbstractPushObject.doPushContent(Notification notification, List<T> data) 执行具体推送的方法,由子类完成。protected PushResultAbstractPushManager.invokePush(Pushable pushable, Notification notification) voidPushStatusListener.onException(Notification notification, String error, NotificationChannel channel) 当调用异常时voidPushStatusListener.onSuccess(Notification notification, Object option, NotificationChannel channel) 当调用成功时protected abstract voidAbstractPushManager.persistent(Notification notification, List<String> successReceiverList, NotificationChannel channel) 持久化保存推送数据(到数据库)protected abstract voidAbstractPushManager.persistentFailed(Notification notification, List<String> failedList, NotificationChannel channel) 持久化推送失败的记录AbstractPushManager.push(Notification notification, String pushableId) AbstractPushObject.push(Notification notification) Pushable.push(Notification notification) 推送方法。PushManager.push(Notification notification, String pushableId) 推送通知,当指定了推送者id时,优先使用。protected PushResultAbstractPushManager.pushOnce(List<Pushable> pushableList, Notification notification) 一次完整推送调用,默认同步实现,子类可以使用异步方式。PushManager.pushSms(Notification notification) 推送短信接口单独定义,因为平台业务中需要重新实现,包装。Pushable.translateToTarget(Notification notification) 把通知对象转换成目标可用的数据对象类型变量类型为Notification的com.walker.push中的方法参数修饰符和类型方法说明AbstractPushManager.push(List<Notification> list) PushManager.push(List<Notification> list) -
com.walker.push.support中Notification的使用
参数类型为Notification的com.walker.push.support中的方法修饰符和类型方法说明protected PushResultAsyncPushManager.pushOnce(List<Pushable> pushableList, Notification notification) AbstractSmsPush.translateToTarget(Notification notification) -
com.walker.push.util中Notification的使用
修饰符和类型方法说明static final NotificationPushUtils.acquireEmailNotification(String title, String content, String from, List<String> targetMailList, String creator, boolean persistent) static final NotificationPushUtils.acquireEmailNotificationOne(String title, String content, String from, String targetMail, String creator) static final NotificationPushUtils.acquireNotification(String title, String content, String from, List<String> targetList, String creator, boolean persistent, List<NotificationChannel> channelList, boolean parallel) 创建一个通用发送通知对象。static final NotificationPushUtils.acquireSmsNotification(String title, String content, String targetUser, String creator) 返回一个短信发送通知对象。static final NotificationPushUtils.acquireSmsNotification(String title, String content, List<String> targetList, String creator, boolean persistent)