1 Reply Latest reply on Jun 4, 2012 9:11 PM by Keith Babo

    Tooling for TCP/UDP Gateway

    Keith Babo Master

      Both TCP and UDP are based on Netty, but I think we should have distinct TCP and UDP binding options in the tooling.  Both will work for service and reference bindings.  Here's the nitty gritty:

       

       

      TCP Binding (applies to services and references)

       

      <element name="host" type="string" />
      <element name="port" type="int" />
      <element name="sync" type="boolean" minOccurs="0" maxOccurs="1" />
      <element name="keepAlive" type="boolean" minOccurs="0" maxOccurs="1" />
      <element name="receiveBufferSize" type="long" minOccurs="0" maxOccurs="1"/>
      <element name="sendBufferSize" type="long" minOccurs="0" maxOccurs="1"/>
      



      UDP Binding (applies to services and references)


      <element name="host" type="string" />
      <element name="port" type="int" />
      <element name="sync" type="boolean" minOccurs="0" maxOccurs="1" />
       <element name="broadcast" type="boolean" minOccurs="0" maxOccurs="1" />
      <element name="receiveBufferSize" type="long" minOccurs="0" maxOccurs="1"/>
      <element name="sendBufferSize" type="long" minOccurs="0" maxOccurs="1"/>
      


       

      NOTE : I have skirted the issue of codecs for the moment.  No textline setting, disabling, or adding encoders and decoders from the registry.  Lukasz can chime in on whether that's necessary for basic operation or can be deferred until we swing back through and do 'advanced' options for many of the gateway bindings.

       

      Here's an example service binding for UDP and TCP:

      https://github.com/jboss-switchyard/quickstarts/blob/master/camel-netty-binding/src/main/resources/META-INF/switchyard.xml

       

       

      TCP binding schema

      https://github.com/jboss-switchyard/components/blob/master/camel/camel-core/src/main/resources/org/switchyard/component/camel/config/model/v1/camel-v1.xsd#L191

       

      UDP binding schema

      https://github.com/jboss-switchyard/components/blob/master/camel/camel-core/src/main/resources/org/switchyard/component/camel/config/model/v1/camel-v1.xsd#L203