@UriEndpoint(firstVersion="2.16.0", scheme="rest-api", title="REST API", syntax="rest-api:path/contextIdPattern", consumerOnly=true, label="core,rest", lenientProperties=true) public class RestApiEndpoint extends DefaultEndpoint
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_API_COMPONENT_NAME |
static String |
RESOURCE_PATH |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
RestApiEndpoint(String endpointUri,
RestApiComponent 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 |
getApiComponentName() |
RestApiComponent |
getComponent()
Returns the component that created this endpoint.
|
String |
getComponentName() |
String |
getContextIdPattern() |
Map<String,Object> |
getParameters() |
String |
getPath() |
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 |
setApiComponentName(String apiComponentName)
The Camel Rest API component to use for generating the API of the REST services, such as swagger.
|
void |
setComponentName(String componentName)
The Camel Rest component to use for the REST transport, such as restlet, spark-rest.
|
void |
setContextIdPattern(String contextIdPattern)
Optional CamelContext id pattern to only allow Rest APIs from rest services within CamelContext's which name matches the pattern.
|
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
|
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_API_COMPONENT_NAME
public static final String RESOURCE_PATH
public RestApiEndpoint(String endpointUri, RestApiComponent component)
public RestApiComponent getComponent()
DefaultEndpoint
getComponent
in class DefaultEndpoint
public String getContextIdPattern()
public void setContextIdPattern(String contextIdPattern)
public String getComponentName()
public void setComponentName(String componentName)
public String getApiComponentName()
public void setApiComponentName(String apiComponentName)
public Map<String,Object> getParameters()
public void setParameters(Map<String,Object> parameters)
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