Hi

You may be able to configure the handlers option on the jetty component

restConfiguration().component("jetty").componentProperty("handlers",
"myHandler");

Notice it expect the options is string which refer to a handler to
lookup from the registry.

Then you need to enlist your custom handler in the registry with the
id myHandler.

If you run Camel standalone and from Java code its something a long the lines of

SimpleRegistry reg = new SimpleRegistry();
reg.put("myHandler", myHandlerInstance");

CamelContext camel = new DefaultCamelContext(reg);





On Fri, Jan 23, 2015 at 3:50 PM, Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>> If using jetty you can also use the jetty api to add a
>> handler to service static files.
>
>
> So I'm looking at doing this. I think I worked out how to create a Jetty
> ContextHandler and associated ResourceHandler. But I'm not totally sure how
> to set these.
> I can get the JettyHttpComponent using
> restConfiguration().component("jetty")
> but in JettyHttpComponent the methods the deal with the handlers are
> protected. Seems like this has to be done through the endpoint (using the
> endpointProperty(String, String) method in the REST DSL, which only allows
> setting it as a comma separated list of values that are present in the
> registry.
> Is this on the right lines, or am I missing something simpler?
>
> Tim
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to