Interface HttpServerConsumerChannelFactory
-
- All Known Implementing Classes:
HttpServerMultiplexChannelHandler
public interface HttpServerConsumerChannelFactory
Factory for setting up NettyChannelHandler
bound to a given Netty port. This factory allows for consumers to reuse existingServerBootstrap
which allows to share the same port for multiple consumers. This factory is needed to ensure we can handle the situations when consumers is added and removing in a dynamic environment such as OSGi, where Camel applications can be hot-deployed. And we want these Camel applications to be able to share the same Netty port in a easy way.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addConsumer(NettyHttpConsumer consumer)
Adds the given consumer.int
consumers()
Number of active consumersio.netty.channel.ChannelHandler
getChannelHandler()
Gets theChannelHandler
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
removeConsumer(NettyHttpConsumer consumer)
Removes the given consumer
-
-
-
Method Detail
-
init
void init(int port)
Initializes this consumer channel factory with the given port.
-
getPort
int getPort()
The port number this consumer channel factory is using.
-
addConsumer
void addConsumer(NettyHttpConsumer consumer)
Adds the given consumer.
-
removeConsumer
void removeConsumer(NettyHttpConsumer consumer)
Removes the given consumer
-
consumers
int consumers()
Number of active consumers
-
getChannelHandler
io.netty.channel.ChannelHandler getChannelHandler()
Gets theChannelHandler
-
-