net.rim.pushsdk.subscription.auth
Class BaseAuthenticationRequest

java.lang.Object
  extended by net.rim.pushsdk.subscription.auth.BaseAuthenticationRequest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthenticationRequest

public class BaseAuthenticationRequest
extends Object
implements Serializable

Base class representing the details from an HTTP request to be used for authenticating a subscriber.

Since:
1.1
Author:
mdandrea
See Also:
Serialized Form

Field Summary
static String APP_ID_ERROR_FIELD
          Field which will always appear in exceptions thrown relating to the push application id.
protected  String pushApplicationId
          The id of the push application a user is attempting to authenticate for.
protected  String username
          The username that will be used to authenticate a subscriber.
static String USERNAME_ERROR_FIELD
          Field which will always appear in exceptions thrown relating to the subscriber's username.
 
Constructor Summary
BaseAuthenticationRequest()
          Constructs a base authentication request.
BaseAuthenticationRequest(String pushApplicationId, String username)
          Constructs a base authentication request with the given push app id and username.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two base authentication requests are found to be equal and false otherwise.
 String getPushApplicationId()
          Gets the current value of the push application id.
 String getUsername()
          Gets the current username of a subscriber.
 int hashCode()
          Returns a hashcode for this base authentication request.
 void setPushApplicationId(String pushApplicationId)
          Sets the push application id.
 void setUsername(String username)
          Sets the subscriber's username.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

APP_ID_ERROR_FIELD

public static final String APP_ID_ERROR_FIELD
Field which will always appear in exceptions thrown relating to the push application id.

See Also:
Constant Field Values

USERNAME_ERROR_FIELD

public static final String USERNAME_ERROR_FIELD
Field which will always appear in exceptions thrown relating to the subscriber's username.

See Also:
Constant Field Values

pushApplicationId

protected String pushApplicationId
The id of the push application a user is attempting to authenticate for.


username

protected String username
The username that will be used to authenticate a subscriber.

Constructor Detail

BaseAuthenticationRequest

public BaseAuthenticationRequest()
Constructs a base authentication request.


BaseAuthenticationRequest

public BaseAuthenticationRequest(String pushApplicationId,
                                 String username)
Constructs a base authentication request with the given push app id and username.

Parameters:
pushApplicationId - the push application id
username - the username of a subscriber
Method Detail

getPushApplicationId

public String getPushApplicationId()
Gets the current value of the push application id.

Returns:
a push application id

setPushApplicationId

public void setPushApplicationId(String pushApplicationId)
Sets the push application id.

Parameters:
pushApplicationId - the push application id

getUsername

public String getUsername()
Gets the current username of a subscriber.

Returns:
the username that will be used to authenticate a subscriber

setUsername

public void setUsername(String username)
Sets the subscriber's username.

Parameters:
username - the username that will be used to authenticate a subscriber

hashCode

public int hashCode()
Returns a hashcode for this base authentication request.

Overrides:
hashCode in class Object
Returns:
a hashcode for this base authentication request.

equals

public boolean equals(Object obj)
Returns true if two base authentication requests are found to be equal and false otherwise.

Overrides:
equals in class Object
Returns:
whether two base authentication requests are equal

toString

public String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class Object
Returns:
a String representation of this object.


Copyright © 2011 Research In Motion. All Rights Reserved.