package com.sikey.wa04.business.infrastructure.adapter.push;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.sikey.wa04.business.infrastructure.adapter.push.template.NotificationMessageTemplate;
import com.sikey.wa04.business.infrastructure.configuration.PushConfig;
import okhttp3.Response;

import java.io.IOException;
import java.util.concurrent.ExecutionException;

/**
 * Android 系统推送
 *
 * @author luoyangwei
 */
public interface AndroidPushNotification extends PushNotification {

    /**
     * 认证
     *
     * @param pushConfig 推送配置
     * @return 认证令牌
     */
    AccessToken authenticate(PushConfig pushConfig) throws ExecutionException;

    /**
     * 推送
     *
     * @param message     消息
     * @param accessToken 认证令牌
     */
    SendResult send(NotificationMessageTemplate message, AccessToken accessToken) throws IOException;
}
