@UriEndpoint(firstVersion="2.16.0",
scheme="undertow",
title="Undertow",
syntax="undertow:httpURI",
category={HTTP,WEBSOCKET},
lenientProperties=true)
public class UndertowEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements org.apache.camel.AsyncEndpoint, org.apache.camel.spi.HeaderFilterStrategyAware, org.apache.camel.cloud.DiscoverableService
Constructor and Description |
---|
UndertowEndpoint(String uri,
UndertowComponent component) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Exchange |
createExchange(io.undertow.server.HttpServerExchange httpExchange) |
org.apache.camel.PollingConsumer |
createPollingConsumer() |
org.apache.camel.Producer |
createProducer() |
protected void |
doInit() |
Boolean |
getAccessLog() |
io.undertow.server.handlers.accesslog.AccessLogReceiver |
getAccessLogReceiver() |
String |
getAllowedRoles() |
UndertowComponent |
getComponent() |
org.apache.camel.http.base.cookie.CookieHandler |
getCookieHandler() |
String |
getHandlers() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
HttpHandlerRegistrationInfo |
getHttpHandlerRegistrationInfo() |
String |
getHttpMethodRestrict() |
URI |
getHttpURI() |
Boolean |
getKeepAlive() |
Boolean |
getMatchOnUriPrefix() |
Boolean |
getMuteException() |
Map<String,Object> |
getOptions() |
Boolean |
getReuseAddresses() |
Object |
getSecurityConfiguration() |
UndertowSecurityProvider |
getSecurityProvider() |
Integer |
getSendTimeout() |
Boolean |
getSendToAll() |
Map<String,String> |
getServiceProperties() |
SSLContext |
getSslContext() |
org.apache.camel.support.jsse.SSLContextParameters |
getSslContextParameters() |
Boolean |
getTcpNoDelay() |
Boolean |
getThrowExceptionOnFailure() |
Boolean |
getTransferException() |
UndertowHttpBinding |
getUndertowHttpBinding() |
CamelWebSocketHandler |
getWebSocketHttpHandler() |
boolean |
isFireWebSocketChannelEvents() |
boolean |
isLenientProperties() |
boolean |
isMatchOnUriPrefix() |
boolean |
isOptionsEnabled() |
boolean |
isPreserveHostHeader() |
boolean |
isUseStreaming() |
boolean |
isWebSocket() |
void |
setAccessLog(Boolean accessLog)
Whether or not the consumer should write access log
|
void |
setAccessLogReceiver(io.undertow.server.handlers.accesslog.AccessLogReceiver accessLogReceiver)
Which Undertow AccessLogReciever should be used
Will use JBossLoggingAccessLogReceiver if not specifid
|
void |
setAllowedRoles(String allowedRoles) |
void |
setCookieHandler(org.apache.camel.http.base.cookie.CookieHandler cookieHandler)
Configure a cookie handler to maintain a HTTP session
|
void |
setFireWebSocketChannelEvents(boolean fireWebSocketChannelEvents)
if
true , the consumer will post notifications to the route when a new WebSocket peer connects,
disconnects, etc. |
void |
setHandlers(String handlers)
Specifies a comma-delimited set of io.undertow.server.HttpHandler instances in your Registry (such as your Spring ApplicationContext).
|
void |
setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
To use a custom HeaderFilterStrategy to filter header to and from Camel message.
|
void |
setHttpMethodRestrict(String httpMethodRestrict)
Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc.
|
void |
setHttpURI(URI httpURI)
The url of the HTTP endpoint to use.
|
void |
setKeepAlive(Boolean keepAlive)
Setting to ensure socket is not closed due to inactivity
|
void |
setMatchOnUriPrefix(Boolean matchOnUriPrefix)
Whether or not the consumer should try to find a target consumer by matching the URI prefix if no exact match is found.
|
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.
|
void |
setOptions(Map<String,Object> options)
Sets additional channel options.
|
void |
setOptionsEnabled(boolean optionsEnabled)
Specifies whether to enable HTTP OPTIONS for this Servlet consumer.
|
void |
setPreserveHostHeader(boolean preserveHostHeader) |
void |
setReuseAddresses(Boolean reuseAddresses)
Setting to facilitate socket multiplexing
|
void |
setSecurityConfiguration(Object securityConfiguration) |
void |
setSecurityProvider(UndertowSecurityProvider securityProvider) |
void |
setSendTimeout(Integer sendTimeout)
Timeout in milliseconds when sending to a websocket channel.
|
void |
setSendToAll(Boolean sendToAll)
To send to all websocket subscribers.
|
void |
setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
To configure security using SSLContextParameters
|
void |
setTcpNoDelay(Boolean tcpNoDelay)
Setting to improve TCP protocol performance
|
void |
setThrowExceptionOnFailure(Boolean throwExceptionOnFailure)
Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server.
|
void |
setTransferException(Boolean transferException)
If enabled and an Exchange failed processing on the consumer side and if the caused Exception
was send back serialized in the response as a application/x-java-serialized-object content type.
|
void |
setUndertowHttpBinding(UndertowHttpBinding undertowHttpBinding)
To use a custom UndertowHttpBinding to control the mapping between Camel message and undertow.
|
void |
setUseStreaming(boolean useStreaming)
For HTTP endpoint:
if
true , text and binary messages will be wrapped as InputStream
before they are passed to an Exchange ; otherwise they will be passed as byte[]. |
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, doStart, doStop, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
configureProperties, createAsyncProducer, createExchange, createExchange, getCamelContext, getEndpointBaseUri, getEndpointKey, getEndpointUri, isSingletonProducer, setCamelContext
public UndertowEndpoint(String uri, UndertowComponent component)
public UndertowComponent getComponent()
getComponent
in class org.apache.camel.support.DefaultEndpoint
public UndertowSecurityProvider getSecurityProvider()
public void setSecurityProvider(UndertowSecurityProvider securityProvider)
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception
createPollingConsumer
in interface org.apache.camel.Endpoint
createPollingConsumer
in class org.apache.camel.support.DefaultEndpoint
Exception
public boolean isLenientProperties()
isLenientProperties
in interface org.apache.camel.Endpoint
isLenientProperties
in class org.apache.camel.support.DefaultEndpoint
public Map<String,String> getServiceProperties()
getServiceProperties
in interface org.apache.camel.cloud.DiscoverableService
public org.apache.camel.Exchange createExchange(io.undertow.server.HttpServerExchange httpExchange) throws Exception
Exception
public SSLContext getSslContext()
public URI getHttpURI()
public void setHttpURI(URI httpURI)
public String getHttpMethodRestrict()
public void setHttpMethodRestrict(String httpMethodRestrict)
public Boolean getMatchOnUriPrefix()
public boolean isMatchOnUriPrefix()
public void setMatchOnUriPrefix(Boolean matchOnUriPrefix)
public org.apache.camel.spi.HeaderFilterStrategy getHeaderFilterStrategy()
getHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public void setHeaderFilterStrategy(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
setHeaderFilterStrategy
in interface org.apache.camel.spi.HeaderFilterStrategyAware
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters)
public Boolean getThrowExceptionOnFailure()
public void setThrowExceptionOnFailure(Boolean throwExceptionOnFailure)
public Boolean getTransferException()
public void setTransferException(Boolean transferException)
public Boolean getMuteException()
public void setMuteException(Boolean muteException)
public UndertowHttpBinding getUndertowHttpBinding()
public void setUndertowHttpBinding(UndertowHttpBinding undertowHttpBinding)
public Boolean getKeepAlive()
public void setKeepAlive(Boolean keepAlive)
public Boolean getTcpNoDelay()
public void setTcpNoDelay(Boolean tcpNoDelay)
public Boolean getReuseAddresses()
public void setReuseAddresses(Boolean reuseAddresses)
public void setOptions(Map<String,Object> options)
Options
.
To configure from endpoint uri, then prefix each option with option., such as option.close-abort=true&option.send-buffer=8192public boolean isOptionsEnabled()
public void setOptionsEnabled(boolean optionsEnabled)
public org.apache.camel.http.base.cookie.CookieHandler getCookieHandler()
public void setCookieHandler(org.apache.camel.http.base.cookie.CookieHandler cookieHandler)
public Boolean getSendToAll()
public void setSendToAll(Boolean sendToAll)
UndertowConstants.SEND_TO_ALL
header on the message.public Integer getSendTimeout()
public void setSendTimeout(Integer sendTimeout)
public boolean isUseStreaming()
public void setUseStreaming(boolean useStreaming)
For HTTP endpoint:
if true
, text and binary messages will be wrapped as InputStream
before they are passed to an Exchange
; otherwise they will be passed as byte[].
For WebSocket endpoint:
if true
, text and binary messages will be wrapped as Reader
and
InputStream
respectively before they are passed to an Exchange
;
otherwise they will be passed as String and byte[] respectively.
public boolean isFireWebSocketChannelEvents()
public void setFireWebSocketChannelEvents(boolean fireWebSocketChannelEvents)
true
, the consumer will post notifications to the route when a new WebSocket peer connects,
disconnects, etc. See UndertowConstants.EVENT_TYPE
and UndertowConstants.EventType
.public void setPreserveHostHeader(boolean preserveHostHeader)
public boolean isPreserveHostHeader()
public Object getSecurityConfiguration()
public void setSecurityConfiguration(Object securityConfiguration)
public String getAllowedRoles()
public void setAllowedRoles(String allowedRoles)
protected void doInit() throws Exception
doInit
in class org.apache.camel.support.DefaultEndpoint
Exception
public boolean isWebSocket()
true
if getHttpURI()
's scheme is ws
or wss
public HttpHandlerRegistrationInfo getHttpHandlerRegistrationInfo()
public CamelWebSocketHandler getWebSocketHttpHandler()
public Boolean getAccessLog()
public void setAccessLog(Boolean accessLog)
public io.undertow.server.handlers.accesslog.AccessLogReceiver getAccessLogReceiver()
public void setAccessLogReceiver(io.undertow.server.handlers.accesslog.AccessLogReceiver accessLogReceiver)
public String getHandlers()
public void setHandlers(String handlers)
Apache Camel