public interface WebPushServer
| Modifier and Type | Method and Description |
|---|---|
WebPushServerConfig |
config()
Returns the configuration for this WebPush server.
|
Optional<String> |
getMessage(String endpoint)
Handles the retrieval of a subscriptions's message.
|
void |
monitor(String registrationId,
String endpoint)
Handles device monitorURI requests which are a signal to the server to begin delivering
push notification/messages to the client.
|
Optional<Subscription> |
newSubscription(String registrationId)
Handles the creation of new subscriptions for a registration.
|
Registration |
register()
|
Optional<Registration> |
registration(String id)
Returns the
Registration for the specified id. |
void |
removeSubscription(Subscription subscription)
Removes the specified subscription.
|
void |
setMessage(String endpoint,
Optional<String> content)
Set the notifcation/message for a subscription.
|
Optional<Subscription> |
subscription(String endpoint)
Retrieves a subscriptions.
|
Registration register()
This establishes a shared session between the device and the server. A new registration does not have any subscriptions associated with it.
Registration the response for this registrationOptional<Registration> registration(String id)
Registration for the specified id.id - the registration identifier.Optional Registration with the registration or Optional.emptyOptional<Subscription> newSubscription(String registrationId)
registrationId - the registration id that this new subscription belongs toOptional<Subscription> subscription(String endpoint)
endpoint - the endpoint to retrieveOptional an Optional Subscriptionvoid removeSubscription(Subscription subscription)
subscription - the subscription to be removedOptional<String> getMessage(String endpoint)
endpoint - the endpoint for the subscriptoinvoid setMessage(String endpoint, Optional<String> content)
endpoint - that identifies the subscription.content - the new content.void monitor(String registrationId, String endpoint)
registrationId - the id of the registration.endpoint - the endpointWebPushServerConfig config()
WebPushServerConfig this servers configuration.Copyright © 2015 JBoss by Red Hat. All Rights Reserved.