Package net.rim.device.api.io.messaging

Examples of net.rim.device.api.io.messaging.NonBlockingSenderDestination


      return videosResults;
    }

    private void downloadThumbnail(String url, VideoData data) throws IllegalArgumentException, MessagingException,
        MalformedURIException {
      NonBlockingSenderDestination destination = DestinationFactory.createNonBlockingSenderDestination(_context,
          URI.create(url), this);
      destination.send();
      _thumbnailDestinations.put(destination, data);
    }
View Full Code Here


     * Registers/subscribes the application for receiving BPS pushes
     */
    public void registerBPSPush(final String appId, final String BPDSUri,
            final String contentUri, final String listenUri) {
        NonBlockingReceiverDestination listenDest = null;
        NonBlockingSenderDestination bpsServerDest = null;
        try {
            final MessageListener bpsListener =
                    new DestinationListener("BPS", true);

            final InboundDestinationConfiguration config1 =
                    InboundDestinationConfigurationFactory
                            .createBPSConfiguration(true, true, false, appId,
                                    BPDSUri); // serverUrl

            listenDest =
                    DestinationFactory.createNonBlockingReceiverDestination(
                            config1, URI.create(listenUri), bpsListener);
            final MessageListener subscriptionListener =
                    new SubscriptionResponseListener("Subscription");
            bpsServerDest =
                    DestinationFactory.createNonBlockingSenderDestination(
                            _context, URI.create(contentUri),
                            subscriptionListener);

            final ByteMessage subscrMsg =
                    BpsSubscriptionMessageBuilder
                            .createByteSubscriptionMessage(bpsServerDest,
                                    listenDest, "user", "pwd");

            ((HttpMessage) subscrMsg).setQueryParam("field1", "xxxxx");
            ((HttpMessage) subscrMsg).setQueryParam("osversion", "6.0");
            bpsServerDest.send(subscrMsg);
        } catch (final Exception e) {
            alertDialog(e.toString());
        }
    }
View Full Code Here

TOP

Related Classes of net.rim.device.api.io.messaging.NonBlockingSenderDestination

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.