Package org.jboss.netty.handler.ssl
Class JdkSslClientContext
- java.lang.Object
-
- org.jboss.netty.handler.ssl.SslContext
-
- org.jboss.netty.handler.ssl.JdkSslContext
-
- org.jboss.netty.handler.ssl.JdkSslClientContext
-
public final class JdkSslClientContext extends JdkSslContext
A client-sideSslContextwhich uses JDK's SSL/TLS implementation.
-
-
Constructor Summary
Constructors Constructor Description JdkSslClientContext()Creates a new instance.JdkSslClientContext(File certChainFile)Creates a new instance.JdkSslClientContext(File certChainFile, TrustManagerFactory trustManagerFactory)Creates a new instance.JdkSslClientContext(TrustManagerFactory trustManagerFactory)Creates a new instance.JdkSslClientContext(SslBufferPool bufPool, File certChainFile, TrustManagerFactory trustManagerFactory, Iterable<String> ciphers, Iterable<String> nextProtocols, long sessionCacheSize, long sessionTimeout)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSLContextcontext()Returns the JDKSSLContextobject held by this context.booleanisClient()Returns thetrueif and only if this context is for client-side.List<String>nextProtocols()Returns the list of application layer protocols for the TLS NPN/ALPN extension, in the order of preference.-
Methods inherited from class org.jboss.netty.handler.ssl.JdkSslContext
cipherSuites, newEngine, newEngine, sessionCacheSize, sessionContext, sessionTimeout
-
Methods inherited from class org.jboss.netty.handler.ssl.SslContext
bufferPool, defaultClientProvider, defaultServerProvider, isServer, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext
-
-
-
-
Constructor Detail
-
JdkSslClientContext
public JdkSslClientContext() throws SSLExceptionCreates a new instance.- Throws:
SSLException
-
JdkSslClientContext
public JdkSslClientContext(File certChainFile) throws SSLException
Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM format.nullto use the system default- Throws:
SSLException
-
JdkSslClientContext
public JdkSslClientContext(TrustManagerFactory trustManagerFactory) throws SSLException
Creates a new instance.- Parameters:
trustManagerFactory- theTrustManagerFactorythat provides theTrustManagers that verifies the certificates sent from servers.nullto use the default.- Throws:
SSLException
-
JdkSslClientContext
public JdkSslClientContext(File certChainFile, TrustManagerFactory trustManagerFactory) throws SSLException
Creates a new instance.- Parameters:
certChainFile- an X.509 certificate chain file in PEM format.nullto use the system defaulttrustManagerFactory- theTrustManagerFactorythat provides theTrustManagers that verifies the certificates sent from servers.nullto use the default.- Throws:
SSLException
-
JdkSslClientContext
public JdkSslClientContext(SslBufferPool bufPool, File certChainFile, TrustManagerFactory trustManagerFactory, Iterable<String> ciphers, Iterable<String> nextProtocols, long sessionCacheSize, long sessionTimeout) throws SSLException
Creates a new instance.- Parameters:
bufPool- the buffer pool which will be used by this context.nullto use the default buffer pool.certChainFile- an X.509 certificate chain file in PEM format.nullto use the system defaulttrustManagerFactory- theTrustManagerFactorythat provides theTrustManagers that verifies the certificates sent from servers.nullto use the default.ciphers- the cipher suites to enable, in the order of preference.nullto use the default cipher suites.nextProtocols- the application layer protocols to accept, in the order of preference.nullto disable TLS NPN/ALPN extension.sessionCacheSize- the size of the cache used for storing SSL session objects.0to use the default value.sessionTimeout- the timeout for the cached SSL session objects, in seconds.0to use the default value.- Throws:
SSLException
-
-
Method Detail
-
isClient
public boolean isClient()
Description copied from class:SslContextReturns thetrueif and only if this context is for client-side.- Specified by:
isClientin classSslContext
-
nextProtocols
public List<String> nextProtocols()
Description copied from class:SslContextReturns the list of application layer protocols for the TLS NPN/ALPN extension, in the order of preference.- Specified by:
nextProtocolsin classSslContext- Returns:
- the list of application layer protocols.
nullif NPN/ALPN extension has been disabled.
-
context
public SSLContext context()
Description copied from class:JdkSslContextReturns the JDKSSLContextobject held by this context.- Specified by:
contextin classJdkSslContext
-
-