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() |
org.jboss.netty.channel.group.ChannelGroup |
getAllChannels() |
org.jboss.netty.channel.ChannelFactory |
getChannelFactory() |
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(org.jboss.netty.channel.Channel channel)
To get the
NettyCamelState from the given channel. |
boolean |
isSingleton() |
protected boolean |
isTcp() |
protected org.jboss.netty.channel.Channel |
openChannel(org.jboss.netty.channel.ChannelFuture channelFuture) |
protected org.jboss.netty.channel.ChannelFuture |
openConnection() |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
void |
removeState(org.jboss.netty.channel.Channel channel)
To remove the
NettyCamelState stored on the channel,
when no longer needed |
void |
setChannelFactory(org.jboss.netty.channel.ChannelFactory channelFactory) |
void |
setConfiguration(NettyConfiguration configuration) |
protected void |
setupTCPCommunication() |
protected void |
setupUDPCommunication() |
createExchange, createExchange, createExchange, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, 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.impl.DefaultProducer
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
isSingleton
in class org.apache.camel.impl.DefaultProducer
public org.apache.camel.CamelContext getContext()
protected boolean isTcp()
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.DefaultProducer
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.DefaultProducer
Exception
public 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(org.jboss.netty.channel.Channel channel)
NettyCamelState
from the given channel.public void removeState(org.jboss.netty.channel.Channel channel)
NettyCamelState
stored on the channel,
when no longer neededprotected org.jboss.netty.channel.ChannelFuture openConnection() throws Exception
Exception
protected org.jboss.netty.channel.Channel openChannel(org.jboss.netty.channel.ChannelFuture channelFuture) throws Exception
Exception
public NettyConfiguration getConfiguration()
public void setConfiguration(NettyConfiguration configuration)
public org.jboss.netty.channel.ChannelFactory getChannelFactory()
public void setChannelFactory(org.jboss.netty.channel.ChannelFactory channelFactory)
public org.jboss.netty.channel.group.ChannelGroup getAllChannels()
Apache Camel