Examples of createSocket()


Examples of javax.net.ssl.SSLSocketFactory.createSocket()

  }

  @Override
  protected Socket createSocket() throws IOException {
    SSLSocketFactory factory = HttpsURLConnection.getDefaultSSLSocketFactory();
    SSLSocket sslSocket = (SSLSocket) factory.createSocket();
    sslSocket.addHandshakeCompletedListener(new HandshakeCompletedListener() {
          @Override
          public void handshakeCompleted(HandshakeCompletedEvent event) {
            ThreadLocalMetricsRecorder.getInstance().getSslTimer().stop();
          }
View Full Code Here

Examples of javax.net.ssl.SSLSocketFactory.createSocket()

     */
    public Socket createSocket(String host, int port,
                               InetAddress clientHost, int clientPort)
        throws IOException, UnknownHostException {
        SSLSocketFactory sf = (SSLSocketFactory) SSLSocketFactory.getDefault();
        SSLSocket sslSocket = (SSLSocket) sf.createSocket(host, port,
                                                          clientHost,
                                                          clientPort);
        verifyHostname(sslSocket);

        return sslSocket;
View Full Code Here

Examples of javax.net.ssl.SSLSocketFactory.createSocket()

     * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int)
     */
    public Socket createSocket(String host, int port)
        throws IOException, UnknownHostException {
        SSLSocketFactory sf = (SSLSocketFactory) SSLSocketFactory.getDefault();
        SSLSocket sslSocket = (SSLSocket) sf.createSocket(host, port);
        verifyHostname(sslSocket);

        return sslSocket;
    }

View Full Code Here

Examples of javax.net.ssl.SSLSocketFactory.createSocket()

     */
    public Socket createSocket(Socket socket, String host, int port,
                               boolean autoClose)
        throws IOException, UnknownHostException {
        SSLSocketFactory sf = (SSLSocketFactory) SSLSocketFactory.getDefault();
        SSLSocket sslSocket = (SSLSocket) sf.createSocket(socket, host,
                                                          port, autoClose);
        verifyHostname(sslSocket);

        return sslSocket;
    }
View Full Code Here

Examples of javax.net.ssl.SSLSocketFactory.createSocket()

 
  @Override
  protected TcpConnection newConnection(InetAddress addr, int port) throws IOException
  {
    SSLSocketFactory sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
        SSLSocket sslsocket = (SSLSocket) sslsocketfactory.createSocket(addr, port);
    return new TlsConnection(sslsocket);
  }
 
  /* ------------------------------------------------------------ */
  public String[] getExcludeCipherSuites()
View Full Code Here

Examples of javax.net.ssl.SSLSocketFactory.createSocket()

    private Socket startSSL(Socket sock, String host) throws IOException {
        SSLSocketFactory sslFactory = getSSLSocketFactory(host);
        SSLSocket secureSocket;
        if (sslFactory != null) {
            try {
                secureSocket = (SSLSocket) sslFactory.createSocket(sock,
                        sock.getInetAddress().getHostName(), sock.getPort(), true);
                secureSocket.setUseClientMode(false);
                if (log.isDebugEnabled()){
                    log.debug("SSL transaction ok with cipher: " + secureSocket.getSession().getCipherSuite());
                }
View Full Code Here

Examples of javax.net.ssl.SSLSocketFactory.createSocket()

                try {
                  SSLSocketFactory sslFact = (SSLSocketFactory) SSLSocketFactory
                      .getDefault();
                  SSLSocket tls;
                  tls = (SSLSocket) sslFact.createSocket(
                      this.sock, this.sock
                          .getInetAddress()
                          .getHostName(), this.sock
                          .getPort(), false);
                  tls
View Full Code Here

Examples of javax.rmi.ssl.SslRMIClientSocketFactory.createSocket()

        SslRMIClientSocketFactory factoryCln = new SslRMIClientSocketFactory();
        SslRMIServerSocketFactory factorySrv = new SslRMIServerSocketFactory();

        ServerSocket ssocket = factorySrv.createServerSocket(0);
        SSLSocket csocket = (SSLSocket) factoryCln.createSocket("localhost",
                ssocket.getLocalPort());
        csocket.close();
        ssocket.close();

        String old = System
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory.createSocket()

            ServerSocketFactory fact=this.getFactory();
            int port=this.getPort();
            int accc=this.getAcceptCount();

            if (this.getAddress()==null) {
                this.server=fact.createSocket(port,accc);
            } else {
                InetAddress addr=InetAddress.getByName(this.getAddress());
                this.server=fact.createSocket(port,accc,addr);
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory.createSocket()

            if (this.getAddress()==null) {
                this.server=fact.createSocket(port,accc);
            } else {
                InetAddress addr=InetAddress.getByName(this.getAddress());
                this.server=fact.createSocket(port,accc,addr);
            }
        } catch (Exception e) {
            throw new LifecycleException("Error creating server socket ("+
                e.getClass().getName()+")",e);
        }
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.