Package org.eclipse.jetty.server
Class AbstractConnectionFactory
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.AbstractConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
- Direct Known Subclasses:
AbstractHTTP2ServerConnectionFactory,DetectorConnectionFactory,HttpConnectionFactory,NegotiatingServerConnectionFactory,ServerFCGIConnectionFactory,SslConnectionFactory
@ManagedObject public abstract class AbstractConnectionFactory extends ContainerLifeCycle implements ConnectionFactory
Provides the common handling for
ConnectionFactoryimplementations including:- Protocol identification
- Configuration of new Connections:
- Setting inputbuffer size
- Calling
Connection.addListener(Connection.Listener)for all Connection.Listener instances found as beans on theConnectorand thisConnectionFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.ConnectionFactory
ConnectionFactory.Detecting, ConnectionFactory.Upgrading
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractConnectionFactory(java.lang.String protocol)protectedAbstractConnectionFactory(java.lang.String... protocols)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractConnectionconfigure(AbstractConnection connection, Connector connector, EndPoint endPoint)protected java.lang.StringfindNextProtocol(Connector connector)protected static java.lang.StringfindNextProtocol(Connector connector, java.lang.String currentProtocol)static ConnectionFactory[]getFactories(SslContextFactory sslContextFactory, ConnectionFactory... factories)intgetInputBufferSize()java.lang.StringgetProtocol()java.util.List<java.lang.String>getProtocols()voidsetInputBufferSize(int size)java.lang.StringtoString()-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.server.ConnectionFactory
newConnection
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
-
-
-
Method Detail
-
getProtocol
@ManagedAttribute(value="The protocol name", readonly=true) public java.lang.String getProtocol()
- Specified by:
getProtocolin interfaceConnectionFactory- Returns:
- A string representing the primary protocol name.
-
getProtocols
public java.util.List<java.lang.String> getProtocols()
- Specified by:
getProtocolsin interfaceConnectionFactory- Returns:
- A list of alternative protocol names/versions including the primary protocol.
-
getInputBufferSize
@ManagedAttribute("The buffer size used to read from the network") public int getInputBufferSize()
-
setInputBufferSize
public void setInputBufferSize(int size)
-
findNextProtocol
protected java.lang.String findNextProtocol(Connector connector)
-
findNextProtocol
protected static java.lang.String findNextProtocol(Connector connector, java.lang.String currentProtocol)
-
configure
protected AbstractConnection configure(AbstractConnection connection, Connector connector, EndPoint endPoint)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractLifeCycle
-
getFactories
public static ConnectionFactory[] getFactories(SslContextFactory sslContextFactory, ConnectionFactory... factories)
-
-