Package org.eclipse.jetty.server
Interface Connector
- All Known Subinterfaces:
NetworkConnector
- All Known Implementing Classes:
AbstractConnector
,AbstractNetworkConnector
,HTTP3ServerConnector
,LocalConnector
,NetworkTrafficServerConnector
,QuicServerConnector
,ServerConnector
,UnixSocketConnector
@ManagedObject("Connector Interface")
public interface Connector
extends LifeCycle, Container, Graceful
A Connector
accept 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
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful
Graceful.Shutdown, Graceful.ThrowingRunnable
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Method Summary
Modifier and TypeMethodDescription<T> T
getConnectionFactory
(Class<T> factoryType) getConnectionFactory
(String nextProtocol) long
getName()
Get the connector name if set.Methods inherited from interface org.eclipse.jetty.util.component.Container
addBean, addBean, addEventListener, getBean, getBeans, getBeans, getCachedBeans, getContainedBeans, getEventListeners, isManaged, manage, removeBean, removeEventListener, unmanage
Methods inherited from interface org.eclipse.jetty.util.component.Graceful
isShutdown, shutdown
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Method Details
-
getServer
Server getServer() -
getExecutor
Executor getExecutor()- Returns:
- the
Executor
used to submit tasks
-
getScheduler
Scheduler getScheduler()- Returns:
- the
Scheduler
used to schedule tasks
-
getByteBufferPool
ByteBufferPool getByteBufferPool()- Returns:
- the
ByteBufferPool
to acquire buffers from and release buffers to
-
getConnectionFactory
- Parameters:
nextProtocol
- the next protocol- Returns:
- the
ConnectionFactory
associated with the protocol name
-
getConnectionFactory
-
getDefaultConnectionFactory
ConnectionFactory getDefaultConnectionFactory()- Returns:
- the default
ConnectionFactory
associated with the default protocol name
-
getConnectionFactories
Collection<ConnectionFactory> getConnectionFactories() -
getProtocols
-
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<EndPoint> getConnectedEndPoints()- Returns:
- immutable collection of connected endpoints
-
getName
String getName()Get the connector name if set.A
ContextHandler
may be configured with virtual hosts in the form "@connectorName" and will only serve requests from the named connector.- Returns:
- The connector name or null.
-