public interface DataStore
| Modifier and Type | Method and Description |
|---|---|
Channel |
getChannel(String channelId)
Returns the Channel for the passed-in channelId.
|
Set<String> |
getChannelIds(String uaid)
Returns registered channel ids for a certain UserAgent Identifier (uaid)
|
byte[] |
getPrivateKeySalt()
Returns the server's private key salt.
|
Set<org.jboss.aerogear.simplepush.protocol.Ack> |
getUnacknowledged(String uaid)
Returns the
Acks that have been sent to a UserAgent as notifications. |
Set<org.jboss.aerogear.simplepush.protocol.Ack> |
removeAcknowledged(String uaid,
Set<org.jboss.aerogear.simplepush.protocol.Ack> acked)
Removes the
Acks from storage which should be done when a UserAgent
has acknowledged notifications. |
void |
removeChannels(Set<String> channelIds)
Removes all channels matching the set passed in.
|
void |
removeChannels(String uaid)
Removes all channels for a certain UserAgent Identifier (uaid).
|
boolean |
saveChannel(Channel channel)
Saves the channel to the underlying storage system.
|
void |
savePrivateKeySalt(byte[] salt)
Saves the server's private key salt.
|
String |
saveUnacknowledged(String channelId,
long version) |
String |
updateVersion(String endpointToken,
long version)
Updates the version for a channel (identified by the endpointToken)
|
void savePrivateKeySalt(byte[] salt)
salt - the server's private key salt.byte[] getPrivateKeySalt()
byte[] the server's private key salt if one has previously been saved, or an empty byte array.boolean saveChannel(Channel channel)
channel - the channel to be stored.true if storage was successful.Channel getChannel(String channelId) throws ChannelNotFoundException
channelId - of the channel to be retrieved.Channel the matching Channel, or null if no channel with the
channelId was found.ChannelNotFoundExceptionvoid removeChannels(String uaid)
uaid - the UserAgent Identifier for which all channels that belongs to
that id should be removed.void removeChannels(Set<String> channelIds)
channelIds - the ids of the channels to be removed.Set<String> getChannelIds(String uaid)
uaid - the UserAgent Identifier for which all channels that belongs to
that id should be removed.Set<String> the registered channels.String updateVersion(String endpointToken, long version) throws VersionException, ChannelNotFoundException
endpointToken - the unique identifier for the channel/uaid combination.version - the version to update to.String The channel id of the updated channelVersionExceptionChannelNotFoundExceptionString saveUnacknowledged(String channelId, long version) throws ChannelNotFoundException
channelId - the channelId that this update/ack belongs to.version - the String the version of the update.String the UserAgent Id for the channel.ChannelNotFoundExceptionSet<org.jboss.aerogear.simplepush.protocol.Ack> getUnacknowledged(String uaid)
Acks that have been sent to a UserAgent as notifications.uaid - the String of the UserAgentSet<Update> the updates waiting for notification.Set<org.jboss.aerogear.simplepush.protocol.Ack> removeAcknowledged(String uaid, Set<org.jboss.aerogear.simplepush.protocol.Ack> acked)
Acks from storage which should be done when a UserAgent
has acknowledged notifications.uaid - the String of the UserAgentacked - the Acks to be remove.Copyright © 2014 JBoss by Red Hat. All Rights Reserved.