程序包 com.walker.push

接口 Pushable<T>

所有超级接口:
ApplicationBeanInitialized
所有已知实现类:
AbstractPushObject, AbstractSmsPush

public interface Pushable<T> extends ApplicationBeanInitialized
推送者定义。

1.每个推送者使用一种推送通道,实现一种类型推送

     T 提供了推送内部转换对象,把业务转换成通道可识别的内部对象发送,如:短信(SmsMessage)等。
 
作者:
时克英
  • 方法详细资料

    • getId

      String getId()
      返回推送者ID,唯一
      返回:
    • getName

      String getName()
      返回推送者名称
      返回:
    • getNotificationChannel

      NotificationChannel getNotificationChannel()
      返回推送者支持的通道,只能一个。
      返回:
    • push

      PushResult push(Notification notification) throws PushException
      推送方法。
      参数:
      notification -
      返回:
      抛出:
      PushException
    • translateToTarget

      List<T> translateToTarget(Notification notification)
      把通知对象转换成目标可用的数据对象
      参数:
      notification -
      返回:
      一个通知可能包含多个接收者,所以返回是个业务对象集合。
    • supportAsync

      boolean supportAsync()
      推送者是否支持异步执行,如果支持则在保存时需要重写回调方法。
      返回:
    • setPushStatusListener

      void setPushStatusListener(PushStatusListener listener)
      在异步任务中,设置回调机制,当推送者是异步调用时必须传递该对象。
      参数:
      listener -
    • getPushStatusListener

      PushStatusListener getPushStatusListener()
      返回异步推送的监听器对象,如果同步则为空。
      返回: