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

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


        /**
         * @see Thread#run()
         */
        public void run() {
            BlockingReceiverDestination blockRecvDest = null;
            try {
                blockRecvDest =
                        (BlockingReceiverDestination) DestinationFactory
                                .getReceiverDestination(URI.create(_uriStr));

                if (blockRecvDest == null) // Not registered yet
                {
                    InboundDestinationConfiguration config;

                    // Prepare the inbound destination for incoming messages
                    if (_configType == InboundDestinationConfiguration.CONFIG_TYPE_BES) {
                        config =
                                InboundDestinationConfigurationFactory
                                        .createBESConfiguration(
                                                _autoStartEnabled, true, false);
                    } else if (_configType == InboundDestinationConfiguration.CONFIG_TYPE_IPC) {
                        config =
                                InboundDestinationConfigurationFactory
                                        .createIPCConfiguration(
                                                _autoStartEnabled, true, false);
                    } else {
                        throw new IllegalArgumentException(
                                "Invalid InboundDestinationConfiguration type! Implemented support of IPC and BES only.");
                    }

                    blockRecvDest =
                            DestinationFactory
                                    .createBlockingReceiverDestination(config,
                                            URI.create(_uriStr));
                }

                String alertString = "";
                _response = blockRecvDest.receive(_timeout * 1000);

                if (_response != null) {
                    alertString =
                            "RECEIVED[id: " + _response.getMessageId() + "]:";
                    final String stringPayload =
View Full Code Here

TOP

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

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.