net.rim.pushsdk.query.subscription
Class SubscriptionQueryRequest

java.lang.Object
  extended by net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
      extended by net.rim.pushsdk.query.subscription.SubscriptionQueryRequest
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SubQueryRequestByAddress, SubQueryRequestByStatus

public abstract class SubscriptionQueryRequest
extends SubscriptionQueryMessage

Represents a subscription query request to the PPG.

Author:
mdandrea
See Also:
Serialized Form

Field Summary
static String QUERY_REQUEST_TAG
          The subscription query request XML 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
SubscriptionQueryRequest(String pushApplicationId)
          Constructs a subscription query request message with the given push app id.
 
Method Summary
abstract  void getContent(ByteArrayOutputStream out)
          Writes content to the specified output stream.
 void marshal(ByteArrayOutputStream out)
          Marshals the subscription query request message to the given output stream.
 
Methods inherited from class net.rim.pushsdk.query.subscription.SubscriptionQueryMessage
equals, getPushApplicationId, hashCode, setPushApplicationId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_REQUEST_TAG

public static final String QUERY_REQUEST_TAG
The subscription query request XML tag.

See Also:
Constant Field Values
Constructor Detail

SubscriptionQueryRequest

public SubscriptionQueryRequest(String pushApplicationId)
Constructs a subscription query request message with the given push app id.

Parameters:
pushApplicationId - the push application id
Method Detail

marshal

public void marshal(ByteArrayOutputStream out)
             throws IOException
Marshals the subscription query request message to the given output stream.

This method will call getContent(ByteArrayOutputStream) as the content of the request can vary based on whether it is by addresses or by status.

Parameters:
out - the output stream
Throws:
IllegalArgumentException - if the content specified fails validation
IOException - if any IO errors occur while writing to the output stream

getContent

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

Parameters:
out - the output stream
Throws:
IllegalArgumentException - if the content specified fails validation
IOException - if any IO errors occur while writing to the output stream


Copyright © 2011 Research In Motion. All Rights Reserved.