Jetty 9及更高版本的SelectChannelConnector的替代类是什么?另外,SelectChannelConnector类的用途是什么?在jetty/servlet体系结构中,连接器类的用途是什么?
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?
我们可以使用ServerConnector或NetworkTrafficSelectChannelConnector类(在Jetty 9.x中弃用)类代替SelectChannelConnector类吗?
Can we use ServerConnector or NetworkTrafficSelectChannelConnector (deprecated in jetty 9.x) class instead of SelectChannelConnector?
推荐答案用码头术语表示的Connector是绑定到端口,接受传入连接,协商协议的组件(在SSL/TLS/ALPN和之类的东西,例如HTTP/2),然后将原始端点交给适当的码头内部组件来处理请求.
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.
监听8080端口并仅在HTTP/1.x中应答的日子已经一去不复返了
Gone are the days of listening on port 8080 and answering only in HTTP/1.x
现在您可以在端口8080上侦听,并且传入的连接会协商SSL> TLS> > ALPN> HTTP/2(本机)> HTTP/1.1> HTTP/2(h2c升级)等.本质上是根据客户端和服务器都可以处理的内容来选择适当的连接设置.
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.
只剩下ServerConnector,它有许多配置选项可以告诉您您希望它支持什么.
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.
更多推荐
Jetty 9及更高版本中的SelectChannelConnector替代类
发布评论