Package org.apache.camel.component.rest
Class RestApiEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.rest.RestApiEndpoint
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.16.0", scheme="rest-api", title="REST API", syntax="rest-api:path", consumerOnly=true, category={CORE,REST}, lenientProperties=true) public class RestApiEndpoint extends org.apache.camel.support.DefaultEndpointExpose OpenAPI Specification of the REST services defined using Camel REST DSL.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_API_COMPONENT_NAMEstatic StringRESOURCE_PATH
-
Constructor Summary
Constructors Constructor Description RestApiEndpoint(String endpointUri, RestApiComponent component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor)org.apache.camel.ProducercreateProducer()StringgetApiComponentName()RestApiComponentgetComponent()StringgetConsumerComponentName()Map<String,Object>getParameters()StringgetPath()booleanisLenientProperties()voidsetApiComponentName(String apiComponentName)The Camel Rest API component to use for generating the API of the REST services, such as openapi.voidsetConsumerComponentName(String consumerComponentName)The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, undertow.voidsetParameters(Map<String,Object> parameters)Additional parameters to configure the consumer of the REST transport for this REST servicevoidsetPath(String path)The base path-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
DEFAULT_API_COMPONENT_NAME
public static final String DEFAULT_API_COMPONENT_NAME
- See Also:
- Constant Field Values
-
RESOURCE_PATH
public static final String RESOURCE_PATH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RestApiEndpoint
public RestApiEndpoint(String endpointUri, RestApiComponent component)
-
-
Method Detail
-
getComponent
public RestApiComponent getComponent()
- Overrides:
getComponentin classorg.apache.camel.support.DefaultEndpoint
-
getPath
public String getPath()
-
setPath
public void setPath(String path)
The base path
-
getConsumerComponentName
public String getConsumerComponentName()
-
setConsumerComponentName
public void setConsumerComponentName(String consumerComponentName)
The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, undertow. If no component has been explicitly configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found, then that is being used.
-
getApiComponentName
public String getApiComponentName()
-
setApiComponentName
public void setApiComponentName(String apiComponentName)
The Camel Rest API component to use for generating the API of the REST services, such as openapi.
-
setParameters
public void setParameters(Map<String,Object> parameters)
Additional parameters to configure the consumer of the REST transport for this REST service
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception- Throws:
Exception
-
isLenientProperties
public boolean isLenientProperties()
- Specified by:
isLenientPropertiesin interfaceorg.apache.camel.Endpoint- Overrides:
isLenientPropertiesin classorg.apache.camel.support.DefaultEndpoint
-
-