You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Jetty Component

The jetty: component provides HTTP based endpoints for consuming HTTP requests that arrive at an http endpoint.

URI format

jetty:http:hostname[:port][/resourceUri][?options]

Options

Name

Description

Example

Required?

default value

sessionSupport

The option for enable the session manager in the server side of Jetty.

sessionSupport=true

No

false

Usage

You can only consume from endpoints generated by the Jetty component. Therefore it should only be used as input into your camel Routes. To issue HTTP requests against other HTTP endpoints you can use the HTTP Component

Example

from("timer://foo?fixedRate=true&delay=0&period=10000").to("jetty:http://www.google.com").setHeader(FileComponent.HEADER_FILE_NAME, "message.html").to("file:target/hello");

Poll the google homepage every 10 seconds and write the page to the file message.html

  • No labels