public class NettyProducer
extends org.apache.camel.impl.DefaultAsyncProducer
| Constructor and Description |
|---|
NettyProducer(NettyEndpoint nettyEndpoint,
NettyConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
io.netty.channel.group.ChannelGroup |
getAllChannels() |
NettyConfiguration |
getConfiguration() |
org.apache.camel.CamelContext |
getContext() |
NettyEndpoint |
getEndpoint() |
protected Object |
getRequestBody(org.apache.camel.Exchange exchange)
Gets the object we want to use as the request object for sending to netty.
|
NettyCamelState |
getState(io.netty.channel.Channel channel)
To get the
NettyCamelState from the given channel. |
protected io.netty.channel.EventLoopGroup |
getWorkerGroup() |
boolean |
isSingleton() |
protected boolean |
isTcp() |
protected io.netty.channel.Channel |
openChannel(io.netty.channel.ChannelFuture channelFuture) |
protected io.netty.channel.ChannelFuture |
openConnection() |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
void |
putState(io.netty.channel.Channel channel,
NettyCamelState state)
Put the
NettyCamelState into the map use the given channel as the key |
void |
removeState(io.netty.channel.Channel channel)
To remove the
NettyCamelState stored on the channel,
when no longer needed |
void |
setConfiguration(NettyConfiguration configuration) |
createExchange, createExchange, createExchange, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic NettyProducer(NettyEndpoint nettyEndpoint, NettyConfiguration configuration)
public NettyEndpoint getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.impl.DefaultProducerpublic boolean isSingleton()
isSingleton in interface org.apache.camel.IsSingletonisSingleton in class org.apache.camel.impl.DefaultProducerpublic org.apache.camel.CamelContext getContext()
protected boolean isTcp()
protected void doStart()
throws Exception
doStart in class org.apache.camel.impl.DefaultProducerExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.impl.DefaultProducerExceptionpublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
protected Object getRequestBody(org.apache.camel.Exchange exchange) throws Exception
exchange - the exchangeException - is thrown if error getting the request bodypublic NettyCamelState getState(io.netty.channel.Channel channel)
NettyCamelState from the given channel.public void removeState(io.netty.channel.Channel channel)
NettyCamelState stored on the channel,
when no longer neededpublic void putState(io.netty.channel.Channel channel,
NettyCamelState state)
NettyCamelState into the map use the given channel as the keyprotected io.netty.channel.EventLoopGroup getWorkerGroup()
protected io.netty.channel.ChannelFuture openConnection()
throws Exception
Exceptionprotected io.netty.channel.Channel openChannel(io.netty.channel.ChannelFuture channelFuture)
throws Exception
Exceptionpublic NettyConfiguration getConfiguration()
public void setConfiguration(NettyConfiguration configuration)
public io.netty.channel.group.ChannelGroup getAllChannels()
Apache Camel