Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Available as of Camel 2.3 See also the Apache Mina component http://camel.apache.org/mina.html

The netty component in Camel is a socket communication component, based on the JBoss Netty community offering (available under an Apache 2.0 license). Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. Netty greatly simplifies and streamlines network programming such as TCP and UDP socket server.

...

Code Block
JndiRegistry registry = new JndiRegistry(createJndiContext());
registry.bind("password", "changeit");
registry.bind("keyStoreFile", new File("src/test/resources/keystore.jks"));
registry.bind("trustStoreFile", new File("src/test/resources/keystore.jks"));

context.createRegistry(registry);
context.addRoutes(new RouteBuilder() {
  public void configure() {
      from("netty:tcp://localhost:5150sync=true&ssl=true&passphrase=#password&keyStoreFile=#ksf&trustStoreFile=#tsf")
       .process(new Processor() {
          public void process(Exchange exchange) throws Exception {
            exchange.getOut().setBody("When You Go Home, Tell Them Of Us And Say, For Your Tomorrow, We Gave Our Today.");                           
          }
       }
  }
});

h3 See Also

The Camel Mina Component for socket based communication
http://camel.apache.org/mina.html