/** * Specify to use the Apple sandbox servers as iPhone gateway * and feedback servers. * * This is desired when in testing and pushing notifications * with a development provision. * * @return this */ public ApnsServiceBuilder withSandboxDestination() { return withGatewayDestination(SANDBOX_GATEWAY_HOST, SANDBOX_GATEWAY_PORT) .withFeedbackDestination(SANDBOX_FEEDBACK_HOST, SANDBOX_FEEDBACK_PORT); }
/** * Specify to use the Apple Production servers as iPhone gateway * and feedback servers. * * This is desired when sending notifications to devices with * a production provision (whether through App Store or Ad hoc * distribution). * * @return this */ public ApnsServiceBuilder withProductionDestination() { return withGatewayDestination(PRODUCTION_GATEWAY_HOST, PRODUCTION_GATEWAY_PORT) .withFeedbackDestination(PRODUCTION_FEEDBACK_HOST, PRODUCTION_FEEDBACK_PORT); }
private void configureApnsDestinations(ApnsServiceBuilder builder) { ParamUtils.checkDestination(getGatewayHost(), getGatewayPort(), "gateway"); ParamUtils.checkDestination(getFeedbackHost(), getFeedbackPort(), "feedback"); if (ObjectHelper.isNotEmpty(getGatewayHost())) { builder.withGatewayDestination(getGatewayHost(), getGatewayPort()); } if (ObjectHelper.isNotEmpty(getFeedbackHost())) { builder.withFeedbackDestination(getFeedbackHost(), getFeedbackPort()); } }