net.rim.pushsdk.pap.control
Class StatusQueryMessageControl

java.lang.Object
  extended by net.rim.pushsdk.pap.control.PapControl
      extended by net.rim.pushsdk.pap.control.StatusQueryMessageControl

public class StatusQueryMessageControl
extends PapControl

Represents the Status Query PAP request message control (XML).

Author:
mdicesare

Field Summary
 
Fields inherited from class net.rim.pushsdk.pap.control.PapControl
ATTRIBUTE_KEY_VALUE_SEPARATOR, CLOSE_BRACKET, CLOSE_BRACKET_WITH_SLASH, DTD_DECLARATION_BES, DTD_DECLARATION_PUBLIC, EPILOGUE, ESCAPED_DOUBLE_QUOTE, FORWARD_SLASH, NEW_LINE, OPEN_BRACKET, OPEN_BRACKET_WITH_SLASH, PREAMBLE_BES, PREAMBLE_PUBLIC, pushId, pushSDKProperties, usingPublicPush, XML_DECLARATION
 
Constructor Summary
StatusQueryMessageControl()
          Deprecated. As of release 1.1, replaced by the StatusQueryMessageControl(boolean) constructor instead. To use this constructor, you must configure the SDK to be in public or enterprise mode through the PushSDK.properties file by setting the use.public.push flag.
StatusQueryMessageControl(boolean usingPublicPush)
          Constructs a status query message control to query either a public (BIS) push or an enterprise (BES) push.
StatusQueryMessageControl(boolean usingPublicPush, String pushId)
          Constructs a status query message control, to query either a public (BIS) push or an enterprise (BES) push, with the given push id.
StatusQueryMessageControl(boolean usingPublicPush, String pushId, List<String> addresses)
          Constructs a status query message control, to query either a public (BIS) push or an enterprise (BES) push, with the given push id and the list of addresses.
StatusQueryMessageControl(String pushId)
          Deprecated. As of release 1.1, replaced by the StatusQueryMessageControl(boolean, String) constructor instead. To use this constructor, you must configure the SDK to be in public or enterprise mode through the PushSDK.properties file by setting the use.public.push flag.
StatusQueryMessageControl(String pushId, List<String> addresses)
          Deprecated. As of release 1.1, replaced by the StatusQueryMessageControl(boolean, String, List) constructor instead. To use this constructor, you must configure the SDK to be in public or enterprise mode through the PushSDK.properties file by setting the use.public.push flag.
 
Method Summary
 AddressList getAddresses()
          Deprecated. As of release 1.1, replaced by getAddressList().
 List<String> getAddressList()
          Gets the list of addresses associated with the status query message control.
 String getPushId()
          Gets the push id associated with the status query message control.
 void setAddresses(AddressList addresses)
          Deprecated. As of release 1.1, replaced by setAddressList(List).
 void setAddressList(List<String> addresses)
          Sets the address list associated with the status query message control.
 void setPushId(String pushId)
          Sets the push id associated with the status query message control.
 String toString()
          Constructs a String with all attributes in name = value format.
protected  void validate()
          Validates the following:
- the push id is not null
- the push id does not contain certain special characters (see the "parser.special.characters" property in PushSDK.properties for the full list)
- if the address list is specified, it passes validation
 void writeTo(ByteArrayOutputStream out)
          Writes the PAP control out to the specified output stream.
 
Methods inherited from class net.rim.pushsdk.pap.control.PapControl
getAttribute, getContentType, getEndTag, getEpilogue, getPreamble, getStartTagClosed, getStartTagOpen, isUsingPublicPush, setPushSDKProperties, setUsingPublicPush, validatePushIdForSpecialCharacters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatusQueryMessageControl

@Deprecated
public StatusQueryMessageControl()
Deprecated. As of release 1.1, replaced by the StatusQueryMessageControl(boolean) constructor instead. To use this constructor, you must configure the SDK to be in public or enterprise mode through the PushSDK.properties file by setting the use.public.push flag.

Default status query message control constructor.


StatusQueryMessageControl

public StatusQueryMessageControl(boolean usingPublicPush)
Constructs a status query message control to query either a public (BIS) push or an enterprise (BES) push.

Parameters:
usingPublicPush - true if configuring for a public (BIS) push; false otherwise
Since:
1.1

StatusQueryMessageControl

@Deprecated
public StatusQueryMessageControl(String pushId)
Deprecated. As of release 1.1, replaced by the StatusQueryMessageControl(boolean, String) constructor instead. To use this constructor, you must configure the SDK to be in public or enterprise mode through the PushSDK.properties file by setting the use.public.push flag.

Constructs a status query message control with the given push id.

Parameters:
pushId - the id of the push to use in the status query

StatusQueryMessageControl

public StatusQueryMessageControl(boolean usingPublicPush,
                                 String pushId)
Constructs a status query message control, to query either a public (BIS) push or an enterprise (BES) push, with the given push id.

Parameters:
usingPublicPush - true if configuring for a public (BIS) push; false otherwise
pushId - the id of the push to use in the status query
Since:
1.1

StatusQueryMessageControl

@Deprecated
public StatusQueryMessageControl(String pushId,
                                            List<String> addresses)
Deprecated. As of release 1.1, replaced by the StatusQueryMessageControl(boolean, String, List) constructor instead. To use this constructor, you must configure the SDK to be in public or enterprise mode through the PushSDK.properties file by setting the use.public.push flag.

Constructs a status query message control with the given push id and the list of addresses.

Parameters:
pushId - the id of the push to use in the status query
addresses - the list of addresses to query for

StatusQueryMessageControl

public StatusQueryMessageControl(boolean usingPublicPush,
                                 String pushId,
                                 List<String> addresses)
Constructs a status query message control, to query either a public (BIS) push or an enterprise (BES) push, with the given push id and the list of addresses.

Parameters:
usingPublicPush - true if configuring for a public (BIS) push; false otherwise
pushId - the id of the push to use in the status query
addresses - the list of addresses to query for
Since:
1.1
Method Detail

writeTo

public void writeTo(ByteArrayOutputStream out)
             throws IOException
Description copied from class: PapControl
Writes the PAP control out to the specified output stream.

Specified by:
writeTo in class PapControl
Parameters:
out - the output stream
Throws:
IOException - if any errors occur writing to the output stream

getPushId

public String getPushId()
Gets the push id associated with the status query message control.

Returns:
the push id

setPushId

public void setPushId(String pushId)
Sets the push id associated with the status query message control.

Parameters:
pushId - the push id

getAddresses

@Deprecated
public AddressList getAddresses()
Deprecated. As of release 1.1, replaced by getAddressList().

Gets the address list associated with the status query message control.

Returns:
the address list

getAddressList

public List<String> getAddressList()
Gets the list of addresses associated with the status query message control.

Returns:
the list of addresses
Since:
1.1

setAddresses

@Deprecated
public void setAddresses(AddressList addresses)
Deprecated. As of release 1.1, replaced by setAddressList(List).

Sets the address list associated with the status query message control.

Parameters:
addresses - the address list

setAddressList

public void setAddressList(List<String> addresses)
Sets the address list associated with the status query message control.

Parameters:
addresses - the address list
Since:
1.1

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.

validate

protected void validate()
Validates the following:
- the push id is not null
- the push id does not contain certain special characters (see the "parser.special.characters" property in PushSDK.properties for the full list)
- if the address list is specified, it passes validation

Specified by:
validate in class PapControl


Copyright © 2011 Research In Motion. All Rights Reserved.