activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r908857 [1/17] - in /activemq/sandbox/activemq-apollo-actor/activemq-amqp: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/activemq/ src/main/java/org/apache/activemq/amqp/ src/main/jav...
Date Thu, 11 Feb 2010 07:04:46 GMT
Author: cmacnaug
Date: Thu Feb 11 07:04:21 2010
New Revision: 908857

URL: http://svn.apache.org/viewvc?rev=908857&view=rev
Log:
Initial import of amqp 1.0 protocol handler and generated encoder (still a work in progress)

Added:
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/pom.xml
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpMessageDelivery.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpProtocolHandler.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommand.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommandHandler.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFrame.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFramingException.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpSessionFrame.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/BitUtils.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/Definitions.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpEncodingError.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpVersion.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/Encoded.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/Encoding.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/UnexpectedTypeException.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpAttachMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpBarMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpBinaryMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpBooleanMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpByteMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCharMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCloseMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCompletedMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpConnectionErrorMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpDetachMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpDispositionMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpDoubleMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpDrainMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpEnlistMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpFilterMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpFloatMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpFlowMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpFooterMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpFragmentMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpHeaderMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpIntMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpLinkErrorMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpLinkMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpListMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpLongMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMapMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpNoopMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpNullMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpOpenMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpPropertiesMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpRejectedMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpReleasedMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpRelinkMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSaslChallengeMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSaslInitMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSaslMechanismsMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSaslOutcomeMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSaslResponseMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSessionErrorMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpShortMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSourceMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpStringMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSymbolMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTargetMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTimestampMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTransferMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTxnMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpUbyteMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpUintMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpUlongMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpUnlinkMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpUshortMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpUuidMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpXidMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/BaseEncoder.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/DescribedTypeMarshaller.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/Encoder.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/PrimitiveEncoder.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpAddress.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpAttach.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpBar.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpBinary.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpBoolean.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpBuffer.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpByte.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpChar.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpClose.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpCompleted.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpConnectionError.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpConnectionErrorCode.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDeliveryTag.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDetach.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDirection.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDisposition.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDistributionMode.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDouble.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpDrain.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpEnlist.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpFilter.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpFilterSet.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpFloat.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpFlow.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpFooter.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpFragment.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpHandle.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpHeader.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpInt.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLink.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLinkError.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLinkErrorCode.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpList.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLong.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMap.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageAttributes.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageState.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNoop.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNull.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpOpen.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpOptions.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpProperties.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpRejected.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpReleased.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpRelink.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslChallenge.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslCode.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslInit.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslMechanisms.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslOutcome.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslResponse.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpScope.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSectionCodes.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSequenceNo.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSessionError.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSessionErrorCode.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSessionName.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpShort.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSource.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpString.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSymbol.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTarget.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTimestamp.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTransfer.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTxn.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTxnLevel.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpType.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpUbyte.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpUint.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpUlong.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpUnlink.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpUshort.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpUuid.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpXid.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/IAmqpList.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/state/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/state/ConnectionState.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/wireformat/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/wireformat/AmqpWireFormat.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/wireformat/AmqpWireFormatFactory.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/org/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/org/apache/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/org/apache/activemq/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/org/apache/activemq/amqp/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/org/apache/activemq/amqp/protocol/
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/test/java/org/apache/activemq/amqp/protocol/AmqpProtocolTest.java

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/pom.xml?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/pom.xml (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/pom.xml Thu Feb 11 07:04:21 2010
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+  <parent>
+    <artifactId>activemq-parent</artifactId>
+    <groupId>org.apache.activemq</groupId>
+    <version>6.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.activemq</groupId>
+  <artifactId>activemq-amqp</artifactId>
+  <name>activemq-amqp</name>
+  <version>6.0-SNAPSHOT</version>
+  <url>http://maven.apache.org</url>
+  
+  <dependencies>
+  	 <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-broker</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-transport</artifactId>
+    </dependency>
+    <dependency>
+    	<groupId>org.apache.activemq</groupId>
+    	<artifactId>activemq-bio</artifactId>
+    </dependency>
+	<dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-util</artifactId>
+      <version>6.0-SNAPSHOT</version>
+    </dependency>
+
+    <!-- Testing Dependencies -->
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-broker</artifactId>
+      <version>${activemq-version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-util</artifactId>
+      <version>${activemq-version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+  
+  
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpMessageDelivery.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpMessageDelivery.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpMessageDelivery.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpMessageDelivery.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,106 @@
+package org.apache.activemq.amqp.broker;
+
+import java.io.IOException;
+
+import org.apache.activemq.amqp.wireformat.AmqpWireFormat;
+import org.apache.activemq.amqp.protocol.types.AmqpTransfer;
+import org.apache.activemq.apollo.broker.BrokerMessageDelivery;
+import org.apache.activemq.apollo.broker.Destination;
+import org.apache.activemq.filter.MessageEvaluationContext;
+import org.apache.activemq.util.buffer.AsciiBuffer;
+import org.apache.activemq.util.buffer.Buffer;
+
+public class AmqpMessageDelivery extends BrokerMessageDelivery {
+
+    static final private AsciiBuffer ENCODING = new AsciiBuffer("openwire");
+    private AmqpWireFormat storeWireFormat;
+    private AmqpTransfer message;
+
+    AmqpMessageDelivery(AmqpTransfer message) {
+        this.message = message;
+
+    }
+
+    @Override
+    public int getMemorySize() {
+        // TODO
+        return 0;
+    }
+
+    @Override
+    protected Buffer getStoreEncoded() {
+        Buffer bytes;
+        try {
+            bytes = storeWireFormat.marshal(message);
+        } catch (IOException e) {
+            return null;
+        }
+        return bytes;
+    }
+
+    @Override
+    protected AsciiBuffer getStoreEncoding() {
+        return ENCODING;
+    }
+
+    public <T> T asType(Class<T> type) {
+        if (type == AmqpTransfer.class) {
+            return type.cast(message);
+        }
+        // TODO: is this right?
+        if (message.getClass().isAssignableFrom(type)) {
+            return type.cast(message);
+        }
+        return null;
+    }
+
+    public MessageEvaluationContext createMessageEvaluationContext() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Destination getDestination() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public long getExpiration() {
+        // TODO Auto-generated method stub
+        return -1;
+    }
+
+    public AsciiBuffer getMsgId() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public int getPriority() {
+        // TODO
+        return 0;
+    }
+
+    public AsciiBuffer getProducerId() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public boolean isPersistent() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public boolean isResponseRequired() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    public void onMessagePersisted() {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void setStoreWireFormat(AmqpWireFormat format) {
+        this.storeWireFormat = format;
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpProtocolHandler.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpProtocolHandler.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpProtocolHandler.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/broker/AmqpProtocolHandler.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,165 @@
+package org.apache.activemq.amqp.broker;
+
+import java.io.IOException;
+
+import org.apache.activemq.amqp.protocol.AmqpCommand;
+import org.apache.activemq.amqp.protocol.AmqpCommandHandler;
+import org.apache.activemq.amqp.protocol.types.AmqpAttach;
+import org.apache.activemq.amqp.protocol.types.AmqpBar;
+import org.apache.activemq.amqp.protocol.types.AmqpClose;
+import org.apache.activemq.amqp.protocol.types.AmqpDetach;
+import org.apache.activemq.amqp.protocol.types.AmqpDisposition;
+import org.apache.activemq.amqp.protocol.types.AmqpDrain;
+import org.apache.activemq.amqp.protocol.types.AmqpEnlist;
+import org.apache.activemq.amqp.protocol.types.AmqpFlow;
+import org.apache.activemq.amqp.protocol.types.AmqpLink;
+import org.apache.activemq.amqp.protocol.types.AmqpNoop;
+import org.apache.activemq.amqp.protocol.types.AmqpOpen;
+import org.apache.activemq.amqp.protocol.types.AmqpRelink;
+import org.apache.activemq.amqp.protocol.types.AmqpTransfer;
+import org.apache.activemq.amqp.protocol.types.AmqpTxn;
+import org.apache.activemq.amqp.protocol.types.AmqpUnlink;
+import org.apache.activemq.amqp.wireformat.AmqpWireFormat;
+import org.apache.activemq.apollo.broker.BrokerConnection;
+import org.apache.activemq.apollo.broker.BrokerMessageDelivery;
+import org.apache.activemq.apollo.broker.ProtocolHandler;
+import org.apache.activemq.broker.store.Store.MessageRecord;
+import org.apache.activemq.wireformat.WireFormat;
+
+public class AmqpProtocolHandler implements ProtocolHandler {
+
+    protected AmqpWireFormat wireFormat;
+    protected AmqpWireFormat storeWireFormat;
+
+    protected BrokerConnection connection;
+    private final AmqpCommandHandler handler = new AmqpCommandHandler(){
+
+        public void handleAttach(AmqpAttach attach) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleBar(AmqpBar bar) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleClose(AmqpClose close) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleDetach(AmqpDetach detach) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleDisposition(AmqpDisposition disposition) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleDrain(AmqpDrain drain) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleEnlist(AmqpEnlist enlist) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleFlow(AmqpFlow flow) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleLink(AmqpLink link) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleNoop(AmqpNoop noop) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleOpen(AmqpOpen open) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleRelink(AmqpRelink relink) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleTransfer(AmqpTransfer transfer) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleTxn(AmqpTxn txn) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void handleUnlink(AmqpUnlink unlink) throws Exception {
+            // TODO Auto-generated method stub
+            
+        }
+
+    };
+    
+    AmqpProtocolHandler()
+    {
+        
+    }
+    
+    public BrokerMessageDelivery createMessageDelivery(MessageRecord arg0) throws IOException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public BrokerConnection getConnection() {
+        return connection;
+    }
+
+    public void onCommand(Object command) {
+        try {
+            ((AmqpCommand) command).handle(handler);
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    public void onException(Exception arg0) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void setConnection(BrokerConnection connection) {
+        this.connection = connection;
+    }
+
+    private void setStoreWireFormat(AmqpWireFormat wireFormat) {
+        this.storeWireFormat = wireFormat;
+        storeWireFormat.setVersion(AmqpWireFormat.DEFAULT_VERSION);
+    }
+    
+    public void setWireFormat(WireFormat wireFormat) {
+        this.wireFormat = (AmqpWireFormat) wireFormat;
+    }
+
+    public void start() throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public void stop() throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommand.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommand.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommand.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommand.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with his work
+ * for additional information regarding copyright ownership. The ASF licenses
+ * this file to You under the Apache License, Version 2.0 (the "License"); you
+ * may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+public interface AmqpCommand {
+
+    public void handle(AmqpCommandHandler handler) throws Exception;
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommandHandler.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommandHandler.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommandHandler.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpCommandHandler.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+import org.apache.activemq.amqp.protocol.types.AmqpUnlink;
+import org.apache.activemq.amqp.protocol.types.AmqpFlow;
+import org.apache.activemq.amqp.protocol.types.AmqpRelink;
+import org.apache.activemq.amqp.protocol.types.AmqpClose;
+import org.apache.activemq.amqp.protocol.types.AmqpOpen;
+import org.apache.activemq.amqp.protocol.types.AmqpTransfer;
+import org.apache.activemq.amqp.protocol.types.AmqpDetach;
+import org.apache.activemq.amqp.protocol.types.AmqpEnlist;
+import org.apache.activemq.amqp.protocol.types.AmqpDrain;
+import org.apache.activemq.amqp.protocol.types.AmqpBar;
+import org.apache.activemq.amqp.protocol.types.AmqpNoop;
+import org.apache.activemq.amqp.protocol.types.AmqpLink;
+import org.apache.activemq.amqp.protocol.types.AmqpTxn;
+import org.apache.activemq.amqp.protocol.types.AmqpDisposition;
+import org.apache.activemq.amqp.protocol.types.AmqpAttach;
+public interface AmqpCommandHandler {
+
+    public void handleUnlink(AmqpUnlink unlink) throws Exception;
+
+    public void handleFlow(AmqpFlow flow) throws Exception;
+
+    public void handleRelink(AmqpRelink relink) throws Exception;
+
+    public void handleClose(AmqpClose close) throws Exception;
+
+    public void handleOpen(AmqpOpen open) throws Exception;
+
+    public void handleTransfer(AmqpTransfer transfer) throws Exception;
+
+    public void handleDetach(AmqpDetach detach) throws Exception;
+
+    public void handleEnlist(AmqpEnlist enlist) throws Exception;
+
+    public void handleDrain(AmqpDrain drain) throws Exception;
+
+    public void handleBar(AmqpBar bar) throws Exception;
+
+    public void handleNoop(AmqpNoop noop) throws Exception;
+
+    public void handleLink(AmqpLink link) throws Exception;
+
+    public void handleTxn(AmqpTxn txn) throws Exception;
+
+    public void handleDisposition(AmqpDisposition disposition) throws Exception;
+
+    public void handleAttach(AmqpAttach attach) throws Exception;
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFrame.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFrame.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFrame.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFrame.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,188 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with his work
+ * for additional information regarding copyright ownership. The ASF licenses
+ * this file to You under the Apache License, Version 2.0 (the "License"); you
+ * may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+/**
+ * <p>
+ * Frames are divided into two distinct areas: a fixed width frame header, and a
+ * variable width frame body.
+ * </p>
+ * <p>
+ * <![CDATA[ +--------------+------------+ | frame header | frame body |
+ * +--------------+------------+ 24 bytes *variable* ]]>
+ * </p>
+ * <dl>
+ * <dt>frame header</dt>
+ * <dd>
+ * <p>
+ * The frame header is a fixed size (24 byte) structure that precedes each
+ * frame. The frame header includes information required to parse the rest of
+ * the frame.
+ * </p>
+ * </dd>
+ * <dt>frame body</dt>
+ * <dd>
+ * <p>
+ * The frame body is a variable width sequence of bytes whose interpretation
+ * depends on the frame type. For Connection and Session frames, this will, when
+ * non-empty, contain an encoded control or command.
+ * </p>
+ * </dd>
+ * </dl>
+ * <p>
+ * <b>Frame Header</b>
+ * <p>
+ * The first 8 bytes of the frame header are formatted identically for all frame
+ * types. The semantics of the frame flags, and the format of the last 16 bytes
+ * of the frame header are dependent on the specific type of frame as indicated
+ * by the value of the type field. There are two frame types defined: Connection
+ * frames and Session frames.
+ * </p>
+ * <p>
+ * 
+ * <pre>
+ *      +0         +1         +2         +3
+ *      +-------------------------------------------+ -.
+ *    0 |                   size                    |  |
+ *      +-------------------------------------------+  |
+ *    4 |  type  |   flags    |       channel       |  |
+ *      +-------------------------------------------+  |
+ *    8 |             type-dependent                |  |
+ *      +-------------------------------------------+  |---> frame header
+ *   12 |             type-dependent                |  |      (24 bytes)
+ *      +-------------------------------------------+  |
+ *   16 |             type-dependent                |  |
+ *      +-------------------------------------------+  |
+ *   20 |             type-dependent                |  |
+ *      +-------------------------------------------+ -'
+ *      +-------------------------------------------+ -.
+ *      |                    ...                    |  |
+ *      .                                           .  |
+ *      .                                           .  |---> frame body
+ *      .                                           .  |  (size - 24) bytes
+ *      |                    ...                    |  |
+ *      +-------------------------------------------+ -'
+ * </pre>
+ * 
+ * </p>
+ * <dl>
+ * <dt>size</dt>
+ * <dd>
+ * <p>
+ * Bytes 0-3 of the frame header contain the frame size. This is an unsigned
+ * 32-bit integer that MUST contain the total frame size including the frame
+ * header. The frame is malformed if the size is less than the the size of the
+ * header (24 bytes).
+ * </p>
+ * </dd>
+ * <dt>type</dt>
+ * <dd>
+ * <p>
+ * Byte 4 of the frame header is a type code. The type code indicates the format
+ * and purpose of the frame. A type code of 0x00 indicates that the frame is a
+ * Connection frame. A type code of 0x01 indicates that the frame is a Session
+ * frame. The subsequent bytes in the frame header may be interpreted
+ * differently depending on the type of the frame.
+ * </p>
+ * </dd>
+ * <dt>flags</dt>
+ * <dd>
+ * <p>
+ * Byte 5 of the frame header is reserved for frame flags. The semantics of the
+ * frame flags are determined by the frame type.
+ * </p>
+ * </dd>
+ * <dt>channel</dt>
+ * <dd>
+ * <p>
+ * Bytes 6 and 7 of the frame header contain the channel number. The channel
+ * number uniquely identifies one of the Sessions associated with the
+ * Connection.
+ * </p>
+ * </dd>
+ * </dl>
+ * 
+ * <b>Frame Body</b>
+ * <p>
+ * The frame body contains a variable number of octets, anywhere from zero, up
+ * to the maximum frame size minus 24 bytes for the header. Prior to any
+ * explicit negotiation, the maximum frame size is <xref
+ * name="MIN-MAX-FRAME-SIZE"/>. For Connection and Session frames, the frame
+ * body, if non-empty, will consist of a command or control operation encoded as
+ * a compound value (see <xref name="compound-types"/>). The complete set of
+ * compound type definitions for the core AMQP protocol commands and controls
+ * are defined in the "commands"and "controls" sections respectively.
+ * </p>
+ */
+
+public class AmqpFrame {
+
+    protected byte[] frameHeader;
+
+    protected static final int SIZE_OFFSET = 0;
+    protected static final int TYPE_OFFSET = 4;
+    protected static final int FLAGS_OFFSET = 5;
+    protected static final int CHANNEL_OFFSET = 6;
+
+    public static final byte CONNECTION_TYPE = 0x00;
+    public static final byte SESSION_TYPE = 0x01;
+
+    public static enum FrameType {
+
+        CONNECTION(CONNECTION_TYPE), SESSION(SESSION_TYPE);
+        final byte type;
+
+        FrameType(byte type) {
+            this.type = type;
+        }
+
+        public static FrameType getFrameType(AmqpFrame f) throws AmqpFramingException {
+            switch (f.frameHeader[TYPE_OFFSET]) {
+            case CONNECTION_TYPE:
+                return CONNECTION;
+            case SESSION_TYPE:
+                return SESSION;
+            default:
+                throw new AmqpFramingException("Unknown Frame Type: " + f.frameHeader[TYPE_OFFSET]);
+            }
+        }
+    }
+
+    public final FrameType getFrameType() throws AmqpFramingException {
+        return FrameType.getFrameType(this);
+    }
+
+    public final void setSize(long size) {
+        BitUtils.setUInt(frameHeader, SIZE_OFFSET, size);
+    }
+
+    public long getSize() {
+        return BitUtils.getUInt(frameHeader, SIZE_OFFSET);
+    }
+
+    protected void setFlags(byte flags) {
+        frameHeader[FLAGS_OFFSET] = flags;
+    }
+
+    public final void setChannel(int channel) {
+        BitUtils.setUShort(frameHeader, CHANNEL_OFFSET, channel);
+    }
+    
+    public final int getChannel() {
+        return BitUtils.getUShort(frameHeader, CHANNEL_OFFSET);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFramingException.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFramingException.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFramingException.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpFramingException.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with his work
+ * for additional information regarding copyright ownership. The ASF licenses
+ * this file to You under the Apache License, Version 2.0 (the "License"); you
+ * may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+import java.io.IOException;
+
+public class AmqpFramingException extends IOException{
+
+    private static final long serialVersionUID = 1L;
+
+    public AmqpFramingException(String msg)
+    {
+        super(msg);
+    }
+    
+    public AmqpFramingException(String msg, Throwable cause)
+    {
+        super(msg, cause);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpSessionFrame.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpSessionFrame.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpSessionFrame.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/AmqpSessionFrame.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with his work
+ * for additional information regarding copyright ownership. The ASF licenses
+ * this file to You under the Apache License, Version 2.0 (the "License"); you
+ * may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+public class AmqpSessionFrame extends AmqpFrame {
+
+    private static final byte COMMAND_MASK = 0x01;
+    private static final byte NO_EXECUTED_MASK = 0x02;
+    private static final byte SYNC_MASK = 0x04;
+
+    private static final int ACKNOWLEDGED_OFFSET = 8;
+    private static final int NO_EXECUTED_OFFSET = 12;
+    private static final int CAPACITY_OFFSET = 16;
+    private static final int COMMAND_ID_OFFSET = 20;
+
+    public void setCommand(boolean isCommand) {
+        if (isCommand) {
+            frameHeader[FLAGS_OFFSET] |= COMMAND_MASK;
+        } else {
+            frameHeader[FLAGS_OFFSET] &= ~COMMAND_MASK;
+        }
+    }
+
+    public boolean isCommand() {
+        return (frameHeader[FLAGS_OFFSET] & COMMAND_MASK) != 0;
+    }
+
+    public void setNoExecuted(boolean isNoExecuted) {
+        if (isNoExecuted) {
+            frameHeader[FLAGS_OFFSET] |= NO_EXECUTED_MASK;
+        } else {
+            frameHeader[FLAGS_OFFSET] &= ~NO_EXECUTED_MASK;
+        }
+    }
+
+    public boolean isNoExecuted() {
+        return (frameHeader[FLAGS_OFFSET] & NO_EXECUTED_MASK) != 0;
+    }
+
+    public void setSync(boolean isSync) {
+        if (isSync) {
+            frameHeader[FLAGS_OFFSET] |= SYNC_MASK;
+        } else {
+            frameHeader[FLAGS_OFFSET] &= ~SYNC_MASK;
+        }
+    }
+
+    public boolean isSync() {
+        return (frameHeader[FLAGS_OFFSET] & SYNC_MASK) != 0;
+    }
+
+    public void setAcknowledged(long acknowledged) {
+        BitUtils.setUInt(frameHeader, ACKNOWLEDGED_OFFSET, acknowledged);
+    }
+
+    public long getAcknowledged() {
+        return BitUtils.getUInt(frameHeader, ACKNOWLEDGED_OFFSET);
+    }
+
+    public void setNoExecuted(long noExecuted) {
+        BitUtils.setUInt(frameHeader, NO_EXECUTED_OFFSET, noExecuted);
+    }
+
+    public long getNoExecuted() {
+        return BitUtils.getUInt(frameHeader, NO_EXECUTED_OFFSET);
+    }
+
+    public void setCapacity(long capacity) {
+        BitUtils.setUInt(frameHeader, CAPACITY_OFFSET, capacity);
+    }
+
+    public long getCapacity() {
+        return BitUtils.getUInt(frameHeader, CAPACITY_OFFSET);
+    }
+    
+    public void setCommandId(long commandId) {
+        BitUtils.setUInt(frameHeader, COMMAND_ID_OFFSET, commandId);
+    }
+
+    public long getCommandId() {
+        return BitUtils.getUInt(frameHeader, COMMAND_ID_OFFSET);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/BitUtils.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/BitUtils.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/BitUtils.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/BitUtils.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with his work
+ * for additional information regarding copyright ownership. The ASF licenses
+ * this file to You under the Apache License, Version 2.0 (the "License"); you
+ * may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+import java.math.BigInteger;
+
+public class BitUtils {
+    
+    public static final void setUByte(final byte[] target, final int offset, final short value) {
+        target[offset + 0] = (byte) (0xff & target[offset]);
+    }
+    
+    public static final short getUByte(final byte[] source, final int offset) {
+        return (short) (0xFFFF & source[offset]);
+    }
+    
+    public static final void setByte(final byte[] target, final int offset, final byte value) {
+        target[offset + 0] = value;
+    }
+    
+    public static final short getByte(final byte[] source, final int offset) {
+        return source[offset];
+    }
+    
+    public static final void setUShort(final byte[] target, final int offset, final long value) {
+        target[offset + 0] = (byte) ((value >> 8) & 0xff);
+        target[offset + 1] = (byte) ((value >> 0) & 0xff);
+    }
+    
+    public static final int getUShort(final byte[] source, final int offset) {
+        return source[offset + 0] << 8 & 0xff | source[offset + 1];
+    }
+    
+    public static final void setShort(final byte[] target, final int offset, final short value) {
+        target[offset + 0] = (byte) ((value >> 8) & 0xff);
+        target[offset + 1] = (byte) ((value >> 0) & 0xff);
+    }
+    
+    public static final short getShort(final byte[] source, final int offset) {
+        return (short) (source[offset + 0] << 8 & 0xff | source[offset + 1]);
+    }
+    
+    public static final void setUInt(final byte[] target, final int offset, final long value) {
+        assert value < Integer.MAX_VALUE * 2 + 1;
+        target[offset + 0] = (byte) (value >> 24 & 0xff);
+        target[offset + 1] = (byte) (value >> 16 & 0xff);
+        target[offset + 2] = (byte) (value >> 8 & 0xff);
+        target[offset + 3] = (byte) (value >> 0 & 0xff);
+    }
+
+    public static final long getUInt(final byte[] source, final int offset) {
+        return source[offset + 0] << 24 | source[offset + 1] << 16 | source[offset + 2] << 8 | source[offset + 3];
+    }
+    
+    public static final void setInt(final byte[] target, final int offset, final int value) {
+        assert value < Integer.MAX_VALUE * 2 + 1;
+        target[offset + 0] = (byte) (value >> 24 & 0xff);
+        target[offset + 1] = (byte) (value >> 16 & 0xff);
+        target[offset + 2] = (byte) (value >> 8 & 0xff);
+        target[offset + 3] = (byte) (value >> 0 & 0xff);
+    }
+
+    public static final int getInt(final byte[] source, final int offset) {
+        return source[offset + 0] << 3 | source[offset + 1] << 2 | source[offset + 2] << 1 | source[offset + 3];
+    }
+    
+    public static final void setLong(final byte[] target, final int offset, final long value) {
+        assert value < Integer.MAX_VALUE * 2 + 1;
+        target[offset + 0] = (byte) (value >> 56 & 0xff);
+        target[offset + 1] = (byte) (value >> 48 & 0xff);
+        target[offset + 2] = (byte) (value >> 40 & 0xff);
+        target[offset + 3] = (byte) (value >> 32 & 0xff);
+        target[offset + 4] = (byte) (value >> 24 & 0xff);
+        target[offset + 5] = (byte) (value >> 12 & 0xff);
+        target[offset + 6] = (byte) (value >> 8 & 0xff);
+        target[offset + 7] = (byte) (value >> 0 & 0xff);
+    }
+
+    public static final long getLong(final byte[] source, final int offset) {
+        long rc = 
+        (int) source[offset + 0] << 56 | 
+        (int) source[offset + 1] << 48 | 
+        (int) source[offset + 2] << 40 | 
+        (int) source[offset + 3] << 32 | 
+        (int) source[offset + 4] << 24 | 
+        (int) source[offset + 5] << 16 | 
+        (int) source[offset + 6] << 8 | 
+        (int) source[offset + 7];
+        
+        return rc;
+    }
+    
+    public static final BigInteger getULong(final byte[] source, final int offset) {
+        byte [] bi = new byte [9];
+        System.arraycopy(source, offset, bi, 1, 8);
+        return new BigInteger(bi);
+    }
+    
+    public static final void setULong(final byte[] target, final int offset, final BigInteger value) {
+        byte [] b = value.toByteArray();
+        System.arraycopy(b, b.length - 8, target, offset, 8);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/Definitions.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/Definitions.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/Definitions.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/Definitions.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol;
+
+public interface Definitions {
+
+    /**
+     * the IANA assigned port number for AMQP
+     * <p>
+     * The standard AMQP port number that has been assigned by IANA for TCP, UDP, and SCTP.
+     * </p>
+     * <p>
+     * There is currently no UDP mapping defined for AMQP. The UDP port number is reserved for
+     * future transport mappings.
+     * </p>
+     */
+    public static final String PORT = "5672";
+
+    /**
+     * major protocol version
+     */
+    public static final String MAJOR = "1";
+
+    /**
+     * minor protocol version
+     */
+    public static final String MINOR = "0";
+
+    /**
+     * protocol revision
+     */
+    public static final String REVISION = "0";
+
+    /**
+     * the minimum size (in bytes) of the maximum frame size
+     * <p>
+     * During the initial Connection negotiation, the two peers must agree upon a maximum frame
+     * size. This constant defines the minimum value to which the maximum frame size can be set.
+     * By defining this value, the peers can guarantee that they can send frames of up to this
+     * size until they have agreed a definitive maximum frame size for that Connection.
+     * </p>
+     */
+    public static final String MIN_MAX_FRAME_SIZE = "4096";
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpEncodingError.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpEncodingError.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpEncodingError.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpEncodingError.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with his work
+ * for additional information regarding copyright ownership. The ASF licenses
+ * this file to You under the Apache License, Version 2.0 (the "License"); you
+ * may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.activemq.amqp.protocol.marshaller;
+
+public class AmqpEncodingError extends Error {
+    private static final long serialVersionUID = 1L;
+
+    public AmqpEncodingError(String msg) {
+        super(msg);
+    }
+
+    public AmqpEncodingError(String msg, Throwable cause) {
+        super(msg, cause);
+    }
+}

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,417 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.marshaller;
+
+import java.io.DataInput;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.UUID;
+import org.apache.activemq.amqp.protocol.types.AmqpAttach;
+import org.apache.activemq.amqp.protocol.types.AmqpBar;
+import org.apache.activemq.amqp.protocol.types.AmqpBinary;
+import org.apache.activemq.amqp.protocol.types.AmqpBoolean;
+import org.apache.activemq.amqp.protocol.types.AmqpByte;
+import org.apache.activemq.amqp.protocol.types.AmqpChar;
+import org.apache.activemq.amqp.protocol.types.AmqpClose;
+import org.apache.activemq.amqp.protocol.types.AmqpCompleted;
+import org.apache.activemq.amqp.protocol.types.AmqpConnectionError;
+import org.apache.activemq.amqp.protocol.types.AmqpDetach;
+import org.apache.activemq.amqp.protocol.types.AmqpDisposition;
+import org.apache.activemq.amqp.protocol.types.AmqpDouble;
+import org.apache.activemq.amqp.protocol.types.AmqpDrain;
+import org.apache.activemq.amqp.protocol.types.AmqpEnlist;
+import org.apache.activemq.amqp.protocol.types.AmqpFilter;
+import org.apache.activemq.amqp.protocol.types.AmqpFloat;
+import org.apache.activemq.amqp.protocol.types.AmqpFlow;
+import org.apache.activemq.amqp.protocol.types.AmqpFooter;
+import org.apache.activemq.amqp.protocol.types.AmqpFragment;
+import org.apache.activemq.amqp.protocol.types.AmqpHeader;
+import org.apache.activemq.amqp.protocol.types.AmqpInt;
+import org.apache.activemq.amqp.protocol.types.AmqpLink;
+import org.apache.activemq.amqp.protocol.types.AmqpLinkError;
+import org.apache.activemq.amqp.protocol.types.AmqpList;
+import org.apache.activemq.amqp.protocol.types.AmqpLong;
+import org.apache.activemq.amqp.protocol.types.AmqpMap;
+import org.apache.activemq.amqp.protocol.types.AmqpNoop;
+import org.apache.activemq.amqp.protocol.types.AmqpNull;
+import org.apache.activemq.amqp.protocol.types.AmqpOpen;
+import org.apache.activemq.amqp.protocol.types.AmqpProperties;
+import org.apache.activemq.amqp.protocol.types.AmqpRejected;
+import org.apache.activemq.amqp.protocol.types.AmqpReleased;
+import org.apache.activemq.amqp.protocol.types.AmqpRelink;
+import org.apache.activemq.amqp.protocol.types.AmqpSaslChallenge;
+import org.apache.activemq.amqp.protocol.types.AmqpSaslInit;
+import org.apache.activemq.amqp.protocol.types.AmqpSaslMechanisms;
+import org.apache.activemq.amqp.protocol.types.AmqpSaslOutcome;
+import org.apache.activemq.amqp.protocol.types.AmqpSaslResponse;
+import org.apache.activemq.amqp.protocol.types.AmqpSessionError;
+import org.apache.activemq.amqp.protocol.types.AmqpShort;
+import org.apache.activemq.amqp.protocol.types.AmqpSource;
+import org.apache.activemq.amqp.protocol.types.AmqpString;
+import org.apache.activemq.amqp.protocol.types.AmqpSymbol;
+import org.apache.activemq.amqp.protocol.types.AmqpTarget;
+import org.apache.activemq.amqp.protocol.types.AmqpTimestamp;
+import org.apache.activemq.amqp.protocol.types.AmqpTransfer;
+import org.apache.activemq.amqp.protocol.types.AmqpTxn;
+import org.apache.activemq.amqp.protocol.types.AmqpType;
+import org.apache.activemq.amqp.protocol.types.AmqpUbyte;
+import org.apache.activemq.amqp.protocol.types.AmqpUint;
+import org.apache.activemq.amqp.protocol.types.AmqpUlong;
+import org.apache.activemq.amqp.protocol.types.AmqpUnlink;
+import org.apache.activemq.amqp.protocol.types.AmqpUshort;
+import org.apache.activemq.amqp.protocol.types.AmqpUuid;
+import org.apache.activemq.amqp.protocol.types.AmqpXid;
+import org.apache.activemq.amqp.protocol.types.IAmqpList;
+import org.apache.activemq.util.buffer.Buffer;
+
+public interface AmqpMarshaller {
+
+    /**
+     * @return the protocol version of the marshaller
+     */
+    public AmqpVersion getVersion();
+
+    public AmqpType<?, ?> decodeType(Buffer source) throws AmqpEncodingError;
+
+    public AmqpType<?, ?> unmarshalType(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpSessionError data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpSessionError(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpSessionError(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Integer> encode(AmqpChar data) throws AmqpEncodingError;
+
+    public Encoded<Integer> decodeAmqpChar(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Integer> unmarshalAmqpChar(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpUnlink data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpUnlink(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpUnlink(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpFlow data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpFlow(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpFlow(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Long> encode(AmqpLong data) throws AmqpEncodingError;
+
+    public Encoded<Long> decodeAmqpLong(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Long> unmarshalAmqpLong(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Float> encode(AmqpFloat data) throws AmqpEncodingError;
+
+    public Encoded<Float> decodeAmqpFloat(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Float> unmarshalAmqpFloat(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpRelink data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpRelink(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpRelink(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpClose data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpClose(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpClose(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpOpen data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpOpen(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpOpen(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Byte> encode(AmqpByte data) throws AmqpEncodingError;
+
+    public Encoded<Byte> decodeAmqpByte(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Byte> unmarshalAmqpByte(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpRejected data) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpRejected(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpRejected(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpSaslOutcome data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpSaslOutcome(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpSaslOutcome(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Boolean> encode(AmqpBoolean data) throws AmqpEncodingError;
+
+    public Encoded<Boolean> decodeAmqpBoolean(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Boolean> unmarshalAmqpBoolean(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<BigInteger> encode(AmqpUlong data) throws AmqpEncodingError;
+
+    public Encoded<BigInteger> decodeAmqpUlong(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<BigInteger> unmarshalAmqpUlong(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpTransfer data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpTransfer(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpTransfer(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpDetach data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpDetach(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpDetach(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<String> encode(AmqpSymbol data) throws AmqpEncodingError;
+
+    public Encoded<String> decodeAmqpSymbol(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<String> unmarshalAmqpSymbol(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpSaslInit data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpSaslInit(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpSaslInit(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Integer> encode(AmqpInt data) throws AmqpEncodingError;
+
+    public Encoded<Integer> decodeAmqpInt(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Integer> unmarshalAmqpInt(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpEnlist data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpEnlist(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpEnlist(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpProperties data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpProperties(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpProperties(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Double> encode(AmqpDouble data) throws AmqpEncodingError;
+
+    public Encoded<Double> decodeAmqpDouble(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Double> unmarshalAmqpDouble(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpDrain data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpDrain(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpDrain(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpHeader data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpHeader(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpHeader(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpSaslMechanisms data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpSaslMechanisms(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpSaslMechanisms(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<UUID> encode(AmqpUuid data) throws AmqpEncodingError;
+
+    public Encoded<UUID> decodeAmqpUuid(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<UUID> unmarshalAmqpUuid(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpBar data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpBar(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpBar(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpFilter data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpFilter(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpFilter(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Buffer> encode(AmqpBinary data) throws AmqpEncodingError;
+
+    public Encoded<Buffer> decodeAmqpBinary(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Buffer> unmarshalAmqpBinary(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpNoop data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpNoop(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpNoop(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpLink data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpLink(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpLink(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Date> encode(AmqpTimestamp data) throws AmqpEncodingError;
+
+    public Encoded<Date> decodeAmqpTimestamp(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Date> unmarshalAmqpTimestamp(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Short> encode(AmqpShort data) throws AmqpEncodingError;
+
+    public Encoded<Short> decodeAmqpShort(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Short> unmarshalAmqpShort(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpReleased data) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpReleased(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpReleased(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpTxn data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpTxn(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpTxn(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpMap data) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpMap(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpMap(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpLinkError data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpLinkError(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpLinkError(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpConnectionError data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpConnectionError(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpConnectionError(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpSaslResponse data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpSaslResponse(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpSaslResponse(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpFragment data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpFragment(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpFragment(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpDisposition data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpDisposition(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpDisposition(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Object> encode(AmqpNull data) throws AmqpEncodingError;
+
+    public Encoded<Object> decodeAmqpNull(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Object> unmarshalAmqpNull(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpCompleted data) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpCompleted(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpCompleted(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpXid data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpXid(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpXid(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpList data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpList(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpList(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Integer> encode(AmqpUshort data) throws AmqpEncodingError;
+
+    public Encoded<Integer> decodeAmqpUshort(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Integer> unmarshalAmqpUshort(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpFooter data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpFooter(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpFooter(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpSource data) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpSource(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpSource(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpSaslChallenge data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpSaslChallenge(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpSaslChallenge(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<IAmqpList> encode(AmqpAttach data) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> decodeAmqpAttach(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<IAmqpList> unmarshalAmqpAttach(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<String> encode(AmqpString data) throws AmqpEncodingError;
+
+    public Encoded<String> decodeAmqpString(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<String> unmarshalAmqpString(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpTarget data) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpTarget(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpTarget(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Short> encode(AmqpUbyte data) throws AmqpEncodingError;
+
+    public Encoded<Short> decodeAmqpUbyte(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Short> unmarshalAmqpUbyte(DataInput in) throws IOException, AmqpEncodingError;
+
+    public Encoded<Long> encode(AmqpUint data) throws AmqpEncodingError;
+
+    public Encoded<Long> decodeAmqpUint(Buffer source, int offset) throws AmqpEncodingError;
+
+    public Encoded<Long> unmarshalAmqpUint(DataInput in) throws IOException, AmqpEncodingError;
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpVersion.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpVersion.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpVersion.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpVersion.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.marshaller;
+
+import org.apache.activemq.amqp.protocol.BitUtils;
+
+public class AmqpVersion {
+
+    private static final short PROTOCOL_ID = 0;
+    public static final byte[] MAGIC = new byte[] { 'A', 'M', 'Q', 'P', PROTOCOL_ID };
+
+    private final short major;
+    private final short minor;
+    private final short revision;
+
+    private final int hashCode;
+    
+    public AmqpVersion(short major, short minor, short revision) {
+        this.major = major;
+        this.minor = minor;
+        this.revision = revision;
+        this.hashCode = BitUtils.getInt(new byte[] { PROTOCOL_ID, (byte) (major & 0xFF), (byte) (minor & 0xFF), (byte) (revision & 0xFF) }, 0);
+    }
+
+    public short getProtocolId() {
+        return PROTOCOL_ID;
+    }
+
+    public short getMajor() {
+        return major;
+    }
+
+    public short getMinor() {
+        return minor;
+    }
+
+    public short getRevision() {
+        return revision;
+    }
+    
+    public int hashCode() {
+        return hashCode;
+    }
+
+    public boolean equals(Object o) {
+        if (o.hashCode() != hashCode) {
+            return false;
+        } else {
+            return o instanceof AmqpVersion;
+        }
+    }
+
+    public boolean equals(AmqpVersion version) {
+        return version.hashCode == hashCode;
+    }
+}



Mime
View raw message