AeroGear SimplePush Server API 0.11.0

org.jboss.aerogear.simplepush.server
Class DefaultChannel

java.lang.Object
  extended by org.jboss.aerogear.simplepush.server.DefaultChannel
All Implemented Interfaces:
Channel

public class DefaultChannel
extends Object
implements Channel


Constructor Summary
DefaultChannel(String uaid, String channelId, long version, String endpointToken)
           
DefaultChannel(String uaid, String channelId, String endpointToken)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getChannelId()
          Returns the channelId for this channel.
 String getEndpointToken()
          Returns the endpoint token for this channel.
 String getUAID()
          A unique identifier for a UserAgent created by the SimplePush Server.
 long getVersion()
          Returns the version for this channel.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultChannel

public DefaultChannel(String uaid,
                      String channelId,
                      String endpointToken)

DefaultChannel

public DefaultChannel(String uaid,
                      String channelId,
                      long version,
                      String endpointToken)
Method Detail

getUAID

public String getUAID()
Description copied from interface: Channel
A unique identifier for a UserAgent created by the SimplePush Server.

Specified by:
getUAID in interface Channel
Returns:
String a unique id for a UserAgent, or an empty String if the UserAgent has not been assigned a uaid yet, or wants to reset it, which will create a new one.

getChannelId

public String getChannelId()
Description copied from interface: Channel
Returns the channelId for this channel. This identifier will be create on by the UserAgent and sent to the SimplePush Server.

Specified by:
getChannelId in interface Channel
Returns:
String this channels identifier.

getVersion

public long getVersion()
Description copied from interface: Channel
Returns the version for this channel. The version is maintained and updated by the server side applications triggering push notifications. It is the server side application that will issue a PUT HTTP request with the update version to the SimplePush Server which in turn will notifiy the channel of the update.

Specified by:
getVersion in interface Channel
Returns:
long the version for this channel.

getEndpointToken

public String getEndpointToken()
Description copied from interface: Channel
Returns the endpoint token for this channel. This is the endpoint token that an encrypted hash of the UserAgent ID, a ':', and the channel Id.

Specified by:
getEndpointToken in interface Channel
Returns:
String the endpoint token.

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

AeroGear SimplePush Server API 0.11.0

Copyright © 2014 JBoss by Red Hat. All Rights Reserved.