net.rim.device.api.io.messaging
Class BpsSubscriptionMessageBuilder

java.lang.Object
  extended by net.rim.device.api.io.messaging.BpsSubscriptionMessageBuilder

public class BpsSubscriptionMessageBuilder
extends Object

Creates a subscription message in the BlackBerry® Push Service (BPS) format that can be used to subscribe to a BPS server application. The following fields are automatically populated in the query parameters:

These subscription fields should be specified by the application:

Since:
BlackBerry API 6.0.0

Method Summary
static ByteMessage createByteSubscriptionMessage(SenderDestination subscribeDestination, ReceiverDestination receiverDestination, String username, String password)
          Creates a subscription request to send to a SenderDestination.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

createByteSubscriptionMessage

public static ByteMessage createByteSubscriptionMessage(SenderDestination subscribeDestination,
                                                        ReceiverDestination receiverDestination,
                                                        String username,
                                                        String password)
Creates a subscription request to send to a SenderDestination. The listenDestination is the recepient of messages from the subscription source. ByteMessage objects can be used to subscribe, unsubscribe, suspend, or resume a subscription to a service depending on the URL of the subscribeDestination. If there are user-defined query parameters to pass to the subscription destination, the application should add them to the ByteMessage returned prior to sending it.

Parameters:
subscribeDestination - The Destination to which the subscription message will be sent.
receiverDestination - The Destination that will receive messages from the subscription source.
username - A username for authenticating subscription requests, or null if not required.
password - A password for authenticating subscription requests, or null if not required.
Returns:
A SubscriptionMessage with headers populated to create subscription to the local URI corresponding with localDestination.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.