Class UndertowComponent
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.apache.camel.component.undertow.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.HasCamelContext,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.-
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateApiConsumer(org.apache.camel.CamelContext camelContext, org.apache.camel.Processor processor, String contextPath, org.apache.camel.spi.RestConfiguration configuration, Map<String, Object> parameters) org.apache.camel.ConsumercreateConsumer(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) protected org.apache.camel.Endpointprotected UndertowEndpointcreateEndpointInstance(URI endpointUri, UndertowComponent component) org.apache.camel.ProducercreateProducer(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) protected UndertowHostprotected voiddoInit()protected Stringorg.apache.camel.support.jsse.SSLContextParametersorg.apache.camel.component.extension.ComponentVerifierExtensionbooleanbooleanio.undertow.server.HttpHandlerregisterEndpoint(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, SSLContext sslContext, io.undertow.server.HttpHandler handler) voidsetAllowedRoles(String allowedRoles) Configuration used by UndertowSecurityProvider.voidsetHostOptions(UndertowHostOptions hostOptions) To configure common options, such as thread poolsvoidsetMuteException(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.voidsetSecurityConfiguration(Object securityConfiguration) Configuration used by UndertowSecurityProvider.voidsetSecurityProvider(UndertowSecurityProvider securityProvider) Security provider allows plug in the provider, which will be used to secure requests.voidsetSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParametersvoidsetUndertowHttpBinding(UndertowHttpBinding undertowHttpBinding) To use a custom HttpBinding to control the mapping between Camel message and HttpClient.voidsetUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) Enable usage of global SSL context parameters.voidunregisterEndpoint(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, SSLContext sslContext) Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, 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, validateURIMethods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doShutdown, doStart, doStop, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.CamelContextAware
setCamelContextMethods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContextMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.SSLContextParametersAware
retrieveGlobalSslContextParametersMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
UndertowComponent
public UndertowComponent() -
UndertowComponent
public UndertowComponent(org.apache.camel.CamelContext context)
-
-
Method Details
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception- Specified by:
createEndpointin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
createEndpointInstance
-
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:
createConsumerin interfaceorg.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:
createApiConsumerin interfaceorg.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:
createProducerin interfaceorg.apache.camel.spi.RestProducerFactory- Throws:
Exception
-
doInit
- Overrides:
doInitin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
registerEndpoint
public io.undertow.server.HttpHandler registerEndpoint(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, SSLContext sslContext, io.undertow.server.HttpHandler handler) throws Exception - Throws:
Exception
-
unregisterEndpoint
public void unregisterEndpoint(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, SSLContext sslContext) -
createUndertowHost
-
getUndertowHttpBinding
-
setUndertowHttpBinding
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:
isUseGlobalSslContextParametersin interfaceorg.apache.camel.SSLContextParametersAware
-
setUseGlobalSslContextParameters
public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) Enable usage of global SSL context parameters.- Specified by:
setUseGlobalSslContextParametersin interfaceorg.apache.camel.SSLContextParametersAware
-
getHostOptions
-
setHostOptions
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
-
getHandlers
-
getSecurityConfiguration
-
setSecurityConfiguration
Configuration used by UndertowSecurityProvider. Security configuration object for use from UndertowSecurityProvider. Configuration is UndertowSecurityProvider specific. Each provider decides, whether it accepts configuration. -
getAllowedRoles
-
setAllowedRoles
Configuration used by UndertowSecurityProvider. Comma separated list of allowed roles. -
setSecurityProvider
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). -
getSecurityProvider
-