public class PushService extends AbstractPushService<PushService>
SERVER_KEY_CURVE, SERVER_KEY_ID| Constructor and Description |
|---|
PushService() |
PushService(java.security.KeyPair keyPair) |
PushService(java.security.KeyPair keyPair,
java.lang.String subject) |
PushService(java.lang.String gcmApiKey) |
PushService(java.lang.String publicKey,
java.lang.String privateKey) |
PushService(java.lang.String publicKey,
java.lang.String privateKey,
java.lang.String subject) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.util.concurrent.Future<org.apache.http.HttpResponse> |
sendAsync(Notification notification)
Deprecated.
Use
PushAsyncService.send(Notification) instead. |
java.util.concurrent.Future<org.apache.http.HttpResponse> |
sendAsync(Notification notification,
Encoding encoding)
Deprecated.
Use
PushAsyncService.send(Notification, Encoding) instead. |
encrypt, getGcmApiKey, getKeyPair, getPrivateKey, getPublicKey, getSubject, prepareRequest, setGcmApiKey, setKeyPair, setPrivateKey, setPrivateKey, setPublicKey, setPublicKey, setSubject, vapidEnabledpublic PushService()
public PushService(java.lang.String gcmApiKey)
public PushService(java.security.KeyPair keyPair)
public PushService(java.security.KeyPair keyPair,
java.lang.String subject)
public PushService(java.lang.String publicKey,
java.lang.String privateKey)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic PushService(java.lang.String publicKey,
java.lang.String privateKey,
java.lang.String subject)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic org.apache.http.HttpResponse send(Notification notification, Encoding encoding) throws java.security.GeneralSecurityException, java.io.IOException, org.jose4j.lang.JoseException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
notification - encoding - java.security.GeneralSecurityExceptionjava.io.IOExceptionorg.jose4j.lang.JoseExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic org.apache.http.HttpResponse send(Notification notification) throws java.security.GeneralSecurityException, java.io.IOException, org.jose4j.lang.JoseException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.security.GeneralSecurityExceptionjava.io.IOExceptionorg.jose4j.lang.JoseExceptionjava.util.concurrent.ExecutionExceptionjava.lang.InterruptedException@Deprecated public java.util.concurrent.Future<org.apache.http.HttpResponse> sendAsync(Notification notification, Encoding encoding) throws java.security.GeneralSecurityException, java.io.IOException, org.jose4j.lang.JoseException
PushAsyncService.send(Notification, Encoding) instead.notification - encoding - java.security.GeneralSecurityExceptionjava.io.IOExceptionorg.jose4j.lang.JoseException@Deprecated public java.util.concurrent.Future<org.apache.http.HttpResponse> sendAsync(Notification notification) throws java.security.GeneralSecurityException, java.io.IOException, org.jose4j.lang.JoseException
PushAsyncService.send(Notification) instead.java.security.GeneralSecurityExceptionjava.io.IOExceptionorg.jose4j.lang.JoseExceptionpublic org.apache.http.client.methods.HttpPost preparePost(Notification notification, Encoding encoding) throws java.security.GeneralSecurityException, java.io.IOException, org.jose4j.lang.JoseException
notification - encoding - java.security.GeneralSecurityExceptionjava.io.IOExceptionorg.jose4j.lang.JoseException