Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 41869 invoked from network); 11 Feb 2010 07:05:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Feb 2010 07:05:22 -0000 Received: (qmail 77979 invoked by uid 500); 11 Feb 2010 07:05:22 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 77927 invoked by uid 500); 11 Feb 2010 07:05:22 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 77918 invoked by uid 99); 11 Feb 2010 07:05:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 07:05:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2010 07:05:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 896C823888CC; Thu, 11 Feb 2010 07:04:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@activemq.apache.org From: cmacnaug@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100211070453.896C823888CC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 @@ + + + activemq-parent + org.apache.activemq + 6.0-SNAPSHOT + + 4.0.0 + org.apache.activemq + activemq-amqp + activemq-amqp + 6.0-SNAPSHOT + http://maven.apache.org + + + + org.apache.activemq + activemq-broker + + + org.apache.activemq + activemq-transport + + + org.apache.activemq + activemq-bio + + + org.apache.activemq + activemq-util + 6.0-SNAPSHOT + + + + + org.apache.activemq + activemq-broker + ${activemq-version} + test-jar + test + + + org.apache.activemq + activemq-util + ${activemq-version} + test-jar + test + + + junit + junit + test + + + log4j + log4j + test + + + + + junit + junit + 3.8.1 + test + + + \ 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 asType(Class 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; + +/** + *

+ * Frames are divided into two distinct areas: a fixed width frame header, and a + * variable width frame body. + *

+ *

+ * + *

+ *
+ *
frame header
+ *
+ *

+ * 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. + *

+ *
+ *
frame body
+ *
+ *

+ * 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. + *

+ *
+ *
+ *

+ * Frame Header + *

+ * 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. + *

+ *

+ * + *

+ *      +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
+ *      |                    ...                    |  |
+ *      +-------------------------------------------+ -'
+ * 
+ * + *

+ *
+ *
size
+ *
+ *

+ * 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). + *

+ *
+ *
type
+ *
+ *

+ * 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. + *

+ *
+ *
flags
+ *
+ *

+ * Byte 5 of the frame header is reserved for frame flags. The semantics of the + * frame flags are determined by the frame type. + *

+ *
+ *
channel
+ *
+ *

+ * 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. + *

+ *
+ *
+ * + * Frame Body + *

+ * 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 . 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 ). The complete set of + * compound type definitions for the core AMQP protocol commands and controls + * are defined in the "commands"and "controls" sections respectively. + *

+ */ + +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 + *

+ * The standard AMQP port number that has been assigned by IANA for TCP, UDP, and SCTP. + *

+ *

+ * There is currently no UDP mapping defined for AMQP. The UDP port number is reserved for + * future transport mappings. + *

+ */ + 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 + *

+ * 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. + *

+ */ + 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 encode(AmqpSessionError data) throws AmqpEncodingError; + + public Encoded decodeAmqpSessionError(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSessionError(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpChar data) throws AmqpEncodingError; + + public Encoded decodeAmqpChar(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpChar(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpUnlink data) throws AmqpEncodingError; + + public Encoded decodeAmqpUnlink(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpUnlink(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpFlow data) throws AmqpEncodingError; + + public Encoded decodeAmqpFlow(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpFlow(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpLong data) throws AmqpEncodingError; + + public Encoded decodeAmqpLong(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpLong(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpFloat data) throws AmqpEncodingError; + + public Encoded decodeAmqpFloat(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpFloat(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpRelink data) throws AmqpEncodingError; + + public Encoded decodeAmqpRelink(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpRelink(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpClose data) throws AmqpEncodingError; + + public Encoded decodeAmqpClose(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpClose(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpOpen data) throws AmqpEncodingError; + + public Encoded decodeAmqpOpen(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpOpen(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpByte data) throws AmqpEncodingError; + + public Encoded decodeAmqpByte(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpByte(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded, AmqpType>> encode(AmqpRejected data) throws AmqpEncodingError; + + public Encoded, AmqpType>> decodeAmqpRejected(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded, AmqpType>> unmarshalAmqpRejected(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpSaslOutcome data) throws AmqpEncodingError; + + public Encoded decodeAmqpSaslOutcome(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSaslOutcome(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpBoolean data) throws AmqpEncodingError; + + public Encoded decodeAmqpBoolean(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpBoolean(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpUlong data) throws AmqpEncodingError; + + public Encoded decodeAmqpUlong(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpUlong(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpTransfer data) throws AmqpEncodingError; + + public Encoded decodeAmqpTransfer(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpTransfer(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpDetach data) throws AmqpEncodingError; + + public Encoded decodeAmqpDetach(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpDetach(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpSymbol data) throws AmqpEncodingError; + + public Encoded decodeAmqpSymbol(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSymbol(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpSaslInit data) throws AmqpEncodingError; + + public Encoded decodeAmqpSaslInit(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSaslInit(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpInt data) throws AmqpEncodingError; + + public Encoded decodeAmqpInt(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpInt(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpEnlist data) throws AmqpEncodingError; + + public Encoded decodeAmqpEnlist(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpEnlist(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpProperties data) throws AmqpEncodingError; + + public Encoded decodeAmqpProperties(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpProperties(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpDouble data) throws AmqpEncodingError; + + public Encoded decodeAmqpDouble(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpDouble(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpDrain data) throws AmqpEncodingError; + + public Encoded decodeAmqpDrain(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpDrain(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpHeader data) throws AmqpEncodingError; + + public Encoded decodeAmqpHeader(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpHeader(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpSaslMechanisms data) throws AmqpEncodingError; + + public Encoded decodeAmqpSaslMechanisms(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSaslMechanisms(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpUuid data) throws AmqpEncodingError; + + public Encoded decodeAmqpUuid(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpUuid(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpBar data) throws AmqpEncodingError; + + public Encoded decodeAmqpBar(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpBar(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpFilter data) throws AmqpEncodingError; + + public Encoded decodeAmqpFilter(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpFilter(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpBinary data) throws AmqpEncodingError; + + public Encoded decodeAmqpBinary(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpBinary(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpNoop data) throws AmqpEncodingError; + + public Encoded decodeAmqpNoop(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpNoop(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpLink data) throws AmqpEncodingError; + + public Encoded decodeAmqpLink(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpLink(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpTimestamp data) throws AmqpEncodingError; + + public Encoded decodeAmqpTimestamp(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpTimestamp(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpShort data) throws AmqpEncodingError; + + public Encoded decodeAmqpShort(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpShort(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded, AmqpType>> encode(AmqpReleased data) throws AmqpEncodingError; + + public Encoded, AmqpType>> decodeAmqpReleased(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded, AmqpType>> unmarshalAmqpReleased(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpTxn data) throws AmqpEncodingError; + + public Encoded decodeAmqpTxn(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpTxn(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded, AmqpType>> encode(AmqpMap data) throws AmqpEncodingError; + + public Encoded, AmqpType>> decodeAmqpMap(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded, AmqpType>> unmarshalAmqpMap(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpLinkError data) throws AmqpEncodingError; + + public Encoded decodeAmqpLinkError(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpLinkError(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpConnectionError data) throws AmqpEncodingError; + + public Encoded decodeAmqpConnectionError(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpConnectionError(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpSaslResponse data) throws AmqpEncodingError; + + public Encoded decodeAmqpSaslResponse(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSaslResponse(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpFragment data) throws AmqpEncodingError; + + public Encoded decodeAmqpFragment(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpFragment(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpDisposition data) throws AmqpEncodingError; + + public Encoded decodeAmqpDisposition(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpDisposition(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpNull data) throws AmqpEncodingError; + + public Encoded decodeAmqpNull(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpNull(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded, AmqpType>> encode(AmqpCompleted data) throws AmqpEncodingError; + + public Encoded, AmqpType>> decodeAmqpCompleted(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded, AmqpType>> unmarshalAmqpCompleted(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpXid data) throws AmqpEncodingError; + + public Encoded decodeAmqpXid(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpXid(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpList data) throws AmqpEncodingError; + + public Encoded decodeAmqpList(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpList(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpUshort data) throws AmqpEncodingError; + + public Encoded decodeAmqpUshort(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpUshort(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpFooter data) throws AmqpEncodingError; + + public Encoded decodeAmqpFooter(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpFooter(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded, AmqpType>> encode(AmqpSource data) throws AmqpEncodingError; + + public Encoded, AmqpType>> decodeAmqpSource(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded, AmqpType>> unmarshalAmqpSource(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpSaslChallenge data) throws AmqpEncodingError; + + public Encoded decodeAmqpSaslChallenge(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpSaslChallenge(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpAttach data) throws AmqpEncodingError; + + public Encoded decodeAmqpAttach(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpAttach(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpString data) throws AmqpEncodingError; + + public Encoded decodeAmqpString(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpString(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded, AmqpType>> encode(AmqpTarget data) throws AmqpEncodingError; + + public Encoded, AmqpType>> decodeAmqpTarget(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded, AmqpType>> unmarshalAmqpTarget(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpUbyte data) throws AmqpEncodingError; + + public Encoded decodeAmqpUbyte(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded unmarshalAmqpUbyte(DataInput in) throws IOException, AmqpEncodingError; + + public Encoded encode(AmqpUint data) throws AmqpEncodingError; + + public Encoded decodeAmqpUint(Buffer source, int offset) throws AmqpEncodingError; + + public Encoded 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; + } +}