Package com.eatthepath.pushy.apns.server
package com.eatthepath.pushy.apns.server
Contains classes and interfaces for working with mock APNs servers. Mock APNs servers are useful primarily for integration testing and benchmarking, and callers will not need to use anything in this package to send push notifications to a real APNs server.
Callers construct mock APNs servers using a MockApnsServerBuilder
. Mock servers
require a PushNotificationHandler
that controls whether the server accepts or
rejects individual notifications.
- Since:
- 0.12
- Author:
- Jon Chambers
-
ClassDescriptionA factory for push notification handlers that unconditionally accept all push notifications.A simple HTTP/2 server designed to crudely emulate the behavior of a real APNs server as simply and quickly as possible.A
BenchmarkApnsServerBuilder
constructs newBenchmarkApnsServer
instances.A mock APNs server is an HTTP/2 server that can be configured to respond to APNs push notifications with a variety of behaviors.AMockApnsServerBuilder
constructs newMockApnsServer
instances.Mock APNs server listeners are notified when push notifications are accepted or rejected by aMockApnsServer
.A parsing APNs server listener is an abstract base class that parses HTTP/2 headers and payload byte buffers from a mock APNs server intoApnsPushNotification
instances for easier handling.Push notification handlers process push notifications sent to aMockApnsServer
and decide how the server should respond to those notifications.A push notification handler factory constructsPushNotificationHandler
instances when a mock APNs server accepts a new connection.An exception thrown byPushNotificationHandler
instances to indicate that a push notification should be rejected by the server.An enumeration of reasons a push notification may be rejected by an APNs server.An exception thrown byPushNotificationHandler
instances to indicate that a push notification should be rejected by the server because its destination device token is no longer valid (presumably because the receiving app has been removed from the destination device).A push notification handler factory that constructs handlers that, to the extent possible, perform the same checks and validation steps as a real APNs server.