Package net.rim.device.api.io.transport

Examples of net.rim.device.api.io.transport.ConnectionDescriptor


        } else {
          _url += "?" + params;
        }
      }
           
      ConnectionDescriptor connDesc = _factory.getConnection(_url);
     
      if (connDesc != null) {
        Logger.info("URL: " + connDesc.getUrl());
        try {
          if (isHTTPS) {
            hc = (HttpsConnection) connDesc.getConnection();
          } else {
            hc = (HttpConnection) connDesc.getConnection();
          }   
       
          hc.setRequestMethod(_method);
         
          if (_headers != null) {
View Full Code Here


        isHTTPS = true;
        Logger.error("Setting End to End");
        _factory.setEndToEndDesired(isHTTPS);
      }
           
      ConnectionDescriptor connDesc = _factory.getConnection(_url);
     
      if (connDesc != null) {
        Logger.info("URL: " + connDesc.getUrl());
        try {
          if (isHTTPS) {
            hc = (HttpsConnection) connDesc.getConnection();
          } else {
            hc = (HttpConnection) connDesc.getConnection();
          }
         
          String startBoundary = getStartBoundary(_fileKey, fc.getName(), _mimeType);
          String endBoundary = getEndBoundary();
         
View Full Code Here

        /**
         * @see Runnable#run()
         */
        public void run() {
            ConnectionDescriptor conDescriptor = null;

            if (_preferredTransports != null) {
                // Set factory to use preferred transports
                if (_preferredTransports.length > 1) {
                    _factory.setPreferredTransportTypes(_preferredTransports);
View Full Code Here

        public void run() {
            // Create a ConnectionFactory
            final ConnectionFactory factory = new ConnectionFactory();

            // Use the factory to get a connection
            final ConnectionDescriptor connectionDescriptor =
                    factory.getConnection(_url, _connectionType, _connectionUID);

            if (connectionDescriptor != null) {
                // Connection succeeded
                final int transportUsed =
                        connectionDescriptor.getTransportDescriptor()
                                .getTransportType();
                UiApplication.getUiApplication().invokeLater(new Runnable() {
                    /**
                     * @see Runnable#run()
                     */
                    public void run() {
                        Status.show("Connection succeeded using transport ID: "
                                + transportUsed, 2000);
                    }
                });

                final UDPDatagramConnection udpCon =
                        (UDPDatagramConnection) connectionDescriptor
                                .getConnection();
                try {
                    final byte[] buf = new byte[256];

                    // Send request
View Full Code Here

TOP

Related Classes of net.rim.device.api.io.transport.ConnectionDescriptor

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.