@UriEndpoint(firstVersion="2.14.0", scheme="rest", title="REST", syntax="rest:method:path:uriTemplate", label="core,rest", lenientProperties=true) public class RestEndpoint extends 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 |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
RestEndpoint(String endpointUri,
RestComponent component) |
Modifier and Type | Method and Description |
---|---|
Consumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
String |
getApiDoc() |
RestBindingMode |
getBindingMode() |
RestComponent |
getComponent()
Returns the component that created this endpoint.
|
String |
getComponentName() |
String |
getConsumes() |
String |
getDescription() |
String |
getHost() |
String |
getInType() |
String |
getMethod() |
String |
getOutType() |
Map<String,Object> |
getParameters() |
String |
getPath() |
String |
getProduces() |
String |
getQueryParameters() |
String |
getRouteId() |
String |
getUriTemplate() |
boolean |
isLenientProperties()
Should all properties be known or does the endpoint allow unknown options?
lenient = false means that the endpoint should validate that all
given options is known and configured properly.
|
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
void |
setApiDoc(String apiDoc)
The swagger api doc resource to use.
|
void |
setBindingMode(RestBindingMode bindingMode)
Configures the binding mode for the producer.
|
void |
setComponentName(String componentName)
The Camel Rest component to use for the REST transport, such as restlet, spark-rest.
|
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 |
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, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public 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()
DefaultEndpoint
getComponent
in class DefaultEndpoint
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 getComponentName()
public void setComponentName(String componentName)
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 Map<String,Object> getParameters()
public void setParameters(Map<String,Object> parameters)
public void setApiDoc(String apiDoc)
public void setHost(String host)
public String getQueryParameters()
public void setQueryParameters(String queryParameters)
public RestBindingMode getBindingMode()
public void setBindingMode(RestBindingMode bindingMode)
public Producer createProducer() throws Exception
Endpoint
Exception
- can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpoint
processor
- the given processorException
- can be thrownpublic boolean isSingleton()
IsSingleton
public boolean isLenientProperties()
Endpoint
isLenientProperties
in interface Endpoint
isLenientProperties
in class DefaultEndpoint
Apache Camel