public class UndertowConsumer
extends org.apache.camel.support.DefaultConsumer
implements io.undertow.server.HttpHandler, org.apache.camel.Suspendable
| Constructor and Description |
|---|
UndertowConsumer(UndertowEndpoint endpoint,
org.apache.camel.Processor processor) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
computeAllowedRoles() |
protected void |
doResume() |
protected void |
doStart() |
protected void |
doStop() |
protected void |
doSuspend() |
UndertowEndpoint |
getEndpoint() |
void |
handleRequest(io.undertow.server.HttpServerExchange httpExchange) |
boolean |
isRest() |
boolean |
isSuspended() |
void |
sendEventNotification(String connectionKey,
io.undertow.websockets.spi.WebSocketHttpExchange transportExchange,
io.undertow.websockets.core.WebSocketChannel channel,
UndertowConstants.EventType eventType)
Send a notification related a WebSocket peer.
|
void |
sendMessage(String connectionKey,
io.undertow.websockets.core.WebSocketChannel channel,
Object message)
Create an
Exchange from the associated UndertowEndpoint and set the in Message's
body to the given message and UndertowConstants.CONNECTION_KEY header to the given
connectionKey. |
void |
setRest(boolean rest) |
createUoW, doInit, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, getRouteId, handleException, handleException, setExceptionHandler, setRoute, setRouteId, toStringbuild, doBuild, doFail, doLifecycleChange, doShutdown, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic UndertowConsumer(UndertowEndpoint endpoint, org.apache.camel.Processor processor)
public boolean isRest()
public void setRest(boolean rest)
public UndertowEndpoint getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.support.DefaultConsumerprotected void doStart()
throws Exception
doStart in class org.apache.camel.support.DefaultConsumerExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.DefaultConsumerExceptionprotected void doSuspend()
throws Exception
doSuspend in class org.apache.camel.support.service.BaseServiceExceptionprotected void doResume()
throws Exception
doResume in class org.apache.camel.support.service.BaseServiceExceptionpublic boolean isSuspended()
isSuspended in interface org.apache.camel.SuspendableServiceisSuspended in class org.apache.camel.support.service.BaseServicepublic void handleRequest(io.undertow.server.HttpServerExchange httpExchange)
throws Exception
handleRequest in interface io.undertow.server.HttpHandlerExceptionpublic void sendMessage(String connectionKey, io.undertow.websockets.core.WebSocketChannel channel, Object message)
Exchange from the associated UndertowEndpoint and set the in Message's
body to the given message and UndertowConstants.CONNECTION_KEY header to the given
connectionKey.connectionKey - an identifier of WebSocketChannel through which the message was receivedchannel - the WebSocketChannel through which the message was receivedmessage - the message received via the WebSocketChannelpublic void sendEventNotification(String connectionKey, io.undertow.websockets.spi.WebSocketHttpExchange transportExchange, io.undertow.websockets.core.WebSocketChannel channel, UndertowConstants.EventType eventType)
connectionKey - of WebSocket peertransportExchange - the exchange for the websocket transport, only available for ON_OPEN eventschannel - the WebSocketChannel through which the message was receivedeventType - the type of the eventApache Camel