Java 8 HandshakeCompletedEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 HandshakeCompletedEvent class.

This code example shows how to use the following methods: getSession, getSocket
    public final void testHandshakeCompletedEvent() { 
    	if (noFreePort || noSocket) {
            return; 
        } 
    	SSLSession ses = new MySSLSession();
        HandshakeCompletedEvent event = new HandshakeCompletedEvent(soc, ses);
         
        assertEquals(ses, event.getSession());
        assertEquals(soc, event.getSocket());
    } 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getSession, getSocket
This code example shows how to use the following methods: getSession
     * javax.net.ssl.HandshakeCompletedEvent#getSession() 
     */ 
    public final void test_getSession() throws IOException { 
        mySSLSession session = new mySSLSession("localhost", 1080, null);
        SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket();
        HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session);
        SSLSession ss = event.getSession();
        assertNotNull(ss);
        assertEquals(session, ss);
    } 
 
    /** 
     * @throws IOException 
     * javax.net.ssl.HandshakeCompletedEvent#getSocket() 
     */ 
    public final void test_getSocket() throws IOException { 
        SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket();
        HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, null);
        SSLSocket ss = event.getSocket();
        assertNotNull(ss);
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getPeerCertificates
  { 
    if (!connected)
      { 
        throw new IllegalStateException("not connected");
      } 
    return handshakeEvent.getPeerCertificates();
  } 
 
  // HandshakeCompletedListener 
 
  public void handshakeCompleted(HandshakeCompletedEvent event)
  { 
    handshakeEvent = event;
  } 
 
  /** 
   * Set the connection timeout speed, in milliseconds, or zero if the timeout 
   * is to be considered infinite. 
   * 
   * Overloaded. 
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 HandshakeCompletedEvent Methods: