Class DefaultUndertowHost
- java.lang.Object
-
- org.apache.camel.component.undertow.DefaultUndertowHost
-
- All Implemented Interfaces:
UndertowHost
public class DefaultUndertowHost extends Object implements UndertowHost
The default UndertowHost which manages standalone Undertow server.
-
-
Constructor Summary
Constructors Constructor Description DefaultUndertowHost(UndertowHostKey key)
DefaultUndertowHost(UndertowHostKey key, UndertowHostOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.undertow.server.HttpHandler
registerHandler(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, io.undertow.server.HttpHandler handler)
Register a handler with the givenHttpHandlerRegistrationInfo
.String
toString()
void
unregisterHandler(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo)
Unregister a handler with the givenHttpHandlerRegistrationInfo
.void
validateEndpointURI(URI httpURI)
Validate whether this host can process the given URI
-
-
-
Constructor Detail
-
DefaultUndertowHost
public DefaultUndertowHost(UndertowHostKey key)
-
DefaultUndertowHost
public DefaultUndertowHost(UndertowHostKey key, UndertowHostOptions options)
-
-
Method Detail
-
validateEndpointURI
public void validateEndpointURI(URI httpURI)
Description copied from interface:UndertowHost
Validate whether this host can process the given URI- Specified by:
validateEndpointURI
in interfaceUndertowHost
-
registerHandler
public io.undertow.server.HttpHandler registerHandler(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo, io.undertow.server.HttpHandler handler)
Description copied from interface:UndertowHost
Register a handler with the givenHttpHandlerRegistrationInfo
. Note that for some kinds of handlers (most notablyCamelWebSocketHandler
), it is legal to call this method multiple times with equalHttpHandlerRegistrationInfo
andHttpHandler
. In such cases the returnedHttpHandler
may differ from the passedHttpHandler
and the returned instance is the effectively registered one for the givenHttpHandlerRegistrationInfo
.- Specified by:
registerHandler
in interfaceUndertowHost
registrationInfo
- theHttpHandlerRegistrationInfo
related tohandler
handler
- theHttpHandler
to register- Returns:
- the given
handler
or a differentHttpHandler
that has been registered with the givenHttpHandlerRegistrationInfo
earlier.
-
unregisterHandler
public void unregisterHandler(UndertowConsumer consumer, HttpHandlerRegistrationInfo registrationInfo)
Description copied from interface:UndertowHost
Unregister a handler with the givenHttpHandlerRegistrationInfo
. Note that if#registerHandler(HttpHandlerRegistrationInfo, HttpHandler)
was successfully invoked multiple times for an equivalentHttpHandlerRegistrationInfo
then#unregisterHandler(HttpHandlerRegistrationInfo)
must be called the same number of times to unregister the associated handler completely.- Specified by:
unregisterHandler
in interfaceUndertowHost
-
-