This {@link Connector} implementation is the primary connector for theJetty server over TCP/IP. By the use of various {@link ConnectionFactory} instances it is ableto accept connections for HTTP, SPDY and WebSocket, either directly or over SSL.
The connector is a fully asynchronous NIO based implementation that by default will use all the commons services (eg {@link Executor}, {@link Scheduler}) of the passed {@link Server} instance, but all services may also be constructor injectedinto the connector so that it may operate with dedicated or otherwise shared services.
Connection Factories
Various convenience constructors are provided to assist with common configurations of ConnectionFactories, whose generic use is described in {@link AbstractConnector}. If no connection factories are passed, then the connector will default to use a {@link HttpConnectionFactory}. If an non null {@link SslContextFactory}instance is passed, then this used to instantiate a {@link SslConnectionFactory} which isprepended to the other passed or default factories.
Selectors
The connector will use the {@link Executor} service to execute a number of Selector Tasks,which are implemented to each use a NIO {@link Selector} instance to asynchronouslyschedule a set of accepted connections. It is the selector thread that will call the {@link Callback} instances passed in the {@link EndPoint#fillInterested(Callback)} or{@link EndPoint#write(Callback,java.nio.ByteBuffer)} methods. It is expectedthat these callbacks may do some non-blocking IO work, but will always dispatch to the {@link Executor} service any blocking, long running or application tasks.
The default number of selectors is equal to the number of processors available to the JVM, which should allow optimal performance even if all the connections used are performing significant non-blocking work in the callback tasks.