org.apache.camel.model.rest
Class RestConfigurationDefinition

java.lang.Object
  extended by org.apache.camel.model.rest.RestConfigurationDefinition

public class RestConfigurationDefinition
extends Object

Represents an XML <restConfiguration/> element


Constructor Summary
RestConfigurationDefinition()
           
 
Method Summary
 RestConfiguration asRestConfiguration(CamelContext context)
          Creates a RestConfiguration instance based on the definition
 RestConfigurationDefinition bindingMode(RestBindingMode bindingMode)
          To specify the binding mode
 RestConfigurationDefinition component(String componentId)
          To use a specific Camel rest component
 RestConfigurationDefinition componentProperty(String key, String value)
          For additional configuration options on component level
 RestConfigurationDefinition consumerProperty(String key, String value)
          For additional configuration options on consumer level
 RestConfigurationDefinition contextPath(String contextPath)
          Sets a leading context-path the REST services will be using.
 RestConfigurationDefinition dataFormatProperty(String key, String value)
          For additional configuration options on data format level
 RestConfigurationDefinition endpointProperty(String key, String value)
          For additional configuration options on endpoint level
 RestBindingMode getBindingMode()
           
 String getComponent()
           
 List<RestPropertyDefinition> getComponentProperties()
           
 List<RestPropertyDefinition> getConsumerProperties()
           
 String getContextPath()
           
 List<RestPropertyDefinition> getDataFormatProperties()
           
 List<RestPropertyDefinition> getEndpointProperties()
           
 String getHost()
           
 RestHostNameResolver getHostNameResolver()
           
 String getJsonDataFormat()
           
 String getPort()
           
 String getScheme()
           
 String getXmlDataFormat()
           
 RestConfigurationDefinition host(String host)
          To define the host to use, such as 0.0.0.0 or localhost
 RestConfigurationDefinition hostNameResolver(RestHostNameResolver hostNameResolver)
          To specify the hostname resolver
 RestConfigurationDefinition jsonDataFormat(String name)
          To use a specific json data format
 RestConfigurationDefinition port(int port)
          To specify the port number to use for the REST service
 RestConfigurationDefinition port(String port)
          To specify the port number to use for the REST service
 RestConfigurationDefinition scheme(String scheme)
          To use a specific scheme such as http/https
 void setBindingMode(RestBindingMode bindingMode)
           
 void setComponent(String component)
           
 void setComponentProperties(List<RestPropertyDefinition> componentProperties)
           
 void setConsumerProperties(List<RestPropertyDefinition> consumerProperties)
           
 void setContextPath(String contextPath)
           
 void setDataFormatProperties(List<RestPropertyDefinition> dataFormatProperties)
           
 void setEndpointProperties(List<RestPropertyDefinition> endpointProperties)
           
 void setHost(String host)
           
 void setHostNameResolver(RestHostNameResolver hostNameResolver)
           
 void setJsonDataFormat(String jsonDataFormat)
           
 void setPort(String port)
           
 void setScheme(String scheme)
           
 void setXmlDataFormat(String xmlDataFormat)
           
 RestConfigurationDefinition xmlDataFormat(String name)
          To use a specific XML data format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestConfigurationDefinition

public RestConfigurationDefinition()
Method Detail

getComponent

public String getComponent()

setComponent

public void setComponent(String component)

getScheme

public String getScheme()

setScheme

public void setScheme(String scheme)

getHost

public String getHost()

setHost

public void setHost(String host)

getPort

public String getPort()

setPort

public void setPort(String port)

getContextPath

public String getContextPath()

setContextPath

public void setContextPath(String contextPath)

getHostNameResolver

public RestHostNameResolver getHostNameResolver()

setHostNameResolver

public void setHostNameResolver(RestHostNameResolver hostNameResolver)

getBindingMode

public RestBindingMode getBindingMode()

setBindingMode

public void setBindingMode(RestBindingMode bindingMode)

getJsonDataFormat

public String getJsonDataFormat()

setJsonDataFormat

public void setJsonDataFormat(String jsonDataFormat)

getXmlDataFormat

public String getXmlDataFormat()

setXmlDataFormat

public void setXmlDataFormat(String xmlDataFormat)

getComponentProperties

public List<RestPropertyDefinition> getComponentProperties()

setComponentProperties

public void setComponentProperties(List<RestPropertyDefinition> componentProperties)

getEndpointProperties

public List<RestPropertyDefinition> getEndpointProperties()

setEndpointProperties

public void setEndpointProperties(List<RestPropertyDefinition> endpointProperties)

getConsumerProperties

public List<RestPropertyDefinition> getConsumerProperties()

setConsumerProperties

public void setConsumerProperties(List<RestPropertyDefinition> consumerProperties)

getDataFormatProperties

public List<RestPropertyDefinition> getDataFormatProperties()

setDataFormatProperties

public void setDataFormatProperties(List<RestPropertyDefinition> dataFormatProperties)

component

public RestConfigurationDefinition component(String componentId)
To use a specific Camel rest component


scheme

public RestConfigurationDefinition scheme(String scheme)
To use a specific scheme such as http/https


host

public RestConfigurationDefinition host(String host)
To define the host to use, such as 0.0.0.0 or localhost


port

public RestConfigurationDefinition port(int port)
To specify the port number to use for the REST service


port

public RestConfigurationDefinition port(String port)
To specify the port number to use for the REST service


contextPath

public RestConfigurationDefinition contextPath(String contextPath)
Sets a leading context-path the REST services will be using.

This can be used when using components such as camel-servlet where the deployed web application is deployed using a context-path.


hostNameResolver

public RestConfigurationDefinition hostNameResolver(RestHostNameResolver hostNameResolver)
To specify the hostname resolver


bindingMode

public RestConfigurationDefinition bindingMode(RestBindingMode bindingMode)
To specify the binding mode


jsonDataFormat

public RestConfigurationDefinition jsonDataFormat(String name)
To use a specific json data format

Parameters:
name - name of the data format to resolve

xmlDataFormat

public RestConfigurationDefinition xmlDataFormat(String name)
To use a specific XML data format

Parameters:
name - name of the data format to resolve

componentProperty

public RestConfigurationDefinition componentProperty(String key,
                                                     String value)
For additional configuration options on component level


endpointProperty

public RestConfigurationDefinition endpointProperty(String key,
                                                    String value)
For additional configuration options on endpoint level


consumerProperty

public RestConfigurationDefinition consumerProperty(String key,
                                                    String value)
For additional configuration options on consumer level


dataFormatProperty

public RestConfigurationDefinition dataFormatProperty(String key,
                                                      String value)
For additional configuration options on data format level


asRestConfiguration

public RestConfiguration asRestConfiguration(CamelContext context)
                                      throws Exception
Creates a RestConfiguration instance based on the definition

Parameters:
context - the camel context
Returns:
the configuration
Throws:
Exception - is thrown if error creating the configuration


Apache Camel