Class UndertowComponent

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Component, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.RestApiConsumerFactory, org.apache.camel.spi.RestConsumerFactory, org.apache.camel.spi.RestProducerFactory, org.apache.camel.SSLContextParametersAware, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    @Metadata(label="verifiers",
              enums="parameters,connectivity")
    @Component("undertow")
    public class UndertowComponent
    extends org.apache.camel.support.DefaultComponent
    implements org.apache.camel.spi.RestConsumerFactory, org.apache.camel.spi.RestApiConsumerFactory, org.apache.camel.spi.RestProducerFactory, org.apache.camel.SSLContextParametersAware
    Represents the component that manages UndertowEndpoint.
    • Constructor Detail

      • UndertowComponent

        public UndertowComponent()
      • UndertowComponent

        public UndertowComponent​(org.apache.camel.CamelContext context)
    • 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
      • createConsumer

        public org.apache.camel.Consumer createConsumer​(org.apache.camel.CamelContext camelContext,
                                                        org.apache.camel.Processor processor,
                                                        String verb,
                                                        String basePath,
                                                        String uriTemplate,
                                                        String consumes,
                                                        String produces,
                                                        org.apache.camel.spi.RestConfiguration configuration,
                                                        Map<String,​Object> parameters)
                                                 throws Exception
        Specified by:
        createConsumer in interface org.apache.camel.spi.RestConsumerFactory
        Throws:
        Exception
      • createApiConsumer

        public org.apache.camel.Consumer createApiConsumer​(org.apache.camel.CamelContext camelContext,
                                                           org.apache.camel.Processor processor,
                                                           String contextPath,
                                                           org.apache.camel.spi.RestConfiguration configuration,
                                                           Map<String,​Object> parameters)
                                                    throws Exception
        Specified by:
        createApiConsumer in interface org.apache.camel.spi.RestApiConsumerFactory
        Throws:
        Exception
      • createProducer

        public org.apache.camel.Producer createProducer​(org.apache.camel.CamelContext camelContext,
                                                        String host,
                                                        String verb,
                                                        String basePath,
                                                        String uriTemplate,
                                                        String queryParameters,
                                                        String consumes,
                                                        String produces,
                                                        org.apache.camel.spi.RestConfiguration configuration,
                                                        Map<String,​Object> parameters)
                                                 throws Exception
        Specified by:
        createProducer in interface org.apache.camel.spi.RestProducerFactory
        Throws:
        Exception
      • doInit

        protected void doInit()
                       throws Exception
        Overrides:
        doInit in class org.apache.camel.support.DefaultComponent
        Throws:
        Exception
      • setUndertowHttpBinding

        public void setUndertowHttpBinding​(UndertowHttpBinding undertowHttpBinding)
        To use a custom HttpBinding to control the mapping between Camel message and HttpClient.
      • getSslContextParameters

        public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
      • setSslContextParameters

        public void setSslContextParameters​(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
        To configure security using SSLContextParameters
      • isUseGlobalSslContextParameters

        public boolean isUseGlobalSslContextParameters()
        Specified by:
        isUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAware
      • setUseGlobalSslContextParameters

        public void setUseGlobalSslContextParameters​(boolean useGlobalSslContextParameters)
        Enable usage of global SSL context parameters.
        Specified by:
        setUseGlobalSslContextParameters in interface org.apache.camel.SSLContextParametersAware
      • setHostOptions

        public void setHostOptions​(UndertowHostOptions hostOptions)
        To configure common options, such as thread pools
      • isMuteException

        public boolean isMuteException()
      • setMuteException

        public void setMuteException​(boolean muteException)
        If enabled and an Exchange failed processing on the consumer side the response's body won't contain the exception's stack trace.
      • getVerifier

        public org.apache.camel.component.extension.ComponentVerifierExtension getVerifier()
      • getComponentName

        protected String getComponentName()
      • getSecurityConfiguration

        public Object getSecurityConfiguration()
      • setSecurityConfiguration

        public void setSecurityConfiguration​(Object securityConfiguration)
        Configuration used by UndertowSecurityProvider. Security configuration object for use from UndertowSecurityProvider. Configuration is UndertowSecurityProvider specific. Each provider decides, whether it accepts configuration.
      • getAllowedRoles

        public String getAllowedRoles()
      • setAllowedRoles

        public void setAllowedRoles​(String allowedRoles)
        Configuration used by UndertowSecurityProvider. Comma separated list of allowed roles.
      • setSecurityProvider

        public void setSecurityProvider​(UndertowSecurityProvider securityProvider)
        Security provider allows plug in the provider, which will be used to secure requests. SPI approach could be used too (component then finds security provider using SPI).