Package org.eclipse.jetty.server
Interface Connector
-
- All Superinterfaces:
org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Graceful,org.eclipse.jetty.util.component.LifeCycle
- All Known Subinterfaces:
NetworkConnector
- All Known Implementing Classes:
AbstractConnector,AbstractNetworkConnector,LocalConnector,NetworkTrafficSelectChannelConnector,NetworkTrafficServerConnector,ServerConnector
@ManagedObject("Connector Interface") public interface Connector extends org.eclipse.jetty.util.component.LifeCycle, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.GracefulA
Connectoraccept connections and data from remote peers, and allows applications to send data to remote peers, by setting up the machinery needed to handle such tasks.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.jetty.io.ByteBufferPoolgetByteBufferPool()Collection<org.eclipse.jetty.io.EndPoint>getConnectedEndPoints()Collection<ConnectionFactory>getConnectionFactories()<T> TgetConnectionFactory(Class<T> factoryType)ConnectionFactorygetConnectionFactory(String nextProtocol)ConnectionFactorygetDefaultConnectionFactory()ExecutorgetExecutor()longgetIdleTimeout()StringgetName()Get the connector name if set.List<String>getProtocols()org.eclipse.jetty.util.thread.SchedulergetScheduler()ServergetServer()ObjectgetTransport()
-
-
-
Method Detail
-
getScheduler
org.eclipse.jetty.util.thread.Scheduler getScheduler()
- Returns:
- the
Schedulerused to schedule tasks
-
getByteBufferPool
org.eclipse.jetty.io.ByteBufferPool getByteBufferPool()
- Returns:
- the
ByteBufferPoolto acquire buffers from and release buffers to
-
getConnectionFactory
ConnectionFactory getConnectionFactory(String nextProtocol)
- Parameters:
nextProtocol- the next protocol- Returns:
- the
ConnectionFactoryassociated with the protocol name
-
getConnectionFactory
<T> T getConnectionFactory(Class<T> factoryType)
-
getDefaultConnectionFactory
ConnectionFactory getDefaultConnectionFactory()
- Returns:
- the default
ConnectionFactoryassociated with the default protocol name
-
getConnectionFactories
Collection<ConnectionFactory> getConnectionFactories()
-
getIdleTimeout
@ManagedAttribute("maximum time a connection can be idle before being closed (in ms)") long getIdleTimeout()- Returns:
- the max idle timeout for connections in milliseconds
-
getTransport
Object getTransport()
- Returns:
- the underlying socket, channel, buffer etc. for the connector.
-
getConnectedEndPoints
Collection<org.eclipse.jetty.io.EndPoint> getConnectedEndPoints()
- Returns:
- immutable collection of connected endpoints
-
getName
String getName()
Get the connector name if set.A
ContextHandlermay be configured with virtual hosts in the form "@connectorName" and will only serve requests from the named connector.- Returns:
- The connector name or null.
-
-