public class ApnsEnvironment extends Object
An APNs environment is a set of servers that provide push notification services. Apple provides two environments: one production environment and one "sandbox" environment. Custom environments may be created for development and testing purposes. For instructions on getting credentials for communicating with Apple's gateway, see "Provisioning and Development".
Constructor and Description |
---|
ApnsEnvironment(String apnsGatewayHost,
int apnsGatewayPort,
String feedbackHost,
int feedbackPort)
Constructs a new APenvironment with the given host names and ports.
|
Modifier and Type | Method and Description |
---|---|
String |
getApnsGatewayHost()
Returns the host name of the APNs gateway in this environment.
|
int |
getApnsGatewayPort()
Returns the TCP port for the APNs gateway in this environment.
|
String |
getFeedbackHost()
Returns the host name of the APNs feedback service in this environment.
|
int |
getFeedbackPort()
Returns the TCP port for the APNs feedback service in this environment.
|
static ApnsEnvironment |
getProductionEnvironment()
Returns an APNs environment for connecting to Apple's production servers.
|
static ApnsEnvironment |
getSandboxEnvironment()
Returns an APNs environment for connecting to Apple's sandbox servers.
|
public ApnsEnvironment(String apnsGatewayHost, int apnsGatewayPort, String feedbackHost, int feedbackPort)
apnsGatewayHost
- the host name of the APNs gatewayapnsGatewayPort
- the TCP port for the APNs gatewayfeedbackHost
- the host name of the APNs feedback servicefeedbackPort
- the TCP port for the APNs feedback servicepublic String getApnsGatewayHost()
public int getApnsGatewayPort()
public String getFeedbackHost()
public int getFeedbackPort()
public static ApnsEnvironment getProductionEnvironment()
public static ApnsEnvironment getSandboxEnvironment()
Copyright © 2013–2015 RelayRides. All rights reserved.