< prev index next >

src/java.base/share/classes/java/net/SecureCacheResponse.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 24,33 **** --- 24,34 ---- */ package java.net; import java.security.cert.Certificate; + import javax.net.ssl.SSLSession; import javax.net.ssl.SSLPeerUnverifiedException; import java.security.Principal; import java.util.List; /**
*** 103,108 **** --- 104,136 ---- * * @see #getLocalCertificateChain() * @see #getPeerPrincipal() */ public abstract Principal getLocalPrincipal(); + + /** + * Returns the {@code SSLSession} in use on the original connection that + * retrieved the network resource. + * + * @implSpec This method can be used to access security parameters on + * the original connection. For compatibility, the + * implementation in this class throws + * {@code UnsupportedOperationException}. Subclasses SHOULD + * override this method with appropriate implementation. + * + * @implNote As an application may have to use this operation for more + * security parameters, it is recommended to support this + * operation in all implementations. + * + * @return the {@code SSLSession} + * + * @throws UnsupportedOperationException if this method is not supported + * by the underlying implementation. + * + * @see SSLSession + * + * @since 12 + */ + public SSLSession getSSLSession() { + throw new UnsupportedOperationException(); + } }
< prev index next >