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

public Interface ClientConnectionFactory

Known Direct Implementers
org.eclipse.jetty.io.NegotiatingClientConnectionFactory, org.eclipse.jetty.io.ssl.SslClientConnectionFactory
Imports
java.io.IOException, java.util.EventListener, .List, .Map, org.eclipse.jetty.util.component.ContainerLifeCycle

Factory for client-side Connection instances.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ClientConnectionFactory.Decorator

Wraps another ClientConnectionFactory.

public abstract static class
ClientConnectionFactory.Info

A holder for a list of protocol strings identifying an application protocol (for example ["h2", "h2-17", "h2-16"]) and a ClientConnectionFactory that creates connections that speak that network protocol.

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public default Connection
customize(Connection connection, Map<String, Object> context)

public Connection

Returns:

a new 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
)

Field Detail

CLIENT_CONTEXT_KEYback to summary
public static final String CLIENT_CONTEXT_KEY

Method Detail

customizeback to summary
public default Connection customize(Connection connection, Map<String, Object> context)
newConnectionback to summary
public Connection newConnection(EndPoint endPoint, Map<String, Object> context) throws IOException
Parameters
endPoint:EndPoint

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

context:Map<String, Object>

the context data to create the connection

Returns:Connection

a new Connection

Exceptions
IOException:
if the connection cannot be created
org.eclipse.jetty.io back to summary

public Interface ClientConnectionFactory.Decorator


Wraps another ClientConnectionFactory.

This is typically done by protocols that send "preface" bytes with some metadata before other protocols. The metadata could be, for example, proxying information or authentication information.

Method Summary

Modifier and TypeMethod and Description
public ClientConnectionFactory

Returns:

the wrapping ClientConnectionFactory
apply
(ClientConnectionFactory
the ClientConnectionFactory to wrap
factory
)

Wraps the given factory.

Method Detail

applyback to summary
public ClientConnectionFactory apply(ClientConnectionFactory factory)

Wraps the given factory.

Parameters
factory:ClientConnectionFactory

the ClientConnectionFactory to wrap

Returns:ClientConnectionFactory

the wrapping ClientConnectionFactory

org.eclipse.jetty.io back to summary

public abstract Class ClientConnectionFactory.Info

extends ContainerLifeCycle
Class Inheritance

A holder for a list of protocol strings identifying an application protocol (for example ["h2", "h2-17", "h2-16"]) and a ClientConnectionFactory that creates connections that speak that network protocol.

Field Summary

Modifier and TypeField and Description
private final ClientConnectionFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ClientConnectionFactory
public abstract List<String>
getProtocols(boolean secure)

public boolean

Returns:

whether one of the protocols of this class is present in the candidates
matches
(List<String>
the candidates to match against
candidates
,
boolean
whether the protocol should be a secure one
secure
)

Tests whether one of the protocols of this class is also present in the given candidates list.

public void
upgrade(EndPoint endPoint, Map<String, Object> context)

Inherited from org.eclipse.jetty.util.component.ContainerLifeCycle:
addBeanaddBeanaddEventListeneraddManagedcontainsdestroydoStartdoStopdumpdumpdumpdumpObjectsdumpStdErrgetBeangetBeansgetBeansgetContainedBeansgetContainedBeansisAutoisManagedisUnmanagedmanageremoveBeanremoveBeansremoveEventListenersetBeansstartstopunmanageupdateBeanupdateBeanupdateBeansupdateBeans

Field Detail

factoryback to summary
private final ClientConnectionFactory factory

Constructor Detail

Infoback to summary
public Info(ClientConnectionFactory factory)

Method Detail

getClientConnectionFactoryback to summary
public ClientConnectionFactory getClientConnectionFactory()
getProtocolsback to summary
public abstract List<String> getProtocols(boolean secure)
matchesback to summary
public boolean matches(List<String> candidates, boolean secure)

Tests whether one of the protocols of this class is also present in the given candidates list.

Parameters
candidates:List<String>

the candidates to match against

secure:boolean

whether the protocol should be a secure one

Returns:boolean

whether one of the protocols of this class is present in the candidates

upgradeback to summary
public void upgrade(EndPoint endPoint, Map<String, Object> context)