public interface SimplePushServer
| Modifier and Type | Method and Description |
|---|---|
SimplePushServerConfig |
config()
Returns the configuration for this SimplePush server.
|
Set<org.jboss.aerogear.simplepush.protocol.Ack> |
getUnacknowledged(String uaid)
Returns all the un-acknowledged notifications for a specific UserAgent.
|
Set<org.jboss.aerogear.simplepush.protocol.Ack> |
handleAcknowledgement(org.jboss.aerogear.simplepush.protocol.AckMessage ackMessage,
String uaid)
Handles the 'ack' message in the SimplePush protocol which is acknowledge a notification.
|
org.jboss.aerogear.simplepush.protocol.HelloResponse |
handleHandshake(org.jboss.aerogear.simplepush.protocol.HelloMessage handshakeMessage)
Handles the handshake ('hello') message in the SimplePush protocol.
|
Notification |
handleNotification(String endpointToken,
String payload)
Handles the notification for a single channel
|
org.jboss.aerogear.simplepush.protocol.RegisterResponse |
handleRegister(org.jboss.aerogear.simplepush.protocol.RegisterMessage register,
String uaid)
Handles the 'register' message in the SimplePush protocol which is used to register a channel.
|
org.jboss.aerogear.simplepush.protocol.UnregisterResponse |
handleUnregister(org.jboss.aerogear.simplepush.protocol.UnregisterMessage unregisterMessage,
String uaid)
Handles the 'unregister' message in the SimplePush protocol which is used to register a channel.
|
void |
removeAllChannels(String uaid)
Removes all the channels associated with the UserAgent.
|
org.jboss.aerogear.simplepush.protocol.HelloResponse handleHandshake(org.jboss.aerogear.simplepush.protocol.HelloMessage handshakeMessage)
handshakeMessage - the HelloMessage.HelloResponse the handshake response.org.jboss.aerogear.simplepush.protocol.RegisterResponse handleRegister(org.jboss.aerogear.simplepush.protocol.RegisterMessage register,
String uaid)
register - the RegisterMessage.uaid - the UserAgent identifier that this channel will be registered for.RegisterResponse the response for this register message.org.jboss.aerogear.simplepush.protocol.UnregisterResponse handleUnregister(org.jboss.aerogear.simplepush.protocol.UnregisterMessage unregisterMessage,
String uaid)
unregisterMessage - the UnregisterMessage.uaid - the UserAgent identifier that this channel will be unregistered for.UnregisterResponse the response for this register message.Set<org.jboss.aerogear.simplepush.protocol.Ack> handleAcknowledgement(org.jboss.aerogear.simplepush.protocol.AckMessage ackMessage, String uaid)
ackMessage - the UnregisterMessage.uaid - the UserAgent identifier that this channel will be unregistered for.Set<Ack> a set of un-acknowledged channel ids.Set<org.jboss.aerogear.simplepush.protocol.Ack> getUnacknowledged(String uaid)
uaid - the UserAgent identifier for which unacked notifications should be retrieved.Set<Ack> a set of un-acknowledged channel ids.Notification handleNotification(String endpointToken, String payload) throws ChannelNotFoundException
endpointToken - the endpointToken for which this notification belongspayload - the payload which must be in the format "version=N".NotificationMessage The notification message that should be sent over the network to the
UserAgent. The actual communication is left to the underlying implementation.ChannelNotFoundExceptionvoid removeAllChannels(String uaid)
uaid - the UserAgent Identifier for which all associated channels should be removed.SimplePushServerConfig config()
SimplePushServerConfig this servers configuration.Copyright © 2014 JBoss by Red Hat. All Rights Reserved.