Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Name

Default Value

Description

restletMethod

GET

The method to be used in the request for producer. For consumer, the Restlet Endpoint only consumes requests made by restletMethod. The string value is converted to org.restlet.data.Method by the Method.valueOf(String) method.

In 1.x only, restletBindingRef. For 2.x or later, use restletBinding=#refName

An instance of DefaultRestletBinding object null

The name to lookup the RestletBinding object in the Camel Registry.

In 1.x only, restletRealmRef. For 2.x or later use restletRealm=#refName

null

The name to lookup the Realm Map in the Camel Registry.

headerFilterStrategy (2.x or later)

An instance of RestletHeaderFilterStrategy object

Use the # notation (headerFilterStrategy=#refName) to reference a header filter strategy in the Camel Registry. The strategy will be plugged into the Restlet Binding if it is HeaderFilterStrategyAware.

Message Headers

Name

Type

Description

org.apache.camel.restlet.auth.login

String

Login name for basic authentication. It is set on the IN message by application and get filtered before Restlet Request header by Camel.

org.apache.camel.restlet.auth.password

String

Password name for basic authentication. It is set on the IN message by application and get filtered before Restlet Request header by Camel.

org.apache.camel.restlet.mediaType

String

It can be set on the OUT message by application/processor. The value is the content-type of the response message. If this header is not set, content-type will be set based on the object type of the out message body.

org.apache.camel.restlet.queryString

String

The query string of the request URI. It is set on the IN message by DefaultRestletBinding when the Restlet Component receives a request.

org.apache.camel.restlet.responseCode

String or Integer

It can be set on the OUT message by application/processor. The value is the response code of the response message. If this header is not set, response code will be set by Restlet runtime engine.

org.restlet.*

 

Attributes of a Restlet message that get propagated to Camel IN headers.

...

Wiki Markup
{snippet:id=consumer_route|lang=java|url=camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/route/TestRouteBuilder.java}

The restletRealmRef (in 2.x, use the # notation. i.e. restletRealm=#refName)in URI query is an option to lookup a Realm Map in the registry. If this option is specified, the Restlet consumer will use the information to authenticate user logins. Only authenticated requests can access the resources. In this sample, we create a Spring application context that serves as a registry. The bean ID of the Realm Map should match the restletRealmRef.

...