Class PushAsyncService

    • Constructor Detail

      • PushAsyncService

        public PushAsyncService()
      • PushAsyncService

        public PushAsyncService​(java.lang.String gcmApiKey)
      • PushAsyncService

        public PushAsyncService​(java.security.KeyPair keyPair)
      • PushAsyncService

        public PushAsyncService​(java.security.KeyPair keyPair,
                                java.lang.String subject)
      • PushAsyncService

        public PushAsyncService​(java.lang.String publicKey,
                                java.lang.String privateKey)
                         throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • PushAsyncService

        public PushAsyncService​(java.lang.String publicKey,
                                java.lang.String privateKey,
                                java.lang.String subject)
                         throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
    • Method Detail

      • send

        public java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> send​(Notification notification,
                                                                                         Encoding encoding)
                                                                                  throws java.security.GeneralSecurityException,
                                                                                         java.io.IOException,
                                                                                         org.jose4j.lang.JoseException
        Send a notification asynchronously.
        Parameters:
        notification -
        encoding -
        Returns:
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
        org.jose4j.lang.JoseException
      • send

        public java.util.concurrent.CompletableFuture<org.asynchttpclient.Response> send​(Notification notification)
                                                                                  throws java.security.GeneralSecurityException,
                                                                                         java.io.IOException,
                                                                                         org.jose4j.lang.JoseException
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
        org.jose4j.lang.JoseException
      • preparePost

        public org.asynchttpclient.BoundRequestBuilder preparePost​(Notification notification,
                                                                   Encoding encoding)
                                                            throws java.security.GeneralSecurityException,
                                                                   java.io.IOException,
                                                                   org.jose4j.lang.JoseException
        Prepare a POST request for AHC.
        Parameters:
        notification -
        encoding -
        Returns:
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
        org.jose4j.lang.JoseException