Class 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  
      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • 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 instead
      void setConsumerComponentName​(String consumerComponentName)
      The Camel Rest component to use for (consumer) the 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 (producer) the 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 interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • RestComponent

        public RestComponent()
    • Method Detail

      • createEndpoint

        protected org.apache.camel.Endpoint createEndpoint​(String uri,
                                                           String remaining,
                                                           Map<String,​Object> parameters)
                                                    throws Exception
        Specified by:
        createEndpoint in class org.apache.camel.support.DefaultComponent
        Throws:
        Exception
      • getConsumerComponentName

        public String getConsumerComponentName()
      • setConsumerComponentName

        public void setConsumerComponentName​(String consumerComponentName)
        The Camel Rest component to use for (consumer) the REST transport, such as jetty, servlet, undertow. If no component has been explicit 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 (producer) the REST transport, such as http, undertow. If no component has been explicit 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.
      • setComponentName

        @Deprecated
        public void setComponentName​(String componentName)
        Deprecated.
        use producerComponentName instead
        The Camel Rest component to use for (producer) the REST transport, such as http, undertow. If no component has been explicit 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()