< prev index next >

src/java.base/share/classes/javax/net/ssl/SSLSocket.java

Print this page




 685             setEnabledProtocols(s);
 686         }
 687         if (params.getNeedClientAuth()) {
 688             setNeedClientAuth(true);
 689         } else if (params.getWantClientAuth()) {
 690             setWantClientAuth(true);
 691         } else {
 692             setWantClientAuth(false);
 693         }
 694     }
 695 
 696     /**
 697      * Returns the most recent application protocol value negotiated for this
 698      * connection.
 699      * <p>
 700      * If supported by the underlying SSL/TLS/DTLS implementation,
 701      * application name negotiation mechanisms such as <a
 702      * href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
 703      * Application-Layer Protocol Negotiation (ALPN), can negotiate
 704      * application-level values between peers.
 705      * <p>
 706      * @implSpec
 707      * The implementation in this class throws
 708      * {@code UnsupportedOperationException} and performs no other action.
 709      *
 710      * @return null if it has not yet been determined if application
 711      *         protocols might be used for this connection, an empty
 712      *         {@code String} if application protocols values will not
 713      *         be used, or a non-empty application protocol {@code String}
 714      *         if a value was successfully negotiated.
 715      * @throws UnsupportedOperationException if the underlying provider
 716      *         does not implement the operation.
 717      * @since 9
 718      */
 719     public String getApplicationProtocol() {
 720         throw new UnsupportedOperationException();
 721     }
 722 
 723     /**
 724      * Returns the application protocol value negotiated on a SSL/TLS
 725      * handshake currently in progress.
 726      * <p>
 727      * Like {@link #getHandshakeSession()},
 728      * a connection may be in the middle of a handshake. The
 729      * application protocol may or may not yet be available.
 730      * <p>
 731      * @implSpec
 732      * The implementation in this class throws
 733      * {@code UnsupportedOperationException} and performs no other action.
 734      *
 735      * @return null if it has not yet been determined if application
 736      *         protocols might be used for this handshake, an empty
 737      *         {@code String} if application protocols values will not
 738      *         be used, or a non-empty application protocol {@code String}
 739      *         if a value was successfully negotiated.
 740      * @throws UnsupportedOperationException if the underlying provider
 741      *         does not implement the operation.
 742      * @since 9
 743      */
 744     public String getHandshakeApplicationProtocol() {
 745         throw new UnsupportedOperationException();
 746     }
 747 
 748 
 749     /**
 750      * Registers a callback function that selects an application protocol




 685             setEnabledProtocols(s);
 686         }
 687         if (params.getNeedClientAuth()) {
 688             setNeedClientAuth(true);
 689         } else if (params.getWantClientAuth()) {
 690             setWantClientAuth(true);
 691         } else {
 692             setWantClientAuth(false);
 693         }
 694     }
 695 
 696     /**
 697      * Returns the most recent application protocol value negotiated for this
 698      * connection.
 699      * <p>
 700      * If supported by the underlying SSL/TLS/DTLS implementation,
 701      * application name negotiation mechanisms such as <a
 702      * href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
 703      * Application-Layer Protocol Negotiation (ALPN), can negotiate
 704      * application-level values between peers.
 705      *
 706      * @implSpec
 707      * The implementation in this class throws
 708      * {@code UnsupportedOperationException} and performs no other action.
 709      *
 710      * @return null if it has not yet been determined if application
 711      *         protocols might be used for this connection, an empty
 712      *         {@code String} if application protocols values will not
 713      *         be used, or a non-empty application protocol {@code String}
 714      *         if a value was successfully negotiated.
 715      * @throws UnsupportedOperationException if the underlying provider
 716      *         does not implement the operation.
 717      * @since 9
 718      */
 719     public String getApplicationProtocol() {
 720         throw new UnsupportedOperationException();
 721     }
 722 
 723     /**
 724      * Returns the application protocol value negotiated on a SSL/TLS
 725      * handshake currently in progress.
 726      * <p>
 727      * Like {@link #getHandshakeSession()},
 728      * a connection may be in the middle of a handshake. The
 729      * application protocol may or may not yet be available.
 730      *
 731      * @implSpec
 732      * The implementation in this class throws
 733      * {@code UnsupportedOperationException} and performs no other action.
 734      *
 735      * @return null if it has not yet been determined if application
 736      *         protocols might be used for this handshake, an empty
 737      *         {@code String} if application protocols values will not
 738      *         be used, or a non-empty application protocol {@code String}
 739      *         if a value was successfully negotiated.
 740      * @throws UnsupportedOperationException if the underlying provider
 741      *         does not implement the operation.
 742      * @since 9
 743      */
 744     public String getHandshakeApplicationProtocol() {
 745         throw new UnsupportedOperationException();
 746     }
 747 
 748 
 749     /**
 750      * Registers a callback function that selects an application protocol


< prev index next >