Package org.conscrypt
Class Java8EngineSocket
java.lang.Object
java.net.Socket
javax.net.ssl.SSLSocket
org.conscrypt.AbstractConscryptSocket
org.conscrypt.OpenSSLSocketImpl
org.conscrypt.ConscryptEngineSocket
org.conscrypt.Java8EngineSocket
- All Implemented Interfaces:
Closeable
,AutoCloseable
,SSLParametersImpl.AliasChooser
A version of ConscryptEngineSocket that includes the new Java 9 (and potentially later
patches of 8)
setHandshakeApplicationProtocolSelector
API (which requires Java 8 for
compilation, due to the use of BiFunction
).-
Field Summary
FieldsFields inherited from class org.conscrypt.AbstractConscryptSocket
socket
-
Constructor Summary
ConstructorsConstructorDescriptionJava8EngineSocket
(String hostname, int port, InetAddress clientAddress, int clientPort, SSLParametersImpl sslParameters) Java8EngineSocket
(String hostname, int port, SSLParametersImpl sslParameters) Java8EngineSocket
(InetAddress address, int port, InetAddress clientAddress, int clientPort, SSLParametersImpl sslParameters) Java8EngineSocket
(InetAddress address, int port, SSLParametersImpl sslParameters) Java8EngineSocket
(Socket socket, String hostname, int port, boolean autoClose, SSLParametersImpl sslParameters) Java8EngineSocket
(SSLParametersImpl sslParameters) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private static ApplicationProtocolSelector
toApplicationProtocolSelector
(BiFunction<SSLSocket, List<String>, String> selector) Methods inherited from class org.conscrypt.ConscryptEngineSocket
chooseClientAlias, chooseServerAlias, close, exportKeyingMaterial, getActiveSession, getApplicationProtocol, getApplicationProtocols, getChannelId, getEnabledCipherSuites, getEnabledProtocols, getEnableSessionCreation, getHandshakeApplicationProtocol, getHandshakeSession, getInputStream, getNeedClientAuth, getOutputStream, getSession, getSSLParameters, getSupportedCipherSuites, getSupportedProtocols, getTlsUnique, getUseClientMode, getWantClientAuth, setApplicationProtocols, setApplicationProtocolSelector, setApplicationProtocolSelector, setBufferAllocator, setChannelIdEnabled, setChannelIdPrivateKey, setEnabledCipherSuites, setEnabledProtocols, setEnableSessionCreation, setHandshakeTimeout, setHostname, setNeedClientAuth, setSSLParameters, setUseClientMode, setUseSessionTickets, setWantClientAuth, startHandshake
Methods inherited from class org.conscrypt.OpenSSLSocketImpl
getAlpnSelectedProtocol, getFileDescriptor$, getHostname, getHostnameOrIP, getNpnSelectedProtocol, getSoWriteTimeout, setAlpnProtocols, setAlpnProtocols, setNpnProtocols, setSoWriteTimeout
Methods inherited from class org.conscrypt.AbstractConscryptSocket
addHandshakeCompletedListener, bind, checkOpen, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, notifyHandshakeCompletedListeners, peerInfoProvider, removeHandshakeCompletedListener, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString
Methods inherited from class java.net.Socket
getOption, setOption, setSocketImplFactory, supportedOptions
-
Field Details
-
selector
-
-
Constructor Details
-
Java8EngineSocket
Java8EngineSocket(SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
Java8EngineSocket
Java8EngineSocket(String hostname, int port, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
Java8EngineSocket
Java8EngineSocket(InetAddress address, int port, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
Java8EngineSocket
Java8EngineSocket(String hostname, int port, InetAddress clientAddress, int clientPort, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
Java8EngineSocket
Java8EngineSocket(InetAddress address, int port, InetAddress clientAddress, int clientPort, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
Java8EngineSocket
Java8EngineSocket(Socket socket, String hostname, int port, boolean autoClose, SSLParametersImpl sslParameters) throws IOException - Throws:
IOException
-
-
Method Details
-
setHandshakeApplicationProtocolSelector
public void setHandshakeApplicationProtocolSelector(BiFunction<SSLSocket, List<String>, String> selector) - Overrides:
setHandshakeApplicationProtocolSelector
in classSSLSocket
-
getHandshakeApplicationProtocolSelector
- Overrides:
getHandshakeApplicationProtocolSelector
in classSSLSocket
-
toApplicationProtocolSelector
private static ApplicationProtocolSelector toApplicationProtocolSelector(BiFunction<SSLSocket, List<String>, String> selector)
-