| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0_13) on Mon Dec 07 14:17:39 IST 2009 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| org.apache.axis2.transport.udp (Apache Axis2 - Transport - Root 1.0.0 API) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2009-12-07"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="org.apache.axis2.transport.udp (Apache Axis2 - Transport - Root 1.0.0 API)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/util/tcpmon/package-summary.html"><B>PREV PACKAGE</B></A> |
| <A HREF="../../../../../org/apache/axis2/transport/xmpp/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/axis2/transport/udp/package-summary.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <H2> |
| Package org.apache.axis2.transport.udp |
| </H2> |
| Transport implementation for the UDP protocol. |
| <P> |
| <B>See:</B> |
| <BR> |
| <A HREF="#package_description"><B>Description</B></A> |
| <P> |
| |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Class Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/udp/Endpoint.html" title="class in org.apache.axis2.transport.udp">Endpoint</A></B></TD> |
| <TD>UDP endpoint description.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/udp/IODispatcher.html" title="class in org.apache.axis2.transport.udp">IODispatcher</A></B></TD> |
| <TD>I/O dispatcher for incoming UDP packets.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/udp/UDPConstants.html" title="class in org.apache.axis2.transport.udp">UDPConstants</A></B></TD> |
| <TD>Utility class defining constants used by the UDP transport.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/udp/UDPListener.html" title="class in org.apache.axis2.transport.udp">UDPListener</A></B></TD> |
| <TD>Transport listener for the UDP protocol.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/udp/UDPOutTransportInfo.html" title="class in org.apache.axis2.transport.udp">UDPOutTransportInfo</A></B></TD> |
| <TD>Holder of information to send an outgoing message to a UDP destination.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="15%"><B><A HREF="../../../../../org/apache/axis2/transport/udp/UDPSender.html" title="class in org.apache.axis2.transport.udp">UDPSender</A></B></TD> |
| <TD>Transport sender for the UDP protocol.</TD> |
| </TR> |
| </TABLE> |
| |
| |
| <P> |
| <A NAME="package_description"><!-- --></A><H2> |
| Package org.apache.axis2.transport.udp Description |
| </H2> |
| |
| <P> |
| 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> |
| <P> |
| |
| <P> |
| <DL> |
| </DL> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../org/apache/axis2/transport/testkit/util/tcpmon/package-summary.html"><B>PREV PACKAGE</B></A> |
| <A HREF="../../../../../org/apache/axis2/transport/xmpp/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/axis2/transport/udp/package-summary.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2004-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |