javapns.notification
Class AppleNotificationServerBasicImpl
java.lang.Object
javapns.communication.AppleServerBasicImpl
javapns.notification.AppleNotificationServerBasicImpl
- All Implemented Interfaces:
- AppleServer, AppleNotificationServer
public class AppleNotificationServerBasicImpl
- extends AppleServerBasicImpl
- implements AppleNotificationServer
Basic implementation of the AppleNotificationServer interface,
intended to facilitate rapid deployment.
- Author:
- Sylvain Pedneault
AppleNotificationServerBasicImpl
public AppleNotificationServerBasicImpl(Object keystore,
String password,
boolean production)
throws KeystoreException
- Communication settings for interacting with Apple's default production or sandbox notification server.
This constructor uses the recommended keystore type "PCKS12".
- Parameters:
keystore
- a keystore containing your private key and the certificate signed by Apple (File, InputStream, byte[], KeyStore or String for a file path)password
- the keystore's passwordproduction
- true to use Apple's production servers, false to use the sandbox
- Throws:
KeystoreException
- thrown if an error occurs when loading the keystore
AppleNotificationServerBasicImpl
public AppleNotificationServerBasicImpl(Object keystore,
String password,
String type,
boolean production)
throws KeystoreException
- Communication settings for interacting with Apple's default production or sandbox notification server.
- Parameters:
keystore
- a keystore containing your private key and the certificate signed by Apple (File, InputStream, byte[], KeyStore or String for a file path)password
- the keystore's passwordtype
- the keystore's typeproduction
- true to use Apple's production servers, false to use the sandbox
- Throws:
KeystoreException
- thrown if an error occurs when loading the keystore
AppleNotificationServerBasicImpl
public AppleNotificationServerBasicImpl(Object keystore,
String password,
String type,
String host,
int port)
throws KeystoreException
- Communication settings for interacting with a specific Apple Push Notification Server.
- Parameters:
keystore
- a keystore containing your private key and the certificate signed by Apple (File, InputStream, byte[], KeyStore or String for a file path)password
- the keystore's passwordtype
- the keystore's typehost
- a specific APNS hostport
- a specific APNS port
- Throws:
KeystoreException
- thrown if an error occurs when loading the keystore
getNotificationServerHost
public String getNotificationServerHost()
- Specified by:
getNotificationServerHost
in interface AppleNotificationServer
getNotificationServerPort
public int getNotificationServerPort()
- Specified by:
getNotificationServerPort
in interface AppleNotificationServer