76217

SelectChannelConnector alternative class in Jetty 9 and above

Question:

What is the alternative class of SelectChannelConnector for jetty 9 and above version? Also what is the use of SelectChannelConnector class? And also what is the use of connector classes in jetty/servlet architechture?

Can we use ServerConnector or NetworkTrafficSelectChannelConnector (deprecated in jetty 9.x) class instead of SelectChannelConnector?

Answer1:

A Connector in jetty terms is the component that binds to a port, accepts incoming connections, negotiates the protocols (in case of SSL/TLS/ALPN and things like HTTP/2), and hands off the raw endpoint to the appropriate jetty internal component to process the request.

Gone are the days of listening on port 8080 and answering only in HTTP/1.x

Now you can listen on port 8080, and the incoming connection negotiates SSL > TLS > > ALPN > HTTP/2 (native) > HTTP/1.1 > HTTP/2 (h2c upgrate) etc. Essentially picking the appropriate connection setup based on what both the client and the server can handle.

There is only ServerConnector left, and it has many configuration options to tell it what you want it to support.

See the embedded examples or the documentation to understand how to configure it.

Recommend

  • Hashing Password [duplicate]
  • Getting IP address, port and connection type from a socket fd
  • Describe relationship in maximo 7.5
  • “object not found” and “unexpected symbol” errors when timing R code with system.time()
  • .NET library for posting to a Blog
  • CORBA :: Get the client ORB address and port with use of IIOP
  • Messaging Protocol
  • How do I get the data from a finished `NSURLSessionDataTask`?
  • PAX-URL: “Protocol not supported” at Felix's startup
  • Banning by IPv4 and IPv6
  • In WPF,MVVM should ViewModel be involved in opening a window, e.g. About-window?
  • Can't access my folder because of WordPress [closed]
  • Installing MEAN Stack: npm -v module.js: 338 throw err; Error: Cannot find module './cache/cach
  • Open view controller when remote notification pressed
  • How to pass the selected dropdown value to a URL in MVC?
  • NodeJS using node-serialport sometimes becomes unresponsive
  • limited threads in soapUI free version
  • Exposing an enum in a QML signal
  • HikariPool-1 - Unusual system clock change detected, soft-evicting connections from pool
  • Rx produce and consume on different threads
  • Can't connect Entity Framework to local SQL Server Express
  • Delete std::shared_ptr without destroying the managed object?
  • Autohotkey script running program with command line arguments
  • Laravel lmutator $this->attributes return 'Undefined index: id'
  • Run script file on remote server
  • Sending Content-Type application/x-www-form-urlencoded WSO2 ESB
  • How to set an entity field that does not exist on the table but does exists in the raw SQL as an ali
  • Count from each distinct date, fill in missing dates with zero
  • CORS with socket.io
  • Create function that can pass a parameter without making a new component
  • Passing variable arguments using PowerShell's Start-Process cmdlet
  • Using Generics on right hand side in Java 6?
  • Prevent Tomcat from caching request during starup
  • Access Android Market through SSH tunnel
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • How to make Safari send if-modified-since header?
  • How to pass list parameters for each object using Spring MVC?
  • Setting background image for body element in xhtml (for different monitors and resolutions)
  • JaxB to read class hierarchy