public interface PushNotificationHandler
Push notification handlers process push notifications sent to a MockApnsServer and decide how the server
should respond to those notifications. Implementers can write handlers to simulate a variety of server behaviors and
error conditions without setting up elaborate pre-conditions.
Push notification handler instances are bound to a specific connection and will always be called by the same thread; as a result, implementations are inherently thread-safe.
PushNotificationHandlerFactory| Modifier and Type | Method and Description |
|---|---|
void |
handlePushNotification(Http2Headers headers,
ByteBuf payload)
Processes a push notification received by a mock server.
|
void handlePushNotification(Http2Headers headers, ByteBuf payload) throws RejectedNotificationException
RejectedNotificationException, the server will reject the notification. If implementations throw a
RuntimeException, the server will report an internal server error to clients.headers - the notification's HTTP/2 headerspayload - the notification's payload; may be empty or nullRejectedNotificationException - if the server should reject the push notification for a specific reasonCopyright © 2013–2018 Turo. All rights reserved.