public class HttpServerChannelHandler
extends org.apache.camel.component.netty4.handlers.ServerChannelHandler
ServerChannelHandler that handles the incoming HTTP requests and routes
the received message in Camel.| Constructor and Description |
|---|
HttpServerChannelHandler(NettyHttpConsumer consumer) |
| Modifier and Type | Method and Description |
|---|---|
protected Subject |
authenticate(SecurityAuthenticator authenticator,
org.apache.camel.LoggingLevel deniedLoggingLevel,
HttpPrincipal principal)
Authenticates the http basic auth subject.
|
protected void |
beforeProcess(org.apache.camel.Exchange exchange,
io.netty.channel.ChannelHandlerContext ctx,
Object message) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected static HttpPrincipal |
extractBasicAuthSubject(io.netty.handler.codec.http.HttpRequest request)
Extracts the username and password details from the HTTP basic header Authorization.
|
NettyHttpConsumer |
getConsumer() |
protected Object |
getResponseBody(org.apache.camel.Exchange exchange) |
protected boolean |
matchesRoles(String roles,
String userRoles) |
channelActive, channelInactive, createResponseFutureListeneracceptInboundMessage, channelReadchannelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic HttpServerChannelHandler(NettyHttpConsumer consumer)
public NettyHttpConsumer getConsumer()
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
channelRead0 in class org.apache.camel.component.netty4.handlers.ServerChannelHandlerExceptionprotected static HttpPrincipal extractBasicAuthSubject(io.netty.handler.codec.http.HttpRequest request)
HttpPrincipal with username and password details, or null if not possible to extractprotected Subject authenticate(SecurityAuthenticator authenticator, org.apache.camel.LoggingLevel deniedLoggingLevel, HttpPrincipal principal)
authenticator - the authenticatorprincipal - the principalprotected void beforeProcess(org.apache.camel.Exchange exchange,
io.netty.channel.ChannelHandlerContext ctx,
Object message)
beforeProcess in class org.apache.camel.component.netty4.handlers.ServerChannelHandlerpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class org.apache.camel.component.netty4.handlers.ServerChannelHandlerExceptionApache Camel