Hello Bruce,

I'm not aware that the Jetty connector for Restlet can use the Grizzly one, thus this would lead me to use the Jetty connector alone.
But, if anyone knows...

I send the code of a sample basic HTTPS server (this code is the same whatever connector you're using).

Best regards,
Thierry Boileau

import java.io.File;

import org.restlet.Component;
import org.restlet.Restlet;
import org.restlet.data.MediaType;
import org.restlet.data.Protocol;
import org.restlet.data.Request;
import org.restlet.data.Response;

public class BasicHttpsServer {
   public static void main(String[] args) {
       // Creates a Restlet whose response to each request is "hello, world".
       Restlet restlet = new Restlet() {
           @Override
           public void handle(Request request, Response response) {
               response.setEntity("hello, world", MediaType.TEXT_PLAIN);
           }
       };

       // Component declaring only one HTTPS server connector.
       Component component = new Component();
       component.getServers().add(Protocol.HTTPS, 8182);
       component.getDefaultHost().attach("/helloWorld", restlet);

       // Update component's context with keystore parameters.
       File keystoreFile = new File("d:\\temp\\certificats", "myKeystore");
       component.getContext().getParameters().add("keystorePath",
               keystoreFile.toURI().toASCIIString());
       component.getContext().getParameters().add("keystorePassword",
               "storepass");
       component.getContext().getParameters().add("keyPassword", "keypass");

       try {
           component.start();
       } catch (Exception e) {
           e.printStackTrace();
       }
   }
}




Hi Bruce,

Currently, the Grizzly connector is not ready for production. There are a
couple of outstanding bugs that we need to fix. We'd like to run some
benchmarks as well before final 1.1 release.

However, even if 1.1 release should be ready for production, it would still
be marked as "testing" in our download page:
http://www.restlet.org/downloads/
It's only a couple of months after, when we release 1.2 M1, that 1.1 release
will become the "stable" official release instead of 1.0. We try to follow a
release cycle similar to Debian.

Now, if stability matters the most, I would recommend using the Jetty
connector instead, which we have since Restlet 1.0.

Regarding connectors configuration, check this page:
http://www.restlet.org/documentation/1.1/connectors

Best regards,
Jerome


Hi Jerome,

Thanks for the detailed response. The main reason we want to use Grizzly
directly is because we simply want a high performance http/https connector
without any web server capabilities. Embedding Jetty seems like a reasonable
approach but we are concerning about the extra processing overhead. Also since
Jetty can use Grizzly connector as well, would you recommend using the Jetty
extension with Grizzly connector instead of their default connector?

P.S. Is there an existing example of setting up HTTPS using Grizzly connector?

Regards,



Reply via email to