Package org.eclipse.jetty.server
Interface ConnectionFactory
-
- All Known Subinterfaces:
ConnectionFactory.Upgrading
- All Known Implementing Classes:
AbstractConnectionFactory,HttpConnectionFactory,NegotiatingServerConnectionFactory,ProxyConnectionFactory,SslConnectionFactory
public interface ConnectionFactoryA Factory to createConnectioninstances forConnectors.A Connection factory is responsible for instantiating and configuring a
Connectioninstance to handle anEndPointaccepted by aConnector.A ConnectionFactory has a protocol name that represents the protocol of the Connections created. Example of protocol names include:
- http
- Creates a HTTP connection that can handle multiple versions of HTTP from 0.9 to 1.1
- h2
- Creates a HTTP/2 connection that handles the HTTP/2 protocol
- SSL-XYZ
- Create an SSL connection chained to a connection obtained from a connection factory with a protocol "XYZ".
- SSL-http
- Create an SSL connection chained to a HTTP connection (aka https)
- SSL-ALPN
- Create an SSL connection chained to a ALPN connection, that uses a negotiation with the client to determine the next protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceConnectionFactory.Upgrading
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetProtocol()List<String>getProtocols()org.eclipse.jetty.io.ConnectionnewConnection(Connector connector, org.eclipse.jetty.io.EndPoint endPoint)Creates a newConnectionwith the given parameters
-
-
-
Method Detail
-
getProtocol
String getProtocol()
- Returns:
- A string representing the primary protocol name.
-
getProtocols
List<String> getProtocols()
- Returns:
- A list of alternative protocol names/versions including the primary protocol.
-
newConnection
org.eclipse.jetty.io.Connection newConnection(Connector connector, org.eclipse.jetty.io.EndPoint endPoint)
Creates a new
Connectionwith the given parameters- Parameters:
connector- TheConnectorcreating this connectionendPoint- theEndPointassociated with the connection- Returns:
- a new
Connection
-
-