@UriEndpoint(scheme="rest",
title="REST",
syntax="rest:method:path:uriTemplate",
consumerOnly=true,
label="core,http,rest")
public class RestEndpoint
extends DefaultEndpoint
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
|
RestComponent |
getComponent()
Returns the component that created this endpoint.
|
String |
getComponentName() |
String |
getConsumes() |
String |
getDescription() |
String |
getInType() |
String |
getMethod() |
String |
getOutType() |
Map<String,Object> |
getParameters() |
String |
getPath() |
String |
getProduces() |
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 |
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 |
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 |
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, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic RestEndpoint(String endpointUri, RestComponent component)
public RestComponent getComponent()
DefaultEndpointgetComponent in class 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 getComponentName()
public void setComponentName(String componentName)
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 Producer createProducer() throws Exception
EndpointException - can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpointprocessor - the given processorException - can be thrownpublic boolean isSingleton()
IsSingletonpublic boolean isLenientProperties()
EndpointisLenientProperties in interface EndpointisLenientProperties in class DefaultEndpointApache Camel