Package org.apache.camel.component.rest
Class RestComponent
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.component.rest.RestComponent
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Component
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Component("rest") @Metadata(label="verifiers", enums="parameters,connectivity") public class RestComponent extends org.apache.camel.support.DefaultComponent
Rest component.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_REST_CONFIGURATION_ID
-
Constructor Summary
Constructors Constructor Description RestComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.apache.camel.Endpoint
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
String
getApiDoc()
String
getComponentName()
Deprecated.String
getConsumerComponentName()
String
getHost()
String
getProducerComponentName()
org.apache.camel.component.extension.ComponentVerifierExtension
getVerifier()
void
setApiDoc(String apiDoc)
The swagger api doc resource to use.void
setComponentName(String componentName)
Deprecated.use producerComponentName insteadvoid
setConsumerComponentName(String consumerComponentName)
The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, undertow.void
setHost(String host)
Host and port of HTTP service to use (override host in swagger schema)void
setProducerComponentName(String producerComponentName)
The Camel Rest component to use for the producer REST transport, such as http, undertow.-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
DEFAULT_REST_CONFIGURATION_ID
public static final String DEFAULT_REST_CONFIGURATION_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
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.
-
getProducerComponentName
public String getProducerComponentName()
-
setProducerComponentName
public void setProducerComponentName(String producerComponentName)
The Camel Rest component to use for the producer REST transport, such as http, 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.RestProducerFactory is registered in the registry. If either one is found, then that is being used.
-
getComponentName
@Deprecated public String getComponentName()
Deprecated.
-
setComponentName
@Deprecated public void setComponentName(String componentName)
Deprecated.use producerComponentName insteadThe Camel Rest component to use for the producer REST transport, such as http, 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.RestProducerFactory is registered in the registry. If either one is found, then that is being used.
-
getApiDoc
public String getApiDoc()
-
setApiDoc
public void setApiDoc(String apiDoc)
The swagger api doc resource to use. The resource is loaded from classpath by default and must be in JSON format.
-
getHost
public String getHost()
-
setHost
public void setHost(String host)
Host and port of HTTP service to use (override host in swagger schema)
-
getVerifier
public org.apache.camel.component.extension.ComponentVerifierExtension getVerifier()
-
-