|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.netty.channel.SimpleChannelUpstreamHandler org.apache.camel.component.netty.http.handlers.HttpServerMultiplexChannelHandler
public class HttpServerMultiplexChannelHandler
A multiplex HttpServerPipelineFactory
which keeps a list of handlers, and delegates to the
target handler based on the http context path in the incoming request. This is used to allow to reuse
the same Netty consumer, allowing to have multiple routes on the same netty ServerBootstrap
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
---|
org.jboss.netty.channel.ChannelHandler.Sharable |
Constructor Summary | |
---|---|
HttpServerMultiplexChannelHandler()
|
Method Summary | |
---|---|
void |
addConsumer(NettyHttpConsumer consumer)
Adds the given consumer. |
int |
consumers()
Number of active consumers |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
|
org.jboss.netty.channel.ChannelHandler |
getChannelHandler()
Gets the ChannelHandler |
int |
getPort()
The port number this consumer channel factory is using. |
void |
init(int port)
Initializes this consumer channel factory with the given port. |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent messageEvent)
|
void |
removeConsumer(NettyHttpConsumer consumer)
Removes the given consumer |
Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
---|
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpServerMultiplexChannelHandler()
Method Detail |
---|
public void init(int port)
HttpServerConsumerChannelFactory
init
in interface HttpServerConsumerChannelFactory
public void addConsumer(NettyHttpConsumer consumer)
HttpServerConsumerChannelFactory
addConsumer
in interface HttpServerConsumerChannelFactory
public void removeConsumer(NettyHttpConsumer consumer)
HttpServerConsumerChannelFactory
removeConsumer
in interface HttpServerConsumerChannelFactory
public int consumers()
HttpServerConsumerChannelFactory
consumers
in interface HttpServerConsumerChannelFactory
public int getPort()
HttpServerConsumerChannelFactory
getPort
in interface HttpServerConsumerChannelFactory
public org.jboss.netty.channel.ChannelHandler getChannelHandler()
HttpServerConsumerChannelFactory
ChannelHandler
getChannelHandler
in interface HttpServerConsumerChannelFactory
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent) throws Exception
messageReceived
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e) throws Exception
exceptionCaught
in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |