Package com.iizix.push.vapid
Class PushService
- Field Summary- Fields inherited from class com.iizix.push.vapid.AbstractPushService- SERVER_KEY_CURVE, SERVER_KEY_ID
- Constructor SummaryConstructorsConstructorDescription- PushService- (String gcmApiKey) - PushService- (String publicKey, String privateKey) - PushService- (String publicKey, String privateKey, String subject) - PushService- (KeyPair keyPair) - PushService- (KeyPair keyPair, String subject) 
- Method SummaryModifier and TypeMethodDescription- org.apache.http.client.methods.HttpPost- preparePost- (Notification notification, Encoding encoding) Prepare a HttpPost for Apache async http client- org.apache.http.HttpResponse- send- (Notification notification) - org.apache.http.HttpResponse- send- (Notification notification, Encoding encoding) Send a notification and wait for the response.- Future<org.apache.http.HttpResponse>- sendAsync- (Notification notification) Deprecated.- Future<org.apache.http.HttpResponse>- sendAsync- (Notification notification, Encoding encoding) Deprecated.Use- PushAsyncService.send(Notification, Encoding)instead.- 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 Details- PushServicepublic PushService()
- PushService
- PushService
- PushService
- PushService- Throws:
- GeneralSecurityException
 
- PushServicepublic PushService- (String publicKey, String privateKey, String subject) throws GeneralSecurityException - Throws:
- GeneralSecurityException
 
 
- Method Details- sendpublic org.apache.http.HttpResponse send- (Notification notification, Encoding encoding) throws GeneralSecurityException, IOException, org.jose4j.lang.JoseException, ExecutionException, InterruptedException Send a notification and wait for the response.- Parameters:
- notification-
- encoding-
- Returns:
- Throws:
- GeneralSecurityException
- IOException
- org.jose4j.lang.JoseException
- ExecutionException
- InterruptedException
 
- sendpublic org.apache.http.HttpResponse send- (Notification notification) throws GeneralSecurityException, IOException, org.jose4j.lang.JoseException, ExecutionException, InterruptedException - Throws:
- GeneralSecurityException
- IOException
- org.jose4j.lang.JoseException
- ExecutionException
- InterruptedException
 
- sendAsync@Deprecated public Future<org.apache.http.HttpResponse> sendAsync- (Notification notification, Encoding encoding) throws GeneralSecurityException, IOException, org.jose4j.lang.JoseException Deprecated.Use- PushAsyncService.send(Notification, Encoding)instead.Send a notification, but don't wait for the response.- Parameters:
- notification-
- encoding-
- Returns:
- Throws:
- GeneralSecurityException
- IOException
- org.jose4j.lang.JoseException
 
- sendAsync@Deprecated public Future<org.apache.http.HttpResponse> sendAsync- (Notification notification) throws GeneralSecurityException, IOException, org.jose4j.lang.JoseException Deprecated.Use- PushAsyncService.send(Notification)instead.- Throws:
- GeneralSecurityException
- IOException
- org.jose4j.lang.JoseException
 
- preparePostpublic org.apache.http.client.methods.HttpPost preparePost- (Notification notification, Encoding encoding) throws GeneralSecurityException, IOException, org.jose4j.lang.JoseException Prepare a HttpPost for Apache async http client- Parameters:
- notification-
- encoding-
- Returns:
- Throws:
- GeneralSecurityException
- IOException
- org.jose4j.lang.JoseException
 
 
PushAsyncService.send(Notification)instead.