I would like to create a NettyEndpoint with a specified
NettyConfiguration, but cannot find an example on how to do this.

So I have the following:

public class MyDataRoute extends RouteBuilder {

@Override
public void configure() throws Exception {

// set up my decoders/encoders

NettyConfiguration nettyConfig = new NettyConfiguration();
nettyConfig.setProtocol("tcp");
nettyConfig.setDecoders(decoders);
nettyConfig.setEncoders(encoders);
nettyConfig.setHost(remoteHost);
nettyConfig.setPort(remotePort);
nettyConfig.setSendBufferSize(sendBufferSize);
nettyConfig.setReceiveBufferSize(recvBufferSize);
nettyConfig.setSync(false);

NettyComponent component = new NettyComponent( getContext() );
component.setConfiguration(nettyConfig);

// WHAT GOES IN THE FIRST PARAMETER ???
NettyEndpoint endpoint = new NettyEndpoint("", component, nettyConfig);


I see that the NettyEndpoint contructor takes a URI as an argument.  I
am trying to build the "netty:tcp...." stuff using the
NettyConfiguration instance so I am not sure why I need the URI
parameter.  Any help would be appreciated.

Thank you

Reply via email to