@UriEndpoint(firstVersion="2.16.0", scheme="undertow", title="Undertow", syntax="undertow:httpURI", consumerClass=UndertowConsumer.class, label="http,websocket", lenientProperties=true) public class UndertowEndpoint extends org.apache.camel.impl.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 |
doStart() |
UndertowComponent |
getComponent() |
org.apache.camel.http.common.cookie.CookieHandler |
getCookieHandler() |
org.apache.camel.spi.HeaderFilterStrategy |
getHeaderFilterStrategy() |
HttpHandlerRegistrationInfo |
getHttpHandlerRegistrationInfo() |
String |
getHttpMethodRestrict() |
URI |
getHttpURI() |
Boolean |
getKeepAlive() |
Boolean |
getMatchOnUriPrefix() |
Map<String,Object> |
getOptions() |
Boolean |
getReuseAddresses() |
Integer |
getSendTimeout() |
Boolean |
getSendToAll() |
Map<String,String> |
getServiceProperties() |
SSLContext |
getSslContext() |
org.apache.camel.util.jsse.SSLContextParameters |
getSslContextParameters() |
Boolean |
getTcpNoDelay() |
Boolean |
getThrowExceptionOnFailure() |
Boolean |
getTransferException() |
UndertowHttpBinding |
getUndertowHttpBinding() |
CamelWebSocketHandler |
getWebSocketHttpHandler() |
boolean |
isFireWebSocketChannelEvents() |
boolean |
isLenientProperties() |
boolean |
isOptionsEnabled() |
boolean |
isSingleton() |
boolean |
isUseStreaming() |
boolean |
isWebSocket() |
void |
setCookieHandler(org.apache.camel.http.common.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 |
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 |
setOptions(Map<String,Object> options)
Sets additional channel options.
|
void |
setOptionsEnabled(boolean optionsEnabled)
Specifies whether to enable HTTP OPTIONS for this Servlet consumer.
|
void |
setReuseAddresses(Boolean reuseAddresses)
Setting to facilitate socket multiplexing
|
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.util.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)
if
true , text and binary messages coming through a WebSocket will be wrapped as java.io.Reader and
java.io.InputStream respectively before they are passed to an Exchange ; otherwise they will be passed as
String and byte[] respectively. |
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, doStop, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public UndertowEndpoint(String uri, UndertowComponent component)
public UndertowComponent getComponent()
getComponent
in class org.apache.camel.impl.DefaultEndpoint
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.impl.DefaultEndpoint
Exception
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
public boolean isLenientProperties()
isLenientProperties
in interface org.apache.camel.Endpoint
isLenientProperties
in class org.apache.camel.impl.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 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.util.jsse.SSLContextParameters getSslContextParameters()
public void setSslContextParameters(org.apache.camel.util.jsse.SSLContextParameters sslContextParameters)
public Boolean getThrowExceptionOnFailure()
public void setThrowExceptionOnFailure(Boolean throwExceptionOnFailure)
public Boolean getTransferException()
public void setTransferException(Boolean transferException)
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.common.cookie.CookieHandler getCookieHandler()
public void setCookieHandler(org.apache.camel.http.common.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)
true
, text and binary messages coming through a WebSocket will be wrapped as java.io.Reader and
java.io.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
.protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultEndpoint
Exception
public boolean isWebSocket()
true
if getHttpURI()
's scheme is ws
or wss
public HttpHandlerRegistrationInfo getHttpHandlerRegistrationInfo()
public CamelWebSocketHandler getWebSocketHttpHandler()
Apache Camel