Server connectors

Configuration

Here are the commons parameters dedicated to HTTP server connectors.

Here is a sample code showing how to set such a parameter.

Creating a minimal Restlet returning "Hello World"
Restlet restlet = new Restlet() {
    @Override
    public void handle(Request request, Response response) {
        response.setEntity("Hello World!", MediaType.TEXT_PLAIN);
    }
};

// Create the HTTP server and listen on port 8182
Server server = new Server(Protocol.HTTP, 8182, restlet);
server.getContext().getParameters().add("useForwardedForHeader", "true");
server.start();

Regarding security and SSL configuration, you can also check this page on Securing a Restlet application.

AsyncWeb

This connector is based on the open source project AsyncWeb. This is an Java HTTP engine, based on the MINA framework. Thus, it employs non blocking IO and has been designed to allow highly scalability and support of very high throughput.

This connector supports the following protocol: HTTP.

The list of supported specific parameters is available in the javadocs:

Here is the list of dependencies of this connector:

Jetty

This connector is based on the Jetty open-source web server. Jetty is popular and has a nice separation between its HTTP protocol implementation and its support for the Servlet API which led it to be the first HTTP server connector developped for the Restlet.

This connector supports the following protocols: HTTP, HTTPS, AJP.

The list of supported specific parameters is available in the javadocs:

Here is the list of dependencies of this connector:

Simple

This connector is based on Simple 3.1 which is an open source embeddable Java based HTTP engine capable of handling high loads.

This connector supports the following protocols: HTTP, HTTPS.

The list of supported specific parameters is available in the javadocs:

Here is the list of dependencies of this connector:

Comments (0)
Navigation doc: view