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.
- Jon Chambers
Interface Summary Interface Description MockApnsServerListenerMock APNs server listeners are notified when push notifications are accepted or rejected by a
PushNotificationHandlerPush notification handlers process push notifications sent to a
MockApnsServerand decide how the server should respond to those notifications.
PushNotificationHandlerFactoryA push notification handler factory constructs
PushNotificationHandlerinstances when a mock APNs server accepts a new connection.
Class Summary Class Description AcceptAllPushNotificationHandlerFactoryA factory for push notification handlers that unconditionally accept all push notifications. BenchmarkApnsServerA simple HTTP/2 server designed to crudely emulate the behavior of a real APNs server as simply and quickly as possible. BenchmarkApnsServerBuilderA
MockApnsServerA mock APNs server is an HTTP/2 server that can be configured to respond to APNs push notifications with a variety of behaviors. MockApnsServerBuilderA
ParsingMockApnsServerListenerAdapterA parsing APNs server listener is an abstract base class that parses HTTP/2 headers and payload byte buffers from a mock APNs server into
ApnsPushNotificationinstances for easier handling.
ValidatingPushNotificationHandlerFactoryA push notification handler factory that constructs handlers that, to the extent possible, perform the same checks and validation steps as a real APNs server.
Enum Summary Enum Description RejectionReasonAn enumeration of reasons a push notification may be rejected by an APNs server.
Exception Summary Exception Description RejectedNotificationExceptionAn exception thrown by
PushNotificationHandlerinstances to indicate that a push notification should be rejected by the server.
UnregisteredDeviceTokenExceptionAn exception thrown by
PushNotificationHandlerinstances 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).