@UriEndpoint(firstVersion="2.14.0",
scheme="rest",
title="REST",
syntax="rest:method:path:uriTemplate",
label="core,rest",
lenientProperties=true)
public class RestEndpoint
extends org.apache.camel.support.DefaultEndpoint
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_API_COMPONENT_NAME |
static String[] |
DEFAULT_REST_CONSUMER_COMPONENTS |
static String[] |
DEFAULT_REST_PRODUCER_COMPONENTS |
static String |
RESOURCE_PATH |
| Constructor and Description |
|---|
RestEndpoint(String endpointUri,
RestComponent component) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
String |
getApiDoc() |
org.apache.camel.spi.RestConfiguration.RestBindingMode |
getBindingMode() |
RestComponent |
getComponent() |
String |
getConsumerComponentName() |
String |
getConsumes() |
String |
getDescription() |
String |
getHost() |
String |
getInType() |
String |
getMethod() |
String |
getOutType() |
Map<String,Object> |
getParameters() |
String |
getPath() |
String |
getProducerComponentName() |
String |
getProduces() |
String |
getQueryParameters() |
String |
getRouteId() |
String |
getUriTemplate() |
boolean |
isLenientProperties() |
void |
setApiDoc(String apiDoc)
The swagger api doc resource to use.
|
void |
setBindingMode(org.apache.camel.spi.RestConfiguration.RestBindingMode bindingMode)
Configures the binding mode for the producer.
|
void |
setBindingMode(String bindingMode) |
void |
setConsumerComponentName(String consumerComponentName)
The Camel Rest component to use for (consumer) the REST transport, such as jetty, servlet, undertow.
|
void |
setConsumes(String consumes)
Media type such as: 'text/xml', or 'application/json' this REST service accepts.
|
void |
setDescription(String description)
Human description to document this REST service
|
void |
setHost(String host)
Host and port of HTTP service to use (override host in swagger schema)
|
void |
setInType(String inType)
To declare the incoming POJO binding type as a FQN class name
|
void |
setMethod(String method)
HTTP method to use.
|
void |
setOutType(String outType)
To declare the outgoing POJO binding type as a FQN class name
|
void |
setParameters(Map<String,Object> parameters)
Additional parameters to configure the consumer of the REST transport for this REST service
|
void |
setPath(String path)
The base path
|
void |
setProducerComponentName(String producerComponentName)
The Camel Rest component to use for (producer) the REST transport, such as http, undertow.
|
void |
setProduces(String produces)
Media type such as: 'text/xml', or 'application/json' this REST service returns.
|
void |
setQueryParameters(String queryParameters)
Query parameters for the HTTP service to call
|
void |
setRouteId(String routeId)
Name of the route this REST services creates
|
void |
setUriTemplate(String uriTemplate)
The uri template
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringbuild, doBuild, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic static final String[] DEFAULT_REST_CONSUMER_COMPONENTS
public static final String[] DEFAULT_REST_PRODUCER_COMPONENTS
public static final String DEFAULT_API_COMPONENT_NAME
public static final String RESOURCE_PATH
public RestEndpoint(String endpointUri, RestComponent component)
public RestComponent getComponent()
getComponent in class org.apache.camel.support.DefaultEndpointpublic String getMethod()
public void setMethod(String method)
public String getPath()
public void setPath(String path)
public String getUriTemplate()
public void setUriTemplate(String uriTemplate)
public String getConsumes()
public void setConsumes(String consumes)
public String getProduces()
public void setProduces(String produces)
public String getProducerComponentName()
public void setProducerComponentName(String producerComponentName)
public String getConsumerComponentName()
public void setConsumerComponentName(String consumerComponentName)
public String getInType()
public void setInType(String inType)
public String getOutType()
public void setOutType(String outType)
public String getRouteId()
public void setRouteId(String routeId)
public String getDescription()
public void setDescription(String description)
public void setParameters(Map<String,Object> parameters)
public String getApiDoc()
public void setApiDoc(String apiDoc)
public String getHost()
public void setHost(String host)
public String getQueryParameters()
public void setQueryParameters(String queryParameters)
public org.apache.camel.spi.RestConfiguration.RestBindingMode getBindingMode()
public void setBindingMode(org.apache.camel.spi.RestConfiguration.RestBindingMode bindingMode)
public void setBindingMode(String bindingMode)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
Exceptionpublic boolean isLenientProperties()
isLenientProperties in interface org.apache.camel.EndpointisLenientProperties in class org.apache.camel.support.DefaultEndpointApache Camel