public class HttpServerChannelHandler
extends org.apache.camel.component.netty.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,
org.jboss.netty.channel.MessageEvent messageEvent) |
protected org.jboss.netty.channel.ChannelFutureListener |
createResponseFutureListener(org.apache.camel.component.netty.NettyConsumer consumer,
org.apache.camel.Exchange exchange,
SocketAddress remoteAddress) |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent exceptionEvent) |
protected static HttpPrincipal |
extractBasicAuthSubject(org.jboss.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) |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent) |
channelClosed, channelOpen
public HttpServerChannelHandler(NettyHttpConsumer consumer)
public NettyHttpConsumer getConsumer()
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent) throws Exception
messageReceived
in class org.apache.camel.component.netty.handlers.ServerChannelHandler
Exception
protected static HttpPrincipal extractBasicAuthSubject(org.jboss.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, org.jboss.netty.channel.MessageEvent messageEvent)
beforeProcess
in class org.apache.camel.component.netty.handlers.ServerChannelHandler
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent exceptionEvent) throws Exception
exceptionCaught
in class org.apache.camel.component.netty.handlers.ServerChannelHandler
Exception
protected org.jboss.netty.channel.ChannelFutureListener createResponseFutureListener(org.apache.camel.component.netty.NettyConsumer consumer, org.apache.camel.Exchange exchange, SocketAddress remoteAddress)
createResponseFutureListener
in class org.apache.camel.component.netty.handlers.ServerChannelHandler
Apache Camel