activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r491078 - in /incubator/activemq/site: openwire-version-2-specification.html openwire.html
Date Fri, 29 Dec 2006 19:17:34 GMT
Author: chirino
Date: Fri Dec 29 11:17:33 2006
New Revision: 491078

URL: http://svn.apache.org/viewvc?view=rev&rev=491078
Log:
Latest export from confluence

Added:
    incubator/activemq/site/openwire-version-2-specification.html
Modified:
    incubator/activemq/site/openwire.html

Added: incubator/activemq/site/openwire-version-2-specification.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/openwire-version-2-specification.html?view=auto&rev=491078
==============================================================================
--- incubator/activemq/site/openwire-version-2-specification.html (added)
+++ incubator/activemq/site/openwire-version-2-specification.html Fri Dec 29 11:17:33 2006
@@ -0,0 +1,928 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+<!--
+    Pier's plugin always overwrites the stylesheet so lets explicitly use another one
+    <link type="text/css" rel="stylesheet" href="autoexport:///ACTIVEMQ/resources/space.css">
+-->
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <TITLE>
+OpenWire Version 2 Specification
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" class="topbardiv" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/activemq/images/logo.gif">
+          </TD>
+          <TD align="right" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+          </TD>
+        </TR> 
+      </TABLE>
+
+    </DIV>
+
+    <!-- Bread crumbs and Quick Links -->
+    <DIV id="site-navbar">
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" valign="middle" nowrap="">
+            <DIV id="site-breadcrumbs">
+<A href="home.html" title="ActiveMQ">ActiveMQ</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="connectivity.html" title="Connectivity">Connectivity</A>&nbsp;&gt;&nbsp;<A href="protocols.html" title="Protocols">Protocols</A>&nbsp;&gt;&nbsp;<A href="openwire.html" title="OpenWire">OpenWire</A>&nbsp;&gt;&nbsp;<A href="" title="OpenWire Version 2 Specification">OpenWire Version 2 Specification</A>
+            </DIV>
+          </TD>
+          <TD align="right" valign="middle" nowrap="">
+            <DIV id="site-quicklinks">
+<P><A href="download.html" title="Download">Download</A> &#124; <SPAN class="nobr"><A href="http://incubator.apache.org/activemq/maven/activemq-core/apidocs/" title="Visit page outside Confluence" rel="nofollow">JavaDocs<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> <A href="javadocs.html" title="JavaDocs">More...</A> &#124; <A href="source.html" title="Source">Source</A> &#124; <A href="site.html" title="Site">Wiki</A> &#124;<SPAN class="nobr"><A href="irc://irc.codehaus.org/activemq" title="Visit page outside Confluence" rel="nofollow">IRC<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> &#124; <SPAN class="nobr"><A href="http://servlet.uwyn.com/drone/log/hausbot/activemq" title="Visit page outside Confluence" rel="nofollow">IRC Log<SUP><IMG cl
 ass="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> &#124; <A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A> &#124; <A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A> &#124; <A href="support.html" title="Support">Support</A></P>
+            </DIV>
+          </TD>
+        </TR> 
+      </TABLE>
+    </DIV>
+
+<!-- Integrate google search later.
+          <form name="search" action="http://www.google.com/search" method="get">
+            <input type="hidden" name="ie" value="UTF- 8" />
+            <input type="hidden" name="oe" value="UTF- 8" />
+            <input type="hidden" name="domains" value="" />
+            <input type="hidden" name="sitesearch" value="" />
+            <input type="text" name="q" maxlength="255" value="" />        
+            <input type="submit" name="btnG" value="Google Search" />
+          </form>
+-->
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-navigation">
+<H3><A name="Navigation-Overview"></A><A href="overview.html" title="Overview">Overview</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="home.html" title="Home">Home</A></LI>
+	<LI><A href="news.html" title="News">News</A></LI>
+	<LI><A href="new-features.html" title="New Features">New Features</A></LI>
+	<LI><A href="getting-started.html" title="Getting Started">Getting Started</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="site.html" title="Site">Site</A></LI>
+	<LI><A href="articles.html" title="Articles">Articles</A></LI>
+	<LI><A href="download.html" title="Download">Download</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+
+<DIV style="padding: 10px 10px 0px 25px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="15" type="text" value=""></INPUT><BR></BR>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/activemq"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/activemq"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-Community"></A><A href="community.html" title="Community">Community</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="support.html" title="Support">Support</A></LI>
+	<LI><A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A></LI>
+	<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+	<LI><SPAN class="nobr"><A href="http://gmane.org/find.php?list=activemq" title="Visit page outside Confluence" rel="nofollow">News Reader<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="navigation.html" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="projects-using-activemq.html" title="Projects Using ActiveMQ">Projects Using ActiveMQ</A></LI>
+	<LI><A href="users.html" title="Users">Users</A></LI>
+	<LI><A href="contributing.html" title="Contributing">Contributing</A></LI>
+	<LI><A href="team.html" title="Team">Team</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Features"></A><A href="features.html" title="Features">Features</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="advisory-message.html" title="Advisory Message">Advisory Message</A></LI>
+	<LI><A href="clustering.html" title="Clustering">Clustering</A></LI>
+	<LI><A href="cross-language-clients.html" title="Cross Language Clients">Cross Language Clients</A></LI>
+	<LI><A href="jmx.html" title="JMX">JMX</A></LI>
+	<LI><A href="jms-to-jms-bridge.html" title="JMS to JMS Bridge">JMS to JMS Bridge</A></LI>
+	<LI><A href="masterslave.html" title="MasterSlave">MasterSlave</A></LI>
+	<LI><A href="message-groups.html" title="Message Groups">Message Groups</A></LI>
+	<LI><A href="networks-of-brokers.html" title="Networks of Brokers">Networks of Brokers</A></LI>
+	<LI><A href="performance.html" title="Performance">Performance</A></LI>
+	<LI><A href="persistence.html" title="Persistence">Persistence</A></LI>
+	<LI><A href="security.html" title="Security">Security</A></LI>
+	<LI><A href="virtual-destinations.html" title="Virtual Destinations">Virtual Destinations</A></LI>
+	<LI><A href="visualisation.html" title="Visualisation">Visualisation</A></LI>
+	<LI><A href="features.html" title="Features">More ...</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Connectivity"></A><A href="connectivity.html" title="Connectivity">Connectivity</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="ajax.html" title="Ajax">Ajax</A></LI>
+	<LI><A href="amqp.html" title="AMQP">AMQP</A></LI>
+	<LI><A href="axis-support.html" title="Axis Support">Axis Support</A></LI>
+	<LI><A href="c-integration.html" title="C Integration">C Integration</A></LI>
+	<LI><A href="activemq-c-clients.html" title="ActiveMQ C++ Clients">C+&#43; Integration</A></LI>
+	<LI><A href="nms.html" title="NMS">C# and .Net Integration</A></LI>
+	<LI><A href="cms.html" title="CMS">CMS</A></LI>
+	<LI><A href="j2ee.html" title="J2EE">J2EE</A></LI>
+	<LI><A href="jboss-integration.html" title="JBoss Integration">JBoss Integration</A></LI>
+	<LI><SPAN class="nobr"><A href="http://docs.codehaus.org/display/JETTY/Integrating%20with%20ActiveMQ" title="Visit page outside Confluence" rel="nofollow">Jetty<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="jndi-support.html" title="JNDI Support">JNDI Support</A></LI>
+	<LI><A href="nms.html" title="NMS is the .Net Messaging API">NMS</A></LI>
+	<LI><A href="rest.html" title="REST">REST</A></LI>
+	<LI><A href="rss-and-atom.html" title="RSS and Atom">RSS and Atom</A></LI>
+	<LI><A href="spring-support.html" title="Spring Support">Spring Support</A></LI>
+	<LI><A href="stomp.html" title="Stomp">Stomp</A></LI>
+	<LI><A href="tomcat.html" title="Tomcat">Tomcat</A></LI>
+	<LI><A href="unix-service.html" title="Unix Service">Unix Service</A></LI>
+	<LI><A href="weblogic-integration.html" title="WebLogic Integration">WebLogic Integration</A></LI>
+	<LI><A href="xmpp.html" title="XMPP">XMPP</A></LI>
+	<LI><A href="connectivity.html" title="Connectivity">More ...</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-UsingActiveMQ"></A><A href="using-activemq.html" title="Using ActiveMQ">Using ActiveMQ</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="getting-started.html" title="Getting Started">Getting Started</A></LI>
+	<LI><A href="initial-configuration.html" title="Initial Configuration">Initial Configuration</A></LI>
+	<LI><A href="run-broker.html" title="Run Broker">Running a Broker</A></LI>
+	<LI><A href="how-do-i-embed-a-broker-inside-a-connection.html" title="How do I embed a Broker inside a Connection">Embedded Brokers</A></LI>
+	<LI><A href="activemq-command-line-tools-reference.html" title="ActiveMQ Command Line Tools Reference">Command Line Tools</A></LI>
+	<LI><A href="configuring-transports.html" title="Configuring Transports">Configuring Transports</A></LI>
+	<LI><A href="examples.html" title="Examples">Examples</A></LI>
+	<LI><A href="web-samples.html" title="Web Samples">Web Samples</A></LI>
+	<LI><A href="how-can-i-monitor-activemq.html" title="How can I monitor ActiveMQ">Monitoring the Broker</A></LI>
+	<LI><A href="xml-configuration.html" title="Xml Configuration">Xml Configuration</A></LI>
+	<LI><A href="xml-reference.html" title="Xml Reference">Xml Reference</A></LI>
+	<LI><A href="using-activemq.html" title="Using ActiveMQ">More ...</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Tools"></A><A href="tools.html" title="Tools">Tools</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="web-console.html" title="Web Console">Web Console</A></LI>
+	<LI><A href="hermes-jms.html" title="Hermes Jms">Hermes Jms</A></LI>
+	<LI><A href="activemq-performance-module-users-manual.html" title="ActiveMQ Performance Module Users Manual">Maven2 Performance Plugin</A></LI>
+	<LI><SPAN class="nobr"><A href="http://jakarta.apache.org/jmeter" title="Visit page outside Confluence" rel="nofollow">JMeter<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<H3><A name="Navigation-Support"></A><A href="support.html" title="Support">Support</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><SPAN class="nobr"><A href="http://issues.apache.org/activemq/browse/AMQ" title="Visit page outside Confluence" rel="nofollow">Issues<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://issues.apache.org/activemq/browse/AMQ?report=com.atlassian.jira.plugin.system.project:roadmap-panel" title="Visit page outside Confluence" rel="nofollow">Roadmap<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://issues.apache.org/activemq/browse/AMQ?report=com.atlassian.jira.plugin.system.project:changelog-panel" title="Visit page outside Confluence" rel="nofollow">Change log<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<H3><A name="Navigation-RelatedProjects"></A>Related Projects</H3>
+
+<UL class="alternate" type="square">
+	<LI><SPAN class="nobr"><A href="http://incubator.apache.org/servicemix/" title="Distributed Enterprise Service Bus based on JBI" rel="nofollow">Apache ServiceMix<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://lingo.codehaus.org/" title="POJO Remoting using JMS" rel="nofollow">Lingo<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://jencks.org/" title="Message Driven POJOs and pooling for JMS and JDBC" rel="nofollow">Jencks<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://stomp.codehaus.org/" title="Simple cross language protocol for messaging" rel="nofollow">Stomp<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://activecluster.codehaus.org/" title="Visit page outside Confluence" rel="nofollow">ActiveCluster<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://activespace.codehaus.org/" title="Visit page outside Confluence" rel="nofollow">ActiveSpace<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://www.springframework.org/" title="Visit page outside Confluence" rel="nofollow">Spring<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><SPAN class="nobr"><A href="http://geronimo.apache.org/" title="Visit page outside Confluence" rel="nofollow">Geronimo<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+</UL>
+
+
+<H3><A name="Navigation-Developers"></A><A href="developers.html" title="Developers">Developers</A></H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="source.html" title="Source">Source</A></LI>
+	<LI><A href="building.html" title="Building">Building</A></LI>
+	<LI><A href="developer-guide.html" title="Developer Guide">Developer Guide</A></LI>
+	<LI><A href="becoming-a-committer.html" title="Becoming a committer">Becoming a committer</A></LI>
+	<LI><A href="code-overview.html" title="Code Overview">Code Overview</A></LI>
+	<LI><A href="wire-protocol.html" title="Wire Protocol">Wire Protocol</A></LI>
+	<LI><A href="release-guide.html" title="Release Guide">Release Guide</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Tests"></A>Tests</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="integration-tests.html" title="Integration Tests">Integration Tests</A></LI>
+	<LI><A href="benchmark-tests.html" title="Benchmark Tests">Benchmark Tests</A></LI>
+	<LI><A href="jmeter-performance-tests.html" title="JMeter Performance Tests">JMeter Performance Tests</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-ProjectReports"></A>Project Reports</H3>
+<UL class="alternate" type="square">
+	<LI><A href="junit-reports.html" title="JUnit Reports">JUnit Reports</A></LI>
+	<LI><SPAN class="nobr"><A href="http://activemq.codehaus.org/maven/clover/" title="Visit page outside Confluence" rel="nofollow">Clover Report<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="source-xref.html" title="Source XRef">Source XRef</A></LI>
+	<LI><A href="test-source-xref.html" title="Test Source XRef">Test Source XRef</A></LI>
+	<LI><SPAN class="nobr"><A href="http://ci.gbuild.org/continuum/" title="Visit page outside Confluence" rel="nofollow">GBuild<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="xml-reference.html" title="Xml Reference">Xml Reference</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Toolsweuse"></A>Tools we use</H3>
+
+<P><SPAN class="nobr"><A href="http://www.yourkit.com/" title="Visit page outside Confluence" rel="nofollow"><IMG src="http://incubator.apache.org/activemq/images/yourkit.jpg" align="absmiddle" border="0"><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+[]</P>
+          </DIV>
+        </TD>
+        <TD valign="top">
+          <DIV id="site-page">
+
+<!--          
+            <div class="pagetitle">OpenWire Version 2 Specification</div>
+-->
+            <DIV class="wiki-content"><H2><A name="OpenWireVersion2Specification-Overview"></A>Overview</H2>
+
+<P>OpenWire is used to marshal objects to byte arrays and back.  We will refer to the marshaled objects as commands.  </P>
+
+<P>A TCP network connection would see multiple commands back to back on the stream.  Commands are not delimited in anyway and are variable sized.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">+---------+  +---------+      +---------+
+| command |  | command | .... | command |
++---------+  +---------+      +---------+</PRE>
+</DIV></DIV>
+
+<P>All data primitive types used in the encoded commands are encoded in big-endian/network byte order. </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">primitive types and encoding:
+             |               |               |               |               |               |               
++----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ 
+| <SPAN class="code-object">byte</SPAN>     | | | <SPAN class="code-object">char</SPAN>      | | | <SPAN class="code-object">short</SPAN>     | | | <SPAN class="code-object">int</SPAN>       | | | <SPAN class="code-object">long</SPAN>      | | | <SPAN class="code-object">float</SPAN>     | | | <SPAN class="code-object">double</SPAN>    | 
++----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ 
+| 1 octect | | | 2 octects | | | 2 octects | | | 4 octects | | | 8 octects | | | 4 octects | | | 8 octects | 
++----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ 
+             |               |               |               |               |               |</PRE>
+</DIV></DIV>
+
+
+<H2><A name="OpenWireVersion2Specification-WireFormatNegotiation"></A>Wire Format Negotiation</H2>
+
+<P>OpenWire is an extensible in that it supports adding new encoding options while still being backward compatible with previous versions of the protocol.  Every OpenWire protocol session initially starts with all encoding options turned off and at version 1 of command marshalers.  An initial WIREFORMAT_INFO command is exchanged between the two nodes so that additional encoding features can be enabled.  If both sides request an encoding feature to be enabled then it will be enabled.  The command marshalers used will be the highest version that they both support.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">+-------------------------+ +---------+  +---------+      +---------+
+| WIREFORMAT_INFO command | | command |  | command | .... | command |
++-------------------------+ +---------+  +---------+      +---------+</PRE>
+</DIV></DIV>
+
+<H2><A name="OpenWireVersion2Specification-CommandEncoding"></A>Command Encoding</H2>
+
+<P>Every command is encoded as follows:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">command encoding:
+[=If SizePrefixDisabled =] 
+[ option is not enabled. ]
+[ +------+               ] +------+-------------------------+
+[ | size |               ] | type | command-specific-fields |
+[ +------+               ] +------+-------------------------+
+[ | <SPAN class="code-object">int</SPAN>  |               ] | <SPAN class="code-object">byte</SPAN> | (size-1) octects        |
+[ +------+               ] +------+-------------------------+
+[========================]</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> size </TD>
+<TD class="confluenceTd"> Holds how many subsequent bytes are in the the command </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> type </TD>
+<TD class="confluenceTd"> Command type identifier </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> command-specific-fields</TD>
+<TD class="confluenceTd"> The data for the command. It is encoding depends on the type used </TD>
+</TR>
+</TBODY></TABLE>
+
+<P>If a command type does not have any command specific content, then size would be 1.</P>
+
+<P>Prefixing the size on every command is done to aid in non-blocking IO processing so that receiver can easily determine when a whole command has been received and can be processed.  But finding out the size of command takes additional buffering on the sender size and is not needed if the receiver is doing blocking IO. If the SizePrefixDisabled option is enabled after the exchange of WIREFORMAT_INFO packets, then every subsequent command will not have the size prefixed.</P>
+
+
+<H2><A name="OpenWireVersion2Specification-CommandTypes"></A>Command Types</H2>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Type Identifier </TH>
+<TH class="confluenceTh"> Command </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd">1</TD>
+<TD class="confluenceTd">WIREFORMAT_INFO                   </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">2</TD>
+<TD class="confluenceTd">BROKER_INFO                       </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">3</TD>
+<TD class="confluenceTd">CONNECTION_INFO                   </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">4</TD>
+<TD class="confluenceTd">SESSION_INFO                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">5</TD>
+<TD class="confluenceTd">CONSUMER_INFO                     </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">6</TD>
+<TD class="confluenceTd">PRODUCER_INFO                     </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">7</TD>
+<TD class="confluenceTd">TRANSACTION_INFO                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">8</TD>
+<TD class="confluenceTd">DESTINATION_INFO                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">9</TD>
+<TD class="confluenceTd">REMOVE_SUBSCRIPTION_INFO          </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">10</TD>
+<TD class="confluenceTd">KEEP_ALIVE_INFO                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">11</TD>
+<TD class="confluenceTd">SHUTDOWN_INFO                    </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">12</TD>
+<TD class="confluenceTd">REMOVE_INFO                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">14</TD>
+<TD class="confluenceTd">CONTROL_COMMAND                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">15</TD>
+<TD class="confluenceTd">FLUSH_COMMAND                    </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">16</TD>
+<TD class="confluenceTd">CONNECTION_ERROR                 </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">17</TD>
+<TD class="confluenceTd">CONSUMER_CONTROL                 </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">18</TD>
+<TD class="confluenceTd">CONNECTION_CONTROL               </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">21</TD>
+<TD class="confluenceTd">MESSAGE_DISPATCH                 </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">22</TD>
+<TD class="confluenceTd">MESSAGE_ACK                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">23</TD>
+<TD class="confluenceTd">ACTIVEMQ_MESSAGE                 </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">24</TD>
+<TD class="confluenceTd">ACTIVEMQ_BYTES_MESSAGE           </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">25</TD>
+<TD class="confluenceTd">ACTIVEMQ_MAP_MESSAGE             </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">26</TD>
+<TD class="confluenceTd">ACTIVEMQ_OBJECT_MESSAGE          </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">27</TD>
+<TD class="confluenceTd">ACTIVEMQ_STREAM_MESSAGE          </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">28</TD>
+<TD class="confluenceTd">ACTIVEMQ_TEXT_MESSAGE            </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">30</TD>
+<TD class="confluenceTd">RESPONSE                         </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">31</TD>
+<TD class="confluenceTd">EXCEPTION_RESPONSE               </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">32</TD>
+<TD class="confluenceTd">DATA_RESPONSE                    </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">33</TD>
+<TD class="confluenceTd">DATA_ARRAY_RESPONSE              </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">34</TD>
+<TD class="confluenceTd">INTEGER_RESPONSE                 </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">40</TD>
+<TD class="confluenceTd">DISCOVERY_EVENT                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">50</TD>
+<TD class="confluenceTd">JOURNAL_ACK                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">52</TD>
+<TD class="confluenceTd">JOURNAL_REMOVE                   </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">53</TD>
+<TD class="confluenceTd">JOURNAL_TRACE                    </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">54</TD>
+<TD class="confluenceTd">JOURNAL_TRANSACTION              </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">55</TD>
+<TD class="confluenceTd">DURABLE_SUBSCRIPTION_INFO        </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">60</TD>
+<TD class="confluenceTd">PARTIAL_COMMAND                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">61</TD>
+<TD class="confluenceTd">PARTIAL_LAST_COMMAND             </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">65</TD>
+<TD class="confluenceTd">REPLAY                           </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">70</TD>
+<TD class="confluenceTd">BYTE_TYPE                        </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">71</TD>
+<TD class="confluenceTd">CHAR_TYPE                        </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">72</TD>
+<TD class="confluenceTd">SHORT_TYPE                       </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">73</TD>
+<TD class="confluenceTd">INTEGER_TYPE                     </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">74</TD>
+<TD class="confluenceTd">LONG_TYPE                        </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">75</TD>
+<TD class="confluenceTd">DOUBLE_TYPE                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">76</TD>
+<TD class="confluenceTd">FLOAT_TYPE                       </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">77</TD>
+<TD class="confluenceTd">STRING_TYPE                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">78</TD>
+<TD class="confluenceTd">BOOLEAN_TYPE                     </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">79</TD>
+<TD class="confluenceTd">BYTE_ARRAY_TYPE                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">90</TD>
+<TD class="confluenceTd">MESSAGE_DISPATCH_NOTIFICATION    </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">91</TD>
+<TD class="confluenceTd">NETWORK_BRIDGE_FILTER            </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">100</TD>
+<TD class="confluenceTd">ACTIVEMQ_QUEUE                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">101</TD>
+<TD class="confluenceTd">ACTIVEMQ_TOPIC                  </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">102</TD>
+<TD class="confluenceTd">ACTIVEMQ_TEMP_QUEUE             </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">103</TD>
+<TD class="confluenceTd">ACTIVEMQ_TEMP_TOPIC             </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">110</TD>
+<TD class="confluenceTd">MESSAGE_ID                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">111</TD>
+<TD class="confluenceTd">ACTIVEMQ_LOCAL_TRANSACTION_ID   </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">112</TD>
+<TD class="confluenceTd">ACTIVEMQ_XA_TRANSACTION_ID      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">120</TD>
+<TD class="confluenceTd">CONNECTION_ID                   </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">121</TD>
+<TD class="confluenceTd">SESSION_ID                      </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">122</TD>
+<TD class="confluenceTd">CONSUMER_ID                     </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">123</TD>
+<TD class="confluenceTd">PRODUCER_ID                     </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+<TR>
+<TD class="confluenceTd">124</TD>
+<TD class="confluenceTd">BROKER_ID                       </TD>
+<TD class="confluenceTd">&nbsp;</TD>
+</TR>
+</TBODY></TABLE>
+
+<H3><A name="OpenWireVersion2Specification-CommandFieldEncoding"></A>Command Field Encoding</H3>
+
+<P>All OpenWire commands use the same algorithm when encoding their fields.  The algorithm restricts commands to use fields that are of the following type:</P>
+
+<UL>
+	<LI>Java primitive types</LI>
+	<LI>String</LI>
+	<LI>Byte Arrays</LI>
+	<LI>N Sized Byte Arrays</LI>
+	<LI>Throwable</LI>
+	<LI>Nested OpenWire commands</LI>
+	<LI>Nested OpenWire command arrays</LI>
+	<LI>Cached Nested OpenWire commands</LI>
+</UL>
+
+
+<P>Notice that OpenWire commands can nest other OpenWire commands in it&apos;s fields.  Care must be taken that only acyclic graphs of commands are marshaled.</P>
+
+<H4><A name="OpenWireVersion2Specification-StringTypeEncoding"></A>String Type Encoding</H4>
+
+<P>Strings fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">string encoding:
+             [=If not-<SPAN class="code-keyword">null</SPAN> is 1===========]
++----------+ [ +-------+----------------+ ]
+| not-<SPAN class="code-keyword">null</SPAN> | [ | size  | encoded-string | ]
++----------+ [ +-------+----------------+ ]
+| <SPAN class="code-object">byte</SPAN>     | [ | <SPAN class="code-object">short</SPAN> | size octects   | ]
++----------+ [ +-------+----------------+ ]
+             [============================]</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> not-null </TD>
+<TD class="confluenceTd"> 1 if the string is not null, 0 if the string is null </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> size </TD>
+<TD class="confluenceTd"> The number of bytes of the UTF-8 Encoded string </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> encoded-string </TD>
+<TD class="confluenceTd"> The UTF-8 encoded form of the string </TD>
+</TR>
+</TBODY></TABLE>
+
+<H3><A name="OpenWireVersion2Specification-ByteArrayTypeEncoding"></A>Byte Array Type Encoding</H3>
+
+<P>Byte array fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java"><SPAN class="code-object">byte</SPAN>-array encoding:
+             [=If not-<SPAN class="code-keyword">null</SPAN> is 1========]
++----------+ [ +------+--------------+ ]
+| not-<SPAN class="code-keyword">null</SPAN> | [ | size | data         | ]
++----------+ [ +------+--------------+ ]
+| <SPAN class="code-object">byte</SPAN>     | [ | <SPAN class="code-object">int</SPAN>  | size octects | ]
++----------+ [ +------+--------------+ ]
+             [=========================]</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> not-null </TD>
+<TD class="confluenceTd"> 1 if the byte array is not null, 0 if it is null </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> size </TD>
+<TD class="confluenceTd"> The number of bytes in the byte array </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> data </TD>
+<TD class="confluenceTd"> The data of the byte array </TD>
+</TR>
+</TBODY></TABLE>
+
+
+<H3><A name="OpenWireVersion2Specification-NSizedByteArrayTypeEncoding"></A>N Sized Byte Array Type Encoding</H3>
+
+<P>Fixed Size Byte array fields may NOT be null and their length must be N length.  Used for byte arrays that are always a fixed size.</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">N-sized-<SPAN class="code-object">byte</SPAN>-array encoding:
++-----------+
+| data      |
++-----------+
+| N octects |
++-----------+</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> data </TD>
+<TD class="confluenceTd"> The data of the byte array </TD>
+</TR>
+</TBODY></TABLE>
+
+<H3><A name="OpenWireVersion2Specification-ThrowableTypeEncoding"></A>Throwable Type Encoding</H3>
+
+<P>Throwable fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
+
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">throwable encoding:
+             [=If not-<SPAN class="code-keyword">null</SPAN> is 1===========================================================================]
+             [                               [=If StackTraceEnabled option is enabled.==================] ]
+             [                               [             [=Repeated size times======================] ] ]
++----------+ [ +----------------+---------+  [ +-------+ [ +--------+--------+--------+-------------+ ] ] ]
+| not-<SPAN class="code-keyword">null</SPAN> | [ | exception-name | message |  [ | size  | [ | class  | method | file   | line-number | ] ] ]
++----------+ [ +----------------+---------+  [ +-------+ [ +--------+--------+--------+-------------+ ] ] ]
+| <SPAN class="code-object">byte</SPAN>     | [ | string         | string  |  [ | <SPAN class="code-object">short</SPAN> | [ | string | string | string | <SPAN class="code-object">int</SPAN>         | ] ] ]
++----------+ [ +----------------+---------+  [ +-------+ [ +--------+--------+--------+-------------+ ] ] ]
+             [                               [           [============================================] ] ]
+             [                               [==========================================================] ]
+             [============================================================================================]</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> not-null </TD>
+<TD class="confluenceTd"> 1 if the Throwable not null, 0 if the Throwable is null </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> exception-name</TD>
+<TD class="confluenceTd"> The class name of the exception </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> message </TD>
+<TD class="confluenceTd"> The exception message </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> size </TD>
+<TD class="confluenceTd"> The number of stack frames in the stack trace </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> class </TD>
+<TD class="confluenceTd"> The name of the class in a stack frame </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> method </TD>
+<TD class="confluenceTd"> The name of the method in a stack frame </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> file   </TD>
+<TD class="confluenceTd"> The name of the file in a stack frame </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> line-number </TD>
+<TD class="confluenceTd"> The line number in a stack frame </TD>
+</TR>
+</TBODY></TABLE>
+
+<P>If the StackTraceEnabled encoding option is enabled after the exchange of WIREFORMAT_INFO packets, then every Throwable filed will have stack trace data appended to it.</P>
+
+<H3><A name="OpenWireVersion2Specification-NestedCommandTypeEncoding"></A>Nested Command Type Encoding</H3>
+
+<P>Nested command fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">nested-object encoding:
+             [=If not-<SPAN class="code-keyword">null</SPAN> is 1===================]
++----------+ [ +------+-------------------------+ ]
+| not-<SPAN class="code-keyword">null</SPAN> | [ | type | command-specific-fields | ]
++----------+ [ +------+-------------------------+ ]
+| <SPAN class="code-object">byte</SPAN>     | [ | <SPAN class="code-object">byte</SPAN> | variable sized          | ]
++----------+ [ +------+-------------------------+ ]
+             [====================================]</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> not-null </TD>
+<TD class="confluenceTd"> 1 if the Throwable not null, 0 if the Throwable is null </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> type </TD>
+<TD class="confluenceTd"> Command type identifier </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> command-specific-fields</TD>
+<TD class="confluenceTd"> The data for the command. It is encoding depends on the type used </TD>
+</TR>
+</TBODY></TABLE>
+
+<H3><A name="OpenWireVersion2Specification-CachedNestedCommandTypeEncoding"></A>Cached Nested Command Type Encoding</H3>
+
+<P>Nested Command types can be cached so that subsequent marshaling operations of the same object result in a smaller on the wire size.  By default the CacheEnabled option is not enabled and therefore standard nested-object encoding is used.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">cached-object-encoding:
+[=If CacheEnabled option is enabled=====================]
+[                       [=If <SPAN class="code-keyword">new</SPAN>-value is 1===========] ]
+[ +-----------+-------+ [ +-------------------------+ ] ]
+[ | <SPAN class="code-keyword">new</SPAN>-value | key   | [ | command-specific-fields | ] ]
+[ +-----------+-------+ [ +-------------------------+ ] ]
+[ | <SPAN class="code-object">byte</SPAN>      | <SPAN class="code-object">short</SPAN> | [ | nested-object           | ] ]
+[ +-----------+-------+ [ +-------------------------+ ] ]
+[                       [=============================] ]
+[=====================================================] ]
+
+[=If CacheEnabled option is disabled =]
+[ +-------------------------+         ]
+[ | command-specific-fields |         ]
+[ +-------------------------+         ]
+[ | nested-object           |         ]
+[ +-------------------------+         ]
+[=====================================]</PRE>
+</DIV></DIV>
+
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh"> Field </TH>
+<TH class="confluenceTh"> Description </TH>
+</TR>
+<TR>
+<TD class="confluenceTd"> new-value </TD>
+<TD class="confluenceTd"> 1 if the value is not in the cache, 0 if it already is in the cache </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> key </TD>
+<TD class="confluenceTd"> Key used to identify the value in the cache </TD>
+</TR>
+<TR>
+<TD class="confluenceTd"> command-specific-fields</TD>
+<TD class="confluenceTd"> The data for the command. It is encoding depends on the type used </TD>
+</TR>
+</TBODY></TABLE>
+
+<H2><A name="OpenWireVersion2Specification-LooseEncoding"></A>Loose Encoding</H2>
+
+<P>The default encoding explained so far is called &quot;loose encoding&quot; and is the default encoding used when OpenWire if first initialized.  Loose encoding is simple to implement does not add much CPU overhead to the marshaling/unmarshaling process.  It is able to marshal an object graph in single pass of the object tree.</P>
+
+<H2><A name="OpenWireVersion2Specification-TightEncoding"></A>Tight Encoding</H2>
+
+<P>Another encoding option is supported by OpenWire which is called TightEncoding.  When tight encoding is used, it uses bit streams to marshal all the boolean values that would have taken up a byte in loose encoding to a bit in the bit stream.  To build the bit stream 2 passes through the object graph are taken so this is more CPU intensive marshaling process but it produces a smaller on the wire size.</P>
+</DIV>
+          
+                  </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=chirino">Hiram Chirino</A>,
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=chirino">Hiram Chirino</A> on Dec 30, 2006
+                  
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=15224">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file

Modified: incubator/activemq/site/openwire.html
URL: http://svn.apache.org/viewvc/incubator/activemq/site/openwire.html?view=diff&rev=491078&r1=491077&r2=491078
==============================================================================
--- incubator/activemq/site/openwire.html (original)
+++ incubator/activemq/site/openwire.html Fri Dec 29 11:17:33 2006
@@ -272,665 +272,27 @@
 
 <H3><A name="OpenWire-Specification"></A>Specification</H3>
 
-<H4><A name="OpenWire-Overview"></A>Overview</H4>
-
-<P>OpenWire is used to marshal objects to byte arrays and back.  We will refer to the marshaled objects as commands.  </P>
-
-<P>A TCP network connection would see multiple commands back to back on the stream.  Commands are not delimited in anyway and are variable sized.</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">+---------+  +---------+      +---------+
-| command |  | command | .... | command |
-+---------+  +---------+      +---------+</PRE>
-</DIV></DIV>
-
-<P>All data primitive types used in the encoded commands are encoded in big-endian/network byte order. </P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">primitive types and encoding:
-             |               |               |               |               |               |               
-+----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ 
-| <SPAN class="code-object">byte</SPAN>     | | | <SPAN class="code-object">char</SPAN>      | | | <SPAN class="code-object">short</SPAN>     | | | <SPAN class="code-object">int</SPAN>       | | | <SPAN class="code-object">long</SPAN>      | | | <SPAN class="code-object">float</SPAN>     | | | <SPAN class="code-object">double</SPAN>    | 
-+----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ 
-| 1 octect | | | 2 octects | | | 2 octects | | | 4 octects | | | 8 octects | | | 4 octects | | | 8 octects | 
-+----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ | +-----------+ 
-             |               |               |               |               |               |</PRE>
-</DIV></DIV>
-
-
-<H4><A name="OpenWire-WireFormatNegotiation"></A>Wire Format Negotiation</H4>
-
-<P>OpenWire is an extensible in that it supports adding new encoding options while still being backward compatible with previous versions of the protocol.  Every OpenWire protocol session initially starts with all encoding options turned off and at version 1 of command marshalers.  An initial WIREFORMAT_INFO command is exchanged between the two nodes so that additional encoding features can be enabled.  If both sides request an encoding feature to be enabled then it will be enabled.  The command marshalers used will be the highest version that they both support.</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">+-------------------------+ +---------+  +---------+      +---------+
-| WIREFORMAT_INFO command | | command |  | command | .... | command |
-+-------------------------+ +---------+  +---------+      +---------+</PRE>
-</DIV></DIV>
-
-<H4><A name="OpenWire-CommandEncoding"></A>Command Encoding</H4>
-
-<P>Every command is encoded as follows:</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">command encoding:
-[=If SizePrefixDisabled =] 
-[ option is not enabled. ]
-[ +------+               ] +------+-------------------------+
-[ | size |               ] | type | command-specific-fields |
-[ +------+               ] +------+-------------------------+
-[ | <SPAN class="code-object">int</SPAN>  |               ] | <SPAN class="code-object">byte</SPAN> | (size-1) octects        |
-[ +------+               ] +------+-------------------------+
-[========================]</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> size </TD>
-<TD class="confluenceTd"> Holds how many subsequent bytes are in the the command </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> type </TD>
-<TD class="confluenceTd"> Command type identifier </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> command-specific-fields</TD>
-<TD class="confluenceTd"> The data for the command. It is encoding depends on the type used </TD>
-</TR>
-</TBODY></TABLE>
-
-<P>If a command type does not have any command specific content, then size would be 1.</P>
-
-<P>Prefixing the size on every command is done to aid in non-blocking IO processing so that receiver can easily determine when a whole command has been received and can be processed.  But finding out the size of command takes additional buffering on the sender size and is not needed if the receiver is doing blocking IO. If the SizePrefixDisabled option is enabled after the exchange of WIREFORMAT_INFO packets, then every subsequent command will not have the size prefixed.</P>
-
-
-<H4><A name="OpenWire-CommandTypes"></A>Command Types</H4>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Type Identifier </TH>
-<TH class="confluenceTh"> Command </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd">1</TD>
-<TD class="confluenceTd">WIREFORMAT_INFO                   </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">2</TD>
-<TD class="confluenceTd">BROKER_INFO                       </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">3</TD>
-<TD class="confluenceTd">CONNECTION_INFO                   </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">4</TD>
-<TD class="confluenceTd">SESSION_INFO                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">5</TD>
-<TD class="confluenceTd">CONSUMER_INFO                     </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">6</TD>
-<TD class="confluenceTd">PRODUCER_INFO                     </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">7</TD>
-<TD class="confluenceTd">TRANSACTION_INFO                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">8</TD>
-<TD class="confluenceTd">DESTINATION_INFO                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">9</TD>
-<TD class="confluenceTd">REMOVE_SUBSCRIPTION_INFO          </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">10</TD>
-<TD class="confluenceTd">KEEP_ALIVE_INFO                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">11</TD>
-<TD class="confluenceTd">SHUTDOWN_INFO                    </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">12</TD>
-<TD class="confluenceTd">REMOVE_INFO                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">14</TD>
-<TD class="confluenceTd">CONTROL_COMMAND                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">15</TD>
-<TD class="confluenceTd">FLUSH_COMMAND                    </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">16</TD>
-<TD class="confluenceTd">CONNECTION_ERROR                 </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">17</TD>
-<TD class="confluenceTd">CONSUMER_CONTROL                 </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">18</TD>
-<TD class="confluenceTd">CONNECTION_CONTROL               </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">21</TD>
-<TD class="confluenceTd">MESSAGE_DISPATCH                 </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">22</TD>
-<TD class="confluenceTd">MESSAGE_ACK                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">23</TD>
-<TD class="confluenceTd">ACTIVEMQ_MESSAGE                 </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">24</TD>
-<TD class="confluenceTd">ACTIVEMQ_BYTES_MESSAGE           </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">25</TD>
-<TD class="confluenceTd">ACTIVEMQ_MAP_MESSAGE             </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">26</TD>
-<TD class="confluenceTd">ACTIVEMQ_OBJECT_MESSAGE          </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">27</TD>
-<TD class="confluenceTd">ACTIVEMQ_STREAM_MESSAGE          </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">28</TD>
-<TD class="confluenceTd">ACTIVEMQ_TEXT_MESSAGE            </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">30</TD>
-<TD class="confluenceTd">RESPONSE                         </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">31</TD>
-<TD class="confluenceTd">EXCEPTION_RESPONSE               </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">32</TD>
-<TD class="confluenceTd">DATA_RESPONSE                    </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">33</TD>
-<TD class="confluenceTd">DATA_ARRAY_RESPONSE              </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">34</TD>
-<TD class="confluenceTd">INTEGER_RESPONSE                 </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">40</TD>
-<TD class="confluenceTd">DISCOVERY_EVENT                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">50</TD>
-<TD class="confluenceTd">JOURNAL_ACK                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">52</TD>
-<TD class="confluenceTd">JOURNAL_REMOVE                   </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">53</TD>
-<TD class="confluenceTd">JOURNAL_TRACE                    </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">54</TD>
-<TD class="confluenceTd">JOURNAL_TRANSACTION              </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">55</TD>
-<TD class="confluenceTd">DURABLE_SUBSCRIPTION_INFO        </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">60</TD>
-<TD class="confluenceTd">PARTIAL_COMMAND                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">61</TD>
-<TD class="confluenceTd">PARTIAL_LAST_COMMAND             </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">65</TD>
-<TD class="confluenceTd">REPLAY                           </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">70</TD>
-<TD class="confluenceTd">BYTE_TYPE                        </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">71</TD>
-<TD class="confluenceTd">CHAR_TYPE                        </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">72</TD>
-<TD class="confluenceTd">SHORT_TYPE                       </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">73</TD>
-<TD class="confluenceTd">INTEGER_TYPE                     </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">74</TD>
-<TD class="confluenceTd">LONG_TYPE                        </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">75</TD>
-<TD class="confluenceTd">DOUBLE_TYPE                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">76</TD>
-<TD class="confluenceTd">FLOAT_TYPE                       </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">77</TD>
-<TD class="confluenceTd">STRING_TYPE                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">78</TD>
-<TD class="confluenceTd">BOOLEAN_TYPE                     </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">79</TD>
-<TD class="confluenceTd">BYTE_ARRAY_TYPE                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">90</TD>
-<TD class="confluenceTd">MESSAGE_DISPATCH_NOTIFICATION    </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">91</TD>
-<TD class="confluenceTd">NETWORK_BRIDGE_FILTER            </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">100</TD>
-<TD class="confluenceTd">ACTIVEMQ_QUEUE                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">101</TD>
-<TD class="confluenceTd">ACTIVEMQ_TOPIC                  </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">102</TD>
-<TD class="confluenceTd">ACTIVEMQ_TEMP_QUEUE             </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">103</TD>
-<TD class="confluenceTd">ACTIVEMQ_TEMP_TOPIC             </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">110</TD>
-<TD class="confluenceTd">MESSAGE_ID                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">111</TD>
-<TD class="confluenceTd">ACTIVEMQ_LOCAL_TRANSACTION_ID   </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">112</TD>
-<TD class="confluenceTd">ACTIVEMQ_XA_TRANSACTION_ID      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">120</TD>
-<TD class="confluenceTd">CONNECTION_ID                   </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">121</TD>
-<TD class="confluenceTd">SESSION_ID                      </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">122</TD>
-<TD class="confluenceTd">CONSUMER_ID                     </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">123</TD>
-<TD class="confluenceTd">PRODUCER_ID                     </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-<TR>
-<TD class="confluenceTd">124</TD>
-<TD class="confluenceTd">BROKER_ID                       </TD>
-<TD class="confluenceTd">&nbsp;</TD>
-</TR>
-</TBODY></TABLE>
-
-<H4><A name="OpenWire-CommandFieldEncoding"></A>Command Field Encoding</H4>
-
-<P>All OpenWire commands use the same algorithm when encoding their fields.  The algorithm restricts commands to use fields that are of the following type:</P>
+<P>For a detailed specification of what you will see on the wire:</P>
 
 <UL>
-	<LI>Java primitive types</LI>
-	<LI>String</LI>
-	<LI>Byte Arrays</LI>
-	<LI>N Sized Byte Arrays</LI>
-	<LI>Throwable</LI>
-	<LI>Nested OpenWire commands</LI>
-	<LI>Nested OpenWire command arrays</LI>
-	<LI>Cached Nested OpenWire commands</LI>
+	<LI><A href="openwire-version-2-specification.html" title="OpenWire Version 2 Specification">OpenWire Version 2 Specification</A></LI>
 </UL>
-
-
-<P>Notice that OpenWire commands can nest other OpenWire commands in it&apos;s fields.  Care must be taken that only acyclic graphs of commands are marshaled.</P>
-
-<H5><A name="OpenWire-StringTypeEncoding"></A>String Type Encoding</H5>
-
-<P>Strings fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">string encoding:
-             [=If not-<SPAN class="code-keyword">null</SPAN> is 1===========]
-+----------+ [ +-------+----------------+ ]
-| not-<SPAN class="code-keyword">null</SPAN> | [ | size  | encoded-string | ]
-+----------+ [ +-------+----------------+ ]
-| <SPAN class="code-object">byte</SPAN>     | [ | <SPAN class="code-object">short</SPAN> | size octects   | ]
-+----------+ [ +-------+----------------+ ]
-             [============================]</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> not-null </TD>
-<TD class="confluenceTd"> 1 if the string is not null, 0 if the string is null </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> size </TD>
-<TD class="confluenceTd"> The number of bytes of the UTF-8 Encoded string </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> encoded-string </TD>
-<TD class="confluenceTd"> The UTF-8 encoded form of the string </TD>
-</TR>
-</TBODY></TABLE>
-
-<H6><A name="OpenWire-ByteArrayTypeEncoding"></A>Byte Array Type Encoding</H6>
-
-<P>Byte array fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java"><SPAN class="code-object">byte</SPAN>-array encoding:
-             [=If not-<SPAN class="code-keyword">null</SPAN> is 1========]
-+----------+ [ +------+--------------+ ]
-| not-<SPAN class="code-keyword">null</SPAN> | [ | size | data         | ]
-+----------+ [ +------+--------------+ ]
-| <SPAN class="code-object">byte</SPAN>     | [ | <SPAN class="code-object">int</SPAN>  | size octects | ]
-+----------+ [ +------+--------------+ ]
-             [=========================]</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> not-null </TD>
-<TD class="confluenceTd"> 1 if the byte array is not null, 0 if it is null </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> size </TD>
-<TD class="confluenceTd"> The number of bytes in the byte array </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> data </TD>
-<TD class="confluenceTd"> The data of the byte array </TD>
-</TR>
-</TBODY></TABLE>
-
-
-<H5><A name="OpenWire-NSizedByteArrayTypeEncoding"></A>N Sized Byte Array Type Encoding</H5>
-
-<P>Fixed Size Byte array fields may NOT be null and their length must be N length.  Used for byte arrays that are always a fixed size.</P>
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">N-sized-<SPAN class="code-object">byte</SPAN>-array encoding:
-+-----------+
-| data      |
-+-----------+
-| N octects |
-+-----------+</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> data </TD>
-<TD class="confluenceTd"> The data of the byte array </TD>
-</TR>
-</TBODY></TABLE>
-
-<H5><A name="OpenWire-ThrowableTypeEncoding"></A>Throwable Type Encoding</H5>
-
-<P>Throwable fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
-
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">throwable encoding:
-             [=If not-<SPAN class="code-keyword">null</SPAN> is 1===========================================================================]
-             [                               [=If StackTraceEnabled option is enabled.==================] ]
-             [                               [             [=Repeated size times======================] ] ]
-+----------+ [ +----------------+---------+  [ +-------+ [ +--------+--------+--------+-------------+ ] ] ]
-| not-<SPAN class="code-keyword">null</SPAN> | [ | exception-name | message |  [ | size  | [ | class  | method | file   | line-number | ] ] ]
-+----------+ [ +----------------+---------+  [ +-------+ [ +--------+--------+--------+-------------+ ] ] ]
-| <SPAN class="code-object">byte</SPAN>     | [ | string         | string  |  [ | <SPAN class="code-object">short</SPAN> | [ | string | string | string | <SPAN class="code-object">int</SPAN>         | ] ] ]
-+----------+ [ +----------------+---------+  [ +-------+ [ +--------+--------+--------+-------------+ ] ] ]
-             [                               [           [============================================] ] ]
-             [                               [==========================================================] ]
-             [============================================================================================]</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> not-null </TD>
-<TD class="confluenceTd"> 1 if the Throwable not null, 0 if the Throwable is null </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> exception-name</TD>
-<TD class="confluenceTd"> The class name of the exception </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> message </TD>
-<TD class="confluenceTd"> The exception message </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> size </TD>
-<TD class="confluenceTd"> The number of stack frames in the stack trace </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> class </TD>
-<TD class="confluenceTd"> The name of the class in a stack frame </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> method </TD>
-<TD class="confluenceTd"> The name of the method in a stack frame </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> file   </TD>
-<TD class="confluenceTd"> The name of the file in a stack frame </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> line-number </TD>
-<TD class="confluenceTd"> The line number in a stack frame </TD>
-</TR>
-</TBODY></TABLE>
-
-<P>If the StackTraceEnabled encoding option is enabled after the exchange of WIREFORMAT_INFO packets, then every Throwable filed will have stack trace data appended to it.</P>
-
-<H5><A name="OpenWire-NestedCommandTypeEncoding"></A>Nested Command Type Encoding</H5>
-
-<P>Nested command fields may be null. If it is null then it encodes to a single &quot;0&quot; byte.</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">nested-object encoding:
-             [=If not-<SPAN class="code-keyword">null</SPAN> is 1===================]
-+----------+ [ +------+-------------------------+ ]
-| not-<SPAN class="code-keyword">null</SPAN> | [ | type | command-specific-fields | ]
-+----------+ [ +------+-------------------------+ ]
-| <SPAN class="code-object">byte</SPAN>     | [ | <SPAN class="code-object">byte</SPAN> | variable sized          | ]
-+----------+ [ +------+-------------------------+ ]
-             [====================================]</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> not-null </TD>
-<TD class="confluenceTd"> 1 if the Throwable not null, 0 if the Throwable is null </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> type </TD>
-<TD class="confluenceTd"> Command type identifier </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> command-specific-fields</TD>
-<TD class="confluenceTd"> The data for the command. It is encoding depends on the type used </TD>
-</TR>
-</TBODY></TABLE>
-
-<H5><A name="OpenWire-CachedNestedCommandTypeEncoding"></A>Cached Nested Command Type Encoding</H5>
-
-<P>Nested Command types can be cached so that subsequent marshaling operations of the same object result in a smaller on the wire size.  By default the CacheEnabled option is not enabled and therefore standard nested-object encoding is used.</P>
-
-<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java">cached-object-encoding:
-[=If CacheEnabled option is enabled=====================]
-[                       [=If <SPAN class="code-keyword">new</SPAN>-value is 1===========] ]
-[ +-----------+-------+ [ +-------------------------+ ] ]
-[ | <SPAN class="code-keyword">new</SPAN>-value | key   | [ | command-specific-fields | ] ]
-[ +-----------+-------+ [ +-------------------------+ ] ]
-[ | <SPAN class="code-object">byte</SPAN>      | <SPAN class="code-object">short</SPAN> | [ | nested-object           | ] ]
-[ +-----------+-------+ [ +-------------------------+ ] ]
-[                       [=============================] ]
-[=====================================================] ]
-
-[=If CacheEnabled option is disabled =]
-[ +-------------------------+         ]
-[ | command-specific-fields |         ]
-[ +-------------------------+         ]
-[ | nested-object           |         ]
-[ +-------------------------+         ]
-[=====================================]</PRE>
-</DIV></DIV>
-
-<TABLE class="confluenceTable"><TBODY>
-<TR>
-<TH class="confluenceTh"> Field </TH>
-<TH class="confluenceTh"> Description </TH>
-</TR>
-<TR>
-<TD class="confluenceTd"> new-value </TD>
-<TD class="confluenceTd"> 1 if the value is not in the cache, 0 if it already is in the cache </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> key </TD>
-<TD class="confluenceTd"> Key used to identify the value in the cache </TD>
-</TR>
-<TR>
-<TD class="confluenceTd"> command-specific-fields</TD>
-<TD class="confluenceTd"> The data for the command. It is encoding depends on the type used </TD>
-</TR>
-</TBODY></TABLE>
-
-<H4><A name="OpenWire-LooseEncoding"></A>Loose Encoding</H4>
-
-<P>The default encoding explained so far is called &quot;loose encoding&quot; and is the default encoding used when OpenWire if first initialized.  Loose encoding is simple to implement does not add much CPU overhead to the marshaling/unmarshaling process.  It is able to marshal an object graph in single pass of the object tree.</P>
-
-<H4><A name="OpenWire-TightEncoding"></A>Tight Encoding</H4>
-
-<P>Another encoding option is supported by OpenWire which is called TightEncoding.  When tight encoding is used, it uses bit streams to marshal all the boolean values that would have taken up a byte in loose encoding to a bit in the bit stream.  To build the bit stream 2 passes through the object graph are taken so this is more CPU intensive marshaling process but it produces a smaller on the wire size.</P>
 </DIV>
           
+        <!--
+          <div class="tabletitle">
+            Children
+            <span class="smalltext" id="show" style="display: inline;">
+              <a href="javascript:showChildren()">Show Children</a></span>
+            <span class="smalltext" id="hide" style="display: none;">
+              <a href="javascript:hideChildren()">Hide Children</a></span>
+          </div>
+          <div class="greybox" id="children" style="display: none;">
+                                      <a href="http://goopen.org/confluence/display/ACTIVEMQ/OpenWire+Version+2+Specification" title="OpenWire Version 2 Specification">OpenWire Version 2 Specification</a>
+              <span class="smalltext">(ActiveMQ)</span>
+              <br>
+                      </div>
+-->
                   </DIV>
         </TD>
       </TR>
@@ -939,8 +301,8 @@
     </DIV>
     <DIV id="site-footer">
           Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James Strachan</A>,
-    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=chirino">Hiram Chirino</A> on Dec 29, 2006
-                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=101&originalId=15223">view change</A>)
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=chirino">Hiram Chirino</A> on Dec 30, 2006
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=101&originalId=15225">view change</A>)
               
       (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=101">edit page</A>)
     </DIV>



Mime
View raw message