public class UndertowConsumer
extends org.apache.camel.impl.DefaultConsumer
implements io.undertow.server.HttpHandler
| Constructor and Description |
|---|
UndertowConsumer(UndertowEndpoint endpoint,
org.apache.camel.Processor processor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
UndertowEndpoint |
getEndpoint() |
void |
handleRequest(io.undertow.server.HttpServerExchange httpExchange) |
void |
sendEventNotification(String connectionKey,
UndertowConstants.EventType eventType)
Send a notification related a WebSocket peer.
|
void |
sendMessage(String connectionKey,
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. |
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic UndertowConsumer(UndertowEndpoint endpoint, org.apache.camel.Processor processor)
public UndertowEndpoint getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.impl.DefaultConsumerprotected void doStart()
throws Exception
doStart in class org.apache.camel.impl.DefaultConsumerExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.impl.DefaultConsumerExceptionpublic void handleRequest(io.undertow.server.HttpServerExchange httpExchange)
throws Exception
handleRequest in interface io.undertow.server.HttpHandlerExceptionpublic void sendMessage(String connectionKey, 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 receivedmessage - the message received via the WebSocketChannelpublic void sendEventNotification(String connectionKey, UndertowConstants.EventType eventType)
connectionKey - of WebSocket peereventType - the type of the eventApache Camel