On 07/03/18 09:03, Sen, Anurag wrote: > Dear Tomcat users/dev team, > > I am working on porting an enterprise application from Tomcat 4.x to Tomcat > 8.5.x. > > Probably you can throw some light on the problem I am facing. > The application that I am porting has a custom protocol(inheriting > HTTP11NIOProtocol) and custom endpoint(inheriting NIOEndpoint) written, in > order to provide a 'multi-protocol' implementation(BEEP + HTTP) on a unified > port. > > To this end, the custom endpoint is overriding some functionality from > NIOEndpoint class, particularly a custom selector and a custom poller. In > Tomcat 4.x, the application was overriding the fields 'selector','poller' & > 'nioChannels', which were 'protected' and these were made private in Tomcat > 7.x.(I guess), rendering any custom connector unable to access/set such > fields, to override functionality. Commit: > https://svn.apache.org/viewvc?view=revision&revision=1425512 > > From a quick web search, I found a relevant discussion that says that Tomcat > connector architecture is HTTP-centric > (http://grokbase.com/t/tomcat/users/116xpzc2pz/how-to-create-custom-tomcat-6-connector-to-do-port-sharing) > Is there any recommendation from the Tomcat team for writing custom > connectors in 8.5.x. Is it true that Tomcat doesn't encourage non-HTTP > connectors/endpoints (seeing the private fields in NIOEndpoint class). > > Thanks in advance for your support.
The Endpoint is protocol agnostic. The current endpoints support HTTP, AJP, WebSocket and HTTP/2. Incidently, the HTTP/2 implementation was added without requiring a single change to the Endpoint. I'd look at a purely custom protocol implementation. If BEEP uses ALPN or HTTP upgrade you might find the upgrade handler useful and the HTTP/2 implementation provides a good example. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org