public class NettyProducer
extends org.apache.camel.support.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() |
NettyCamelStateCorrelationManager |
getCorrelationManager() |
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.
|
protected io.netty.channel.EventLoopGroup |
getWorkerGroup() |
protected boolean |
isTcp() |
protected void |
notifyChannelOpen(io.netty.channel.ChannelFuture channelFuture) |
protected io.netty.channel.ChannelFuture |
openConnection() |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
void |
processWithConnectedChannel(org.apache.camel.Exchange exchange,
org.apache.camel.component.netty.NettyProducer.BodyReleaseCallback callback,
io.netty.channel.ChannelFuture channelFuture,
Object body) |
protected void |
releaseChannel(io.netty.channel.ChannelFuture channelFuture) |
void |
setConfiguration(NettyConfiguration configuration) |
createExchange, isSingleton, toString
build, doBuild, doInit, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public NettyProducer(NettyEndpoint nettyEndpoint, NettyConfiguration configuration)
public NettyEndpoint getEndpoint()
getEndpoint
in interface org.apache.camel.EndpointAware
getEndpoint
in class org.apache.camel.support.DefaultProducer
public org.apache.camel.CamelContext getContext()
public NettyCamelStateCorrelationManager getCorrelationManager()
protected boolean isTcp()
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.DefaultProducer
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.DefaultProducer
Exception
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
public void processWithConnectedChannel(org.apache.camel.Exchange exchange, org.apache.camel.component.netty.NettyProducer.BodyReleaseCallback callback, io.netty.channel.ChannelFuture channelFuture, Object body)
protected Object getRequestBody(org.apache.camel.Exchange exchange) throws Exception
exchange
- the exchangeException
- is thrown if error getting the request bodyprotected io.netty.channel.EventLoopGroup getWorkerGroup()
protected io.netty.channel.ChannelFuture openConnection() throws Exception
Exception
protected void notifyChannelOpen(io.netty.channel.ChannelFuture channelFuture) throws Exception
Exception
protected void releaseChannel(io.netty.channel.ChannelFuture channelFuture)
public NettyConfiguration getConfiguration()
public void setConfiguration(NettyConfiguration configuration)
public io.netty.channel.group.ChannelGroup getAllChannels()
Apache Camel