public class JreCompat extends Object
| Constructor and Description |
|---|
JreCompat() |
| Modifier and Type | Method and Description |
|---|---|
void |
disableCachingForJarUrlConnections()
Disables caching for JAR URL connections.
|
String |
getApplicationProtocol(SSLEngine sslEngine)
Get the application protocol that has been negotiated for connection
associated with the given SSLEngine.
|
static JreCompat |
getInstance() |
boolean |
isInstanceOfInaccessibleObjectException(Throwable t)
Test if the provided exception is an instance of
java.lang.reflect.InaccessibleObjectException.
|
static boolean |
isJre9Available() |
void |
setApplicationProtocols(SSLParameters sslParameters,
String[] protocols)
Set the application protocols the server will accept for ALPN
|
public static JreCompat getInstance()
public static boolean isJre9Available()
public boolean isInstanceOfInaccessibleObjectException(Throwable t)
t - The exception to testtrue if the exception is an instance of
InaccessibleObjectException, otherwise falsepublic void setApplicationProtocols(SSLParameters sslParameters, String[] protocols)
sslParameters - The SSL parameters for a connectionprotocols - The application protocols to be allowed for that
connectionpublic String getApplicationProtocol(SSLEngine sslEngine)
sslEngine - The SSLEngine for which to obtain the negotiated
protocolpublic void disableCachingForJarUrlConnections()
throws IOException
IOException - If a dummy JAR URLConnection can not be createdCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.