Interface Connector
- All Known Subinterfaces:
NetworkConnector
- All Known Implementing Classes:
AbstractConnector, AbstractNetworkConnector, HTTP3ServerConnector, LocalConnector, MemoryConnector, NetworkTrafficServerConnector, QuicServerConnector, ServerConnector, UnixDomainServerConnector
@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 Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Graceful
Graceful.Shutdown, Graceful.ThrowingRunnableNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Method Summary
Modifier and TypeMethodDescriptionGet theByteBufferPoolto acquire buffers from and release buffers to.<T> TgetConnectionFactory(Class<T> factoryType) getConnectionFactory(String nextProtocol) Get the defaultConnectionFactoryassociated with the default protocol name.Get theExecutorused to submit tasks.longgetName()Get the connector name if set.Get theSchedulerused to schedule tasks.Get the underlying socket, channel, buffer etc. for the connector..Methods inherited from interface Container
addBean, addBean, addEventListener, getBean, getBeans, getBeans, getCachedBeans, getContainedBeans, getEventListeners, isManaged, manage, removeBean, removeEventListener, unmanageMethods inherited from interface Graceful
isShutdown, shutdownMethods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Method Details
-
getServer
-
getExecutor
-
getScheduler
-
getByteBufferPool
ByteBufferPool getByteBufferPool()Get theByteBufferPoolto acquire buffers from and release buffers to.- Returns:
- the
ByteBufferPoolto acquire buffers from and release buffers to
-
getConnectionFactory
- Parameters:
nextProtocol- the next protocol- Returns:
- the
ConnectionFactoryassociated with the protocol name
-
getConnectionFactory
-
getDefaultConnectionFactory
ConnectionFactory getDefaultConnectionFactory()Get the defaultConnectionFactoryassociated with the default protocol name.- Returns:
- the default
ConnectionFactoryassociated 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()Get the underlying socket, channel, buffer etc. for the connector..- 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
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.
-