A request handler may be a direct subclass of one of the JDisc request handler base classes, but there are also base classes available for integrating easier with the Vespa platform. For instance, the base class LoggingRequestHandler does access logging to the Vespa access log, the JDisc API is masked behind a synchronous API and so on.
For the Container, there is nothing special about the different
handlers, the application will work as well deploying a pure JDisc
handler, be it a subclass
com.yahoo.container.jdisc.ThreadedRequestHandler or a
fully independent implementation of the
com.yahoo.jdisc.handler.RequestHandler. As long
as they are built and deployed as other components in the application,
they will be instantiated and bound properly by the container
Also, do note, any handler can have arbitrary components injected into its constructor, refer to a HTTP API use case for examples with both arbitrary shared components and the processing handler.