Examples of connect()


Examples of javax.mail.Store.connect()

               ErrorCode.RESOURCE_CONFIGURATION, Pop3Driver.class.getName(),
               "No POP3 provider for url '" + getUrlWithoutPassword()
                     + "' found", e);
      }
      try {
         store.connect();
         if (!this.isConnected) { // Avoid too many logging output
            log.info("Successfully contacted POP3 server '"
                  + getUrlWithoutPassword() + "', we poll every "
                  + this.pollingInterval + " milliseconds for emails.");
            this.isConnected = true;
View Full Code Here

Examples of javax.mail.Transport.connect()

                    mailSession.getProperties().put("mail.smtp.host", mx_host);
                    InternetAddress smtp_host = new InternetAddress(mx_host);
                    try {
                        transport = mailSession.getTransport(smtp_host);
                        try {
                            transport.connect();
                            log("INFO: connected to "+mx_host);
                        } catch (MessagingException me) {
                            // Any error on connect should cause the mailet to attempt
                            // to connect to the next SMTP server associated with this
                            // MX record.  Just log the exception.  We'll worry about
View Full Code Here

Examples of javax.management.remote.JMXConnector.connect()

            };
            environment.put(JMXConnector.CREDENTIALS, credentials);
        }

        JMXConnector jmxConnector = JMXConnectorFactory.newJMXConnector(jmxUrl, environment);
        jmxConnector.connect(environment);

        try {
            return processJmxConnector(jmxConnector, definition);
        } finally {
            jmxConnector.close();
View Full Code Here

Examples of javax.media.protocol.DataSource.connect()

      try
      {
        final Class dataSourceClass = Class.forName(dataSourceClassName);
        final DataSource dataSource = (DataSource) dataSourceClass.newInstance();
        dataSource.setLocator(sourceLocator);
        dataSource.connect();
        return createPlayer(dataSource);
       
        // TODO: JMF seems to disconnect data sources in this method, based on this stack trace:
//        java.lang.NullPointerException
//        at com.sun.media.protocol.rtp.DataSource.disconnect(DataSource.java:207)
View Full Code Here

Examples of javax.media.protocol.URLDataSource.connect()

    catch (Exception e)
    {  logger.log(Level.WARNING, ""  + e, e);
      throw new NoPlayerException();
    }
    final URLDataSource dataSource = new URLDataSource(url);
    dataSource.connect()// TODO: there is a problem because we connect to the datasource here, but
                // the following call may try twice or more to use the datasource with a player, once
                // for the right content type, and multiple times for unknown.  The first attempt (for example) may actually
                // read data, in which case the second one will be missing data when it reads.
                // really, the datasource needs to be recreated.
                // The workaround for now is that URLDataSource (and others) allows repeated connect() calls.
View Full Code Here

Examples of javax.net.ssl.HttpsURLConnection.connect()

//    urlConnection.setRequestMethod("POST");
//    urlConnection.setRequestProperty("Content-Length", String.valueOf(body.length));
//    urlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
//    urlConnection.setDoOutput(true);
//    urlConnection.setDoInput(true);
    urlConnection.connect();
//    OutputStream os = urlConnection.getOutputStream();
//    os.write(body);
//    os.flush();
//    os.close();
    System.out.println("Query:" + url.getQuery());
View Full Code Here

Examples of javax.net.ssl.SSLSocket.connect()

      throws IOException
   {
      initSSLContext();
      SSLSocketFactory factory = sslCtx.getSocketFactory();
      SSLSocket socket = (SSLSocket)factory.createSocket();
      socket.connect(new InetSocketAddress(serverAddr, serverPort), timeout);
      String[] supportedProtocols = socket.getSupportedProtocols();
      log.debug("Supported protocols: " + Arrays.asList(supportedProtocols));
      String[] protocols = supportedProtocols; // {"SSLv3"};
      socket.setEnabledProtocols(protocols);
      socket.addHandshakeCompletedListener(this);
View Full Code Here

Examples of javax.obex.ClientSession.connect()

                ClientSession cs = null;
                try {
                    // Send a request to the server to open a connection
                    connection = Connector.open(_url);
                    cs = (ClientSession) connection;
                    cs.connect(null);
                    updateStatus("[CLIENT] OPP session created");

                    // Send a file with meta data to the server
                    final byte filebytes[] = "[CLIENT] Hello..".getBytes();
                    final HeaderSet hs = cs.createHeaderSet();
View Full Code Here

Examples of javax.rmi.CORBA.Stub.connect()

                        clazz = (Class) in.readObject();
                        obj = in.readObject();
                        if (obj instanceof Stub) {
                            Stub stub = (Stub) obj;
                            ORB orb = getORB();
                            stub.connect(orb);
                        }
                        break;
                    default:
                        throw new IOException("Unkown data type: " + type);
                }
View Full Code Here

Examples of javax.smartcardio.CardTerminal.connect()

        // Hier kann man gemaess
        // http://download.oracle.com/javase/6/docs/jre/api/security/smartcardio/spec/javax/smartcardio/CardTerminal.html#connect%28java.lang.String%29
        // auch "T=0" oder "T=1" angeben. Wir wissen allerdings noch nicht, von welchem
        // Typ die Karte ist. Daher nehmen wir "*" fuer jedes verfuegbare. Wenn wir die
        // Karte geoeffnet haben, kriegen wir dann auch das Protokoll raus.
        this.smartCard = terminal.connect("*");
        String type = this.smartCard.getProtocol();
        HBCIUtils.log(" card type: " + type,HBCIUtils.LOG_INFO);
       
        // Card-Service basierend auf dem Kartentyp erzeugen
        if (type == null || type.indexOf("=") == -1)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.