Examples of createSocket()


Examples of com.sun.faban.driver.transport.sunhttp.SocketFactory.createSocket()

     * @return The socket
     */
  public Socket createSocket(Proxy proxy) {
        if (userFactory instanceof SocketFactory) {
            SocketFactory userFactory = (SocketFactory) this.userFactory;
            return new TimedSocketWrapper(userFactory.createSocket(proxy));
        } else if (proxy == Proxy.NO_PROXY) {
            try {
                return createSocket();
            } catch (IOException e) {
                throw new RuntimeException(
View Full Code Here

Examples of com.volantis.shared.net.impl.http.client.jdk14.ProtocolSocketChannelFactory.createSocket()

        ProtocolSocketChannelFactory factory =
                new ProtocolSocketChannelFactory(Period.INDEFINITELY);

        String host = "-unknown-host-";
        try {
            factory.createSocket(host, 8080);
            fail("Did not detect unknown host");
        } catch (UnknownHostException expected) {
            assertEquals(host, expected.getMessage());
        }
View Full Code Here

Examples of fr.dyade.aaa.common.net.SocketFactory.createSocket()

      logger.log(BasicLevel.DEBUG,
                 "ReliableTcpClient[" + identity + ',' + key + "].createSocket(" +
                 hostname + "," + port + ") on interface " + outLocalAddrStr + ":" + outLocalPort);

    SocketFactory factory = SocketFactory.getFactory(params.socketFactory);
    Socket socket = factory.createSocket(addr, port,
                                         outLocalAddr, outLocalPort,
                                         params.connectingTimer *1000);

    return socket;
  }
View Full Code Here

Examples of java.rmi.server.RMIClientSocketFactory.createSocket()

        try {
            RMIClientSocketFactory clientFactory = csf;
            if (clientFactory == null) {
                clientFactory = chooseFactory();
            }
            socket = clientFactory.createSocket(host, port);

        } catch (java.net.UnknownHostException e) {
            throw new java.rmi.UnknownHostException(
                "Unknown host: " + host, e);
        } catch (java.net.ConnectException e) {
View Full Code Here

Examples of java.rmi.server.RMISocketFactory.createSocket()

        if (factory != null) {
            if (proxyLog.isLoggable(Log.BRIEF)) {
                proxyLog.log(Log.BRIEF,
                    "previously successful factory found: " + factory);
            }
            return factory.createSocket(host, port);
        }

        /*
         * Next, try a direct socket connection.  Open socket in another
         * thread and only wait for specified timeout, in case the socket
View Full Code Here

Examples of javax.net.SocketFactory.createSocket()

                 "ReliableSSLTcpClient[" + identity + ',' + key + "].createSocket(" +
                 hostname + "," + port + ") on interface " + outLocalAddrStr + ":" + outLocalPort);

    SocketFactory socketFactory = createSocketFactory();
    // AF: Be careful SSLSocketFactory don't allow to use ConnectTimeout
    Socket socket =  socketFactory.createSocket(hostname, port, outLocalAddr, outLocalPort);

    return socket;
  }

  private static SocketFactory createSocketFactory() throws Exception {
View Full Code Here

Examples of javax.net.SocketFactory.createSocket()

    }
    int timeout = params.getConnectionTimeout();
    SocketFactory socketfactory = getSSLContext().getSocketFactory();
    if (timeout == 0)
    {
      return socketfactory.createSocket(host, port, localAddress,
          localPort);
    }
    else
    {
      Socket socket = socketfactory.createSocket();
View Full Code Here

Examples of javax.net.SocketFactory.createSocket()

      return socketfactory.createSocket(host, port, localAddress,
          localPort);
    }
    else
    {
      Socket socket = socketfactory.createSocket();
      SocketAddress localaddr = new InetSocketAddress(localAddress,
          localPort);
      SocketAddress remoteaddr = new InetSocketAddress(host, port);
      socket.bind(localaddr);
      socket.connect(remoteaddr, timeout);
View Full Code Here

Examples of javax.net.SocketFactory.createSocket()

    int timeout = params.getConnectionTimeout();
    SocketFactory socketfactory = getSSLContext().getSocketFactory();

    /* Timeout is unlimited */
    if (timeout == 0)
      return socketfactory.createSocket(host, port, localAddress, localPort);

    /* Timeout is defined */
    Socket socket = socketfactory.createSocket();
    SocketAddress localaddr = new InetSocketAddress(localAddress, localPort);
    SocketAddress remoteaddr = new InetSocketAddress(host, port);
View Full Code Here

Examples of javax.net.SocketFactory.createSocket()

    /* Timeout is unlimited */
    if (timeout == 0)
      return socketfactory.createSocket(host, port, localAddress, localPort);

    /* Timeout is defined */
    Socket socket = socketfactory.createSocket();
    SocketAddress localaddr = new InetSocketAddress(localAddress, localPort);
    SocketAddress remoteaddr = new InetSocketAddress(host, port);
    socket.bind(localaddr);
    socket.connect(remoteaddr, timeout);
    return socket;
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.