| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>org.apache.axis2.transport.udp (Apache Axis2)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="org.apache.axis2.transport.udp (Apache Axis2)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/axis2/transport/testkit/util/tcpmon/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../org/apache/axis2/transport/xmpp/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/axis2/transport/udp/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="header"> |
| <h1 title="Package" class="title">Package org.apache.axis2.transport.udp</h1> |
| <div class="docSummary"> |
| <div class="block">Transport implementation for the UDP protocol.</div> |
| </div> |
| <p>See: <a href="#package_description">Description</a></p> |
| </div> |
| <div class="contentContainer"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> |
| <caption><span>Class Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/axis2/transport/udp/Endpoint.html" title="class in org.apache.axis2.transport.udp">Endpoint</a></td> |
| <td class="colLast"> |
| <div class="block">UDP endpoint description.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/axis2/transport/udp/IODispatcher.html" title="class in org.apache.axis2.transport.udp">IODispatcher</a></td> |
| <td class="colLast"> |
| <div class="block">I/O dispatcher for incoming UDP packets.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/axis2/transport/udp/UDPConstants.html" title="class in org.apache.axis2.transport.udp">UDPConstants</a></td> |
| <td class="colLast"> |
| <div class="block">Utility class defining constants used by the UDP transport.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/axis2/transport/udp/UDPListener.html" title="class in org.apache.axis2.transport.udp">UDPListener</a></td> |
| <td class="colLast"> |
| <div class="block">Transport listener for the UDP protocol.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/axis2/transport/udp/UDPOutTransportInfo.html" title="class in org.apache.axis2.transport.udp">UDPOutTransportInfo</a></td> |
| <td class="colLast"> |
| <div class="block">Holder of information to send an outgoing message to a UDP destination.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/axis2/transport/udp/UDPSender.html" title="class in org.apache.axis2.transport.udp">UDPSender</a></td> |
| <td class="colLast"> |
| <div class="block">Transport sender for the UDP protocol.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| </ul> |
| <a name="package_description"> |
| <!-- --> |
| </a> |
| <h2 title="Package org.apache.axis2.transport.udp Description">Package org.apache.axis2.transport.udp Description</h2> |
| <div class="block">Transport implementation for the UDP protocol. |
| <p> |
| This package contains a transport implementation allowing Axis to |
| send and receive UDP packets. It is an implementation of "raw" UDP in the |
| sense that the message is directly extracted from the UDP payload without |
| any intermediate application protocol. This has several important implications: |
| <ul> |
| <li>The only way to route the incoming message to the appropriate Axis service |
| is to bind the service a specific UDP port. The port number must be |
| explicitly defined in the service configuration. This is different |
| from protocols such as HTTP where the message can be routed |
| based on the URL in the request.</li> |
| <li>The transport has no way to detect the content type of an incoming |
| message. Indeed, there is no equivalent to HTTP's |
| <tt>Content-Type</tt> header. Again the expected content type must be |
| configured explicitly for the service.</li> |
| <li>Since UDP doesn't provide any mean to correlate responses to requests, |
| the transport can only be used for asynchronous communication.</li> |
| </ul> |
| See the documentation of <code>org.apache.synapse.transport.udp.UDPListener</code> |
| for more information about how to configure a service to accept UDP packets. |
| Endpoint references for the UDP transport are assumed to follow the following |
| syntax: |
| <pre> |
| udp://<em>host</em>:<em>port</em>?contentType=...</pre> |
| <p> |
| The UDP transport can be enabled in the Axis configuration as follows: |
| <pre> |
| <transportReceiver name="udp" class="org.apache.synapse.transport.udp.UDPListener"/> |
| <transportSender name="udp" class="org.apache.synapse.transport.udp.UDPSender"/></pre> |
| It should be noted that given its characteristics, UDP is not a |
| suitable transport protocol for SOAP, except maybe in very particular |
| circumstances. Indeed, UDP is an unreliable protocol: |
| <ul> |
| <li>There is no delivery guarantee, i.e. packets may be lost.</li> |
| <li>Messages may arrive out of order.</li> |
| <li>Messages may be duplicated, i.e. delivered twice.</li> |
| </ul> |
| However the unit tests show an example of how to use this transport with SOAP |
| and WS-Addressing to achieve two-way asynchronous communication. |
| Note that the transport has not been designed to implement the |
| <a href="http://specs.xmlsoap.org/ws/2004/09/soap-over-udp/soap-over-udp.pdf">SOAP |
| over UDP specification</a> and will probably not be interoperable. |
| <p> |
| The main purpose of this transport implementation is to integrate Axis (and in |
| particular Synapse) with existing UDP based protocols. See |
| <code>org.apache.synapse.format.syslog</code> for an example of this kind |
| of protocol. |
| |
| <h4>Known issues and limitations</h4> |
| |
| <ul> |
| <li>Packets longer than the configured maximum packet size |
| are silently truncated. Packet truncation should be detected |
| and trigger an error.</li> |
| <li>The listener doesn't implement all management operations |
| specified by |
| <code>org.apache.synapse.transport.base.ManagementSupport</code>.</li> |
| <li>The listener assumes that services are bound to unique UDP ports |
| and predispatches incoming requests based on port numbers. |
| When SOAP with WS-Addressing is used, the packets could be |
| received on a single port and dispatched based on the <tt>To</tt> |
| header. This is not supported.</li> |
| <li>It might be useful to allow configuration of the content type at the |
| transport level rather than the service level. In this case, the |
| <tt>contentType</tt> parameter would not be included in the endpoint |
| reference. This is necessary for interoperability with the SOAP over UDP |
| standard.</li> |
| <li>Technically, it would be quite easy to support binding several UDP ports |
| to the same service. However, the way endpoints are configured |
| at the service level doesn't allow this for the moment. Indeed, |
| using simple text properties only allows to specify the configuration |
| of a single endpoint.</li> |
| <li>The transport sender uses a randomly chosen UDP source port. Some |
| UDP based services may check the source port and discard the packet. |
| Also, in two-way communication scenarios, stateful firewalls will |
| not be able to correlate the exchanged packets and may drop |
| some of them.</li> |
| </ul></div> |
| </div> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/axis2/transport/testkit/util/tcpmon/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../org/apache/axis2/transport/xmpp/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/axis2/transport/udp/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |