Class EmbeddedConnection

  • All Implemented Interfaces:
    AdaptrisComponent, AdaptrisConnection, ComponentLifecycle, ComponentLifecycleExtension, JettyServletRegistrar, StateManagedComponent

    @ComponentProfile(summary="Connection that uses the embedded Jetty engine management component for requests",
                      tag="connections,http,https,jetty")
    public class EmbeddedConnection
    extends AdaptrisConnectionImp
    implements JettyServletRegistrar
    The EmbeddedConnection makes use of the existing Jetty Engine that has been enabled as part of the bootstrap process.

    This is designed to be a replacement for HttpConnection and HttpsConnection and allows you to configure a single jetty instance according to your requirements which can be re-used across many channels. Of course if you have not enabled a global jetty instance, then exceptions will be thrown if you attempt to configure an instance of this class.

    If you use this connection; you may have to delete ROOT.war from the jetty webapps directory. The default servlet that is registered with the default web application might interfere with the registering of servlets against arbitrary locations; if you get HTTP 404 errors, then enable logging for the org.eclipse.jetty category and check how the request is routed by the Jetty engine.

    In the adapter configuration file this class is aliased as jetty-embedded-connection which is the preferred alternative to the fully qualified classname when building your configuration.