> -----Original Message-----
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: 07 March 2018 14:54
> To: Tomcat Users List <users@tomcat.apache.org>
> Subject: Re: [Tomcat Custom Connector]Private Fields in NIOEndpoint class
> 
> 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsvn.apach
> e.org%2Fviewvc%3Fview%3Drevision%26revision%3D1425512&data=02%7C01
> %7Casen%40ptc.com%7C713ac85bc71841507bb408d5840d47ba%7Cb9921086f
> f774d0d828acb3381f678e2%7C0%7C0%7C636560114942155646&sdata=YrFMa
> FlXTOfENvdr7hvfyhBD3toFNkd5KZQ49mNS4bM%3D&reserved=0
> >
> > From a quick web search, I found a relevant discussion that says that
> > Tomcat connector architecture is HTTP-centric
> > (https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgrokb
> > ase.com%2Ft%2Ftomcat%2Fusers%2F116xpzc2pz%2Fhow-to-create-custom-
> tomca
> > t-6-connector-to-do-port-
> sharing&data=02%7C01%7Casen%40ptc.com%7C713ac
> >
> 85bc71841507bb408d5840d47ba%7Cb9921086ff774d0d828acb3381f678e2%7C
> 0%7C0
> >
> %7C636560114942155646&sdata=tdz8kN7WYYdizATZRJkl74cQJ7sn4EGPLfGvxg
> Xxih
> > E%3D&reserved=0) 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

Agreed, that Endpoint is protocol agnostic. My query was more in concern with 
the endpoint implementations being so encapsulated, that it leaves very little 
scope to extend tomcat endpoints(without actually copy-pasting the code into 
the custom endpoint).

I had a look at ALPN usage and I don't see how BEEP using ALPN upgrade can 
function. Will continue digging.

Thanks,
Anurag.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to