Package com.iizix.push.vapid
Class PushAsyncService
- java.lang.Object
- com.iizix.push.vapid.AbstractPushService<PushAsyncService>
- com.iizix.push.vapid.PushAsyncService
 
 
- public class PushAsyncService extends AbstractPushService<PushAsyncService> 
- Field Summary- Fields inherited from class com.iizix.push.vapid.AbstractPushService- SERVER_KEY_CURVE, SERVER_KEY_ID
 
 - Constructor Summary- Constructors - Constructor - Description - PushAsyncService()- PushAsyncService(java.lang.String gcmApiKey)- PushAsyncService(java.lang.String publicKey, java.lang.String privateKey)- PushAsyncService(java.lang.String publicKey, java.lang.String privateKey, java.lang.String subject)- PushAsyncService(java.security.KeyPair keyPair)- PushAsyncService(java.security.KeyPair keyPair, java.lang.String subject)
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - org.asynchttpclient.BoundRequestBuilder- preparePost(Notification notification, Encoding encoding)Prepare a POST request for AHC.- java.util.concurrent.CompletableFuture<org.asynchttpclient.Response>- send(Notification notification)- java.util.concurrent.CompletableFuture<org.asynchttpclient.Response>- send(Notification notification, Encoding encoding)Send a notification asynchronously.- Methods inherited from class com.iizix.push.vapid.AbstractPushService- encrypt, getGcmApiKey, getKeyPair, getPrivateKey, getPublicKey, getSubject, prepareRequest, setGcmApiKey, setKeyPair, setPrivateKey, setPrivateKey, setPublicKey, setPublicKey, setSubject, vapidEnabled
 
 
- 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