net.rim.pushsdk.query.subscription
Class SubQueryRequestByAddress

java.lang.Object
  extended by net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
      extended by net.rim.pushsdk.query.subscription.SubscriptionQueryRequest
          extended by net.rim.pushsdk.query.subscription.SubQueryRequestByAddress
All Implemented Interfaces:
Serializable

public class SubQueryRequestByAddress
extends SubscriptionQueryRequest

Represents a subscription query request by address to the PPG.

Author:
mdandrea
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryRequest
QUERY_REQUEST_TAG
 
Fields inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
ADDRESS_ATTR, ADDRESS_TAG, CURRENT_MSG_VERSION, EVENT_TIME_ATTR, PUSHAPP_ID_ATTR, pushApplicationId, QUERY_OUTERMOST_TAG, VERSION_ATTR
 
Constructor Summary
SubQueryRequestByAddress(String pushApplicationId, Set<String> addresses)
          Constructs a subscription query request message for the given push application and with the given list of addresses.
 
Method Summary
 boolean equals(Object obj)
          Returns true if two subscription query request messages (by address) are found to be equal and false otherwise.
 Set<String> getAddresses()
          Gets the addresses e.g.
 void getContent(ByteArrayOutputStream out)
          Writes content to the specified output stream.
 int hashCode()
          Returns a hashcode for this subscription query request message (by address).
 void setAddresses(Set<String> addresses)
          Sets the addresses (e.g.
 String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryRequest
marshal
 
Methods inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
getPushApplicationId, setPushApplicationId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubQueryRequestByAddress

public SubQueryRequestByAddress(String pushApplicationId,
                                Set<String> addresses)
Constructs a subscription query request message for the given push application and with the given list of addresses.

Parameters:
pushApplicationId - the push application id
addresses - the list of addresses (e.g. PINs)
Method Detail

getAddresses

public Set<String> getAddresses()
Gets the addresses e.g. PINs).

Returns:
the list of addresses

setAddresses

public void setAddresses(Set<String> addresses)
Sets the addresses (e.g. PINs).

Parameters:
addresses - the list of addresses

getContent

public void getContent(ByteArrayOutputStream out)
                throws IOException
Description copied from class: SubscriptionQueryRequest
Writes content to the specified output stream. The exact content depends on whether the request is by addresses or by status.

Specified by:
getContent in class SubscriptionQueryRequest
Parameters:
out - the output stream
Throws:
IOException - if any IO errors occur while writing to the output stream

hashCode

public int hashCode()
Returns a hashcode for this subscription query request message (by address).

Overrides:
hashCode in class SubscriptionQueryMessage
Returns:
a hashcode for this subscription query request message (by address).

equals

public boolean equals(Object obj)
Returns true if two subscription query request messages (by address) are found to be equal and false otherwise.

Overrides:
equals in class SubscriptionQueryMessage
Returns:
whether two subscription query request messages (by address) are equal

toString

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

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


Copyright © 2011 Research In Motion. All Rights Reserved.