Top Description Inners Fields Constructors Methods
org.eclipse.jetty.io.ssl

public Class SslClientConnectionFactory

extends Object
implements ClientConnectionFactory
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.io.ClientConnectionFactory
Imports
java.io.IOException, java.net.InetSocketAddress, .SocketAddress, java.util.Map, .Objects, java.util.concurrent.Executor, javax.net.ssl.HostnameVerifier, .SSLEngine, .SSLException, .SSLPeerUnverifiedException, org.eclipse.jetty.io.ByteBufferPool, .ClientConnectionFactory, .ClientConnector, .Connection, .EndPoint, org.eclipse.jetty.util.component.ContainerLifeCycle, org.eclipse.jetty.util.ssl.SslContextFactory

A ClientConnectionFactory that creates client-side SslConnection instances.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
public static interface

Field Summary

Modifier and TypeField and Description
private final ByteBufferPool
private final ClientConnectionFactory
private boolean
private boolean
private final Executor
private boolean
private final SslContextFactory.Client
public static final String

Constructor Summary

AccessConstructor and Description
public
SslClientConnectionFactory(SslContextFactory.Client sslContextFactory, ByteBufferPool byteBufferPool, Executor executor, ClientConnectionFactory connectionFactory)

Method Summary

Modifier and TypeMethod and Description
public Connection
public ByteBufferPool
public ClientConnectionFactory
public Executor
public SslContextFactory.Client
public boolean
public boolean
public boolean
isRequireCloseMessage()

Returns: whether peers must send the TLS close_notify message

public Connection
newConnection(EndPoint
the org.eclipse.jetty.io.EndPoint to link the newly created connection to
endPoint
,
Map<String, Object>
the context data to create the connection
context
)

Implements org.eclipse.jetty.io.ClientConnectionFactory.newConnection.

protected SslConnection
public void
setDirectBuffersForDecryption(boolean useDirectBuffers)

public void
setDirectBuffersForEncryption(boolean useDirectBuffers)

public void
setRequireCloseMessage(boolean
whether peers must send the TLS close_notify message
requireCloseMessage
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_byteBufferPoolback to summary
private final ByteBufferPool _byteBufferPool
_clientConnectionFactoryback to summary
private final ClientConnectionFactory _clientConnectionFactory
_directBuffersForDecryptionback to summary
private boolean _directBuffersForDecryption
_directBuffersForEncryptionback to summary
private boolean _directBuffersForEncryption
_executorback to summary
private final Executor _executor
_requireCloseMessageback to summary
private boolean _requireCloseMessage
_sslContextFactoryback to summary
private final SslContextFactory.Client _sslContextFactory
SSL_ENGINE_CONTEXT_KEYback to summary
public static final String SSL_ENGINE_CONTEXT_KEY

Constructor Detail

SslClientConnectionFactoryback to summary
public SslClientConnectionFactory(SslContextFactory.Client sslContextFactory, ByteBufferPool byteBufferPool, Executor executor, ClientConnectionFactory connectionFactory)

Method Detail

customizeback to summary
public Connection customize(Connection connection, Map<String, Object> context)

Overrides default org.eclipse.jetty.io.ClientConnectionFactory.customize.

Annotations
@Override
getByteBufferPoolback to summary
public ByteBufferPool getByteBufferPool()
getClientConnectionFactoryback to summary
public ClientConnectionFactory getClientConnectionFactory()
getExecutorback to summary
public Executor getExecutor()
getSslContextFactoryback to summary
public SslContextFactory.Client getSslContextFactory()
isDirectBuffersForDecryptionback to summary
public boolean isDirectBuffersForDecryption()
isDirectBuffersForEncryptionback to summary
public boolean isDirectBuffersForEncryption()
isRequireCloseMessageback to summary
public boolean isRequireCloseMessage()
Returns:boolean

whether peers must send the TLS close_notify message

See Also
SslConnection#isRequireCloseMessage()
newConnectionback to summary
public Connection newConnection(EndPoint endPoint, Map<String, Object> context) throws IOException

Implements org.eclipse.jetty.io.ClientConnectionFactory.newConnection.

Parameters
endPoint:EndPoint

Doc from org.eclipse.jetty.io.ClientConnectionFactory.newConnection.

the org.eclipse.jetty.io.EndPoint to link the newly created connection to

context:Map<String, Object>

Doc from org.eclipse.jetty.io.ClientConnectionFactory.newConnection.

the context data to create the connection

Returns:Connection

Doc from org.eclipse.jetty.io.ClientConnectionFactory.newConnection.

a new Connection

Annotations
@Override
Exceptions
IOException:

Doc from org.eclipse.jetty.io.ClientConnectionFactory.newConnection.

if the connection cannot be created

newSslConnectionback to summary
protected SslConnection newSslConnection(EndPoint endPoint, SSLEngine engine)
setDirectBuffersForDecryptionback to summary
public void setDirectBuffersForDecryption(boolean useDirectBuffers)
setDirectBuffersForEncryptionback to summary
public void setDirectBuffersForEncryption(boolean useDirectBuffers)
setRequireCloseMessageback to summary
public void setRequireCloseMessage(boolean requireCloseMessage)
Parameters
requireCloseMessage:boolean

whether peers must send the TLS close_notify message

See Also
SslConnection#setRequireCloseMessage(boolean)
org.eclipse.jetty.io.ssl back to summary

private Class SslClientConnectionFactory.HTTPSHandshakeListener

extends Object
implements SslHandshakeListener
Class Inheritance
  • java.lang.Object
  • org.eclipse.jetty.io.ssl.SslClientConnectionFactory.HTTPSHandshakeListener
All Implemented Interfaces
org.eclipse.jetty.io.ssl.SslHandshakeListener, java.util.EventListener

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
handshakeSucceeded(SslHandshakeListener.Event
the event object carrying information about the TLS handshake event
event
)

Overrides default org.eclipse.jetty.io.ssl.SslHandshakeListener.handshakeSucceeded.

Callback method invoked when the TLS handshake succeeds.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final Map<String, Object> context

Constructor Detail

HTTPSHandshakeListenerback to summary
private HTTPSHandshakeListener(Map<String, Object> context)

Method Detail

handshakeSucceededback to summary
public void handshakeSucceeded(SslHandshakeListener.Event event) throws SSLException

Overrides default org.eclipse.jetty.io.ssl.SslHandshakeListener.handshakeSucceeded.

Doc from org.eclipse.jetty.io.ssl.SslHandshakeListener.handshakeSucceeded.

Callback method invoked when the TLS handshake succeeds.

Parameters
event:SslHandshakeListener.Event

the event object carrying information about the TLS handshake event

Annotations
@Override
Exceptions
SSLException:
if any error happen during handshake
org.eclipse.jetty.io.ssl back to summary

public Interface SslClientConnectionFactory.SslEngineFactory


A factory for SSLEngine objects.

Typically implemented by SslContextFactory.Client to support more flexible creation of SSLEngine instances.

Method Summary

Modifier and TypeMethod and Description
public SSLEngine

Returns:

a new SSLEngine instance
newSslEngine
(String
the peer host
host
,
int
the peer port
port
,
Map<String, Object> context)

Creates a new SSLEngine instance for the given peer host and port, and with the given context to help the creation of the SSLEngine.

Method Detail

newSslEngineback to summary
public SSLEngine newSslEngine(String host, int port, Map<String, Object> context)

Creates a new SSLEngine instance for the given peer host and port, and with the given context to help the creation of the SSLEngine.

Parameters
host:String

the peer host

port:int

the peer port

context:Map<String, Object>

the ClientConnectionFactory context

Returns:SSLEngine

a new SSLEngine instance