Class SendVAPIDPush

java.lang.Object
org.deltava.dao.http.DAO
org.deltava.dao.http.SendVAPIDPush

public class SendVAPIDPush extends DAO
A Data Access Object to send VAPID push messages.
Since:
10.0
Version:
10.0
Author:
Luke
  • Constructor Details

    • SendVAPIDPush

      public SendVAPIDPush(String url)
      Initializes the Data Access Object.
      Parameters:
      url - the endpoint URL
  • Method Details

    • send

      public int send(String jwt, byte[] body, long ttl) throws DAOException
      Sends a VAPID message.
      Parameters:
      jwt - the JWT token
      body - the encrypted message body
      ttl - the time to live on the VAPID service in seconds
      Returns:
      the HTTP response code from the service
      Throws:
      DAOException - if an error occurs