activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r909224 [1/9] - in /activemq/sandbox/activemq-apollo-actor/activemq-amqp/src: main/java/org/apache/activemq/amqp/protocol/marshaller/ main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/ main/java/org/apache/activemq/amqp/protocol...
Date Fri, 12 Feb 2010 04:25:28 GMT
Author: cmacnaug
Date: Fri Feb 12 04:25:25 2010
New Revision: 909224

URL: http://svn.apache.org/viewvc?rev=909224&view=rev
Log:
Regen to icorporate the following changes:
Added a TypeFactory for creating Types.
Added primitive field accessors to assist in usability. 
Updates to Map encoded types to allow copy on write checking.
Updates to equivalency checking.

Added:
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/IAmqpMap.java
    activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/TypeFactory.java
Modified:
    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/v1_0_0/AmqpCompletedMarshaller.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/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/AmqpSourceMarshaller.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/Encoder.java
    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/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/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/AmqpDisposition.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/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/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/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/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/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/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/test/java/org/apache/activemq/amqp/protocol/AmqpProtocolTest.java

Modified: 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=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/AmqpMarshaller.java Fri Feb 12 04:25:25 2010
@@ -20,7 +20,6 @@
 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;
@@ -78,6 +77,7 @@
 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.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public interface AmqpMarshaller {
@@ -151,11 +151,11 @@
 
     public Encoded<Byte> unmarshalAmqpByte(DataInput in) throws IOException, AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpRejected data) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpRejected data) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpRejected(Buffer source, int offset) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpRejected(Buffer source, int offset) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpRejected(DataInput in) throws IOException, AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpRejected(DataInput in) throws IOException, AmqpEncodingError;
 
     public Encoded<IAmqpList> encode(AmqpSaslOutcome data) throws AmqpEncodingError;
 
@@ -289,11 +289,11 @@
 
     public Encoded<Short> unmarshalAmqpShort(DataInput in) throws IOException, AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpReleased data) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpReleased data) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpReleased(Buffer source, int offset) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpReleased(Buffer source, int offset) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpReleased(DataInput in) throws IOException, AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpReleased(DataInput in) throws IOException, AmqpEncodingError;
 
     public Encoded<IAmqpList> encode(AmqpTxn data) throws AmqpEncodingError;
 
@@ -301,11 +301,11 @@
 
     public Encoded<IAmqpList> unmarshalAmqpTxn(DataInput in) throws IOException, AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpMap data) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpMap data) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpMap(Buffer source, int offset) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpMap(Buffer source, int offset) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpMap(DataInput in) throws IOException, AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpMap(DataInput in) throws IOException, AmqpEncodingError;
 
     public Encoded<IAmqpList> encode(AmqpLinkError data) throws AmqpEncodingError;
 
@@ -343,11 +343,11 @@
 
     public Encoded<Object> unmarshalAmqpNull(DataInput in) throws IOException, AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpCompleted data) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpCompleted data) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpCompleted(Buffer source, int offset) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpCompleted(Buffer source, int offset) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpCompleted(DataInput in) throws IOException, AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpCompleted(DataInput in) throws IOException, AmqpEncodingError;
 
     public Encoded<IAmqpList> encode(AmqpXid data) throws AmqpEncodingError;
 
@@ -373,11 +373,11 @@
 
     public Encoded<IAmqpList> unmarshalAmqpFooter(DataInput in) throws IOException, AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpSource data) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpSource data) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpSource(Buffer source, int offset) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpSource(Buffer source, int offset) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpSource(DataInput in) throws IOException, AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpSource(DataInput in) throws IOException, AmqpEncodingError;
 
     public Encoded<IAmqpList> encode(AmqpSaslChallenge data) throws AmqpEncodingError;
 
@@ -397,11 +397,11 @@
 
     public Encoded<String> unmarshalAmqpString(DataInput in) throws IOException, AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpTarget data) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpTarget data) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpTarget(Buffer source, int offset) throws AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpTarget(Buffer source, int offset) throws AmqpEncodingError;
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpTarget(DataInput in) throws IOException, AmqpEncodingError;
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpTarget(DataInput in) throws IOException, AmqpEncodingError;
 
     public Encoded<Short> encode(AmqpUbyte data) throws AmqpEncodingError;
 

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCompletedMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCompletedMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCompletedMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpCompletedMarshaller.java Fri Feb 12 04:25:25 2010
@@ -19,7 +19,6 @@
 import java.io.DataInput;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Map;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.Encoded;
 import org.apache.activemq.amqp.protocol.marshaller.UnexpectedTypeException;
@@ -30,12 +29,13 @@
 import org.apache.activemq.amqp.protocol.types.AmqpSymbol;
 import org.apache.activemq.amqp.protocol.types.AmqpType;
 import org.apache.activemq.amqp.protocol.types.AmqpUlong;
+import org.apache.activemq.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpCompletedMarshaller implements DescribedTypeMarshaller<AmqpCompleted>{
 
     static final AmqpCompletedMarshaller SINGLETON = new AmqpCompletedMarshaller();
-    private static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> NULL_ENCODED = new Encoder.NullEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>>();
+    private static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> NULL_ENCODED = new Encoder.NullEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>>();
 
     public static final String SYMBOLIC_ID = "amqp:completed:map";
     //Format code: 0x00000001:0x00009806:
@@ -49,32 +49,35 @@
         (byte) 0x00, (byte) 0x00, (byte) 0x98, (byte) 0x06   // DESCRIPTOR ID CODE
     }), 0);
 
-    //Accessor keys for field mapped fields:
-    private static final AmqpSymbol.AmqpSymbolBuffer TRUNCATE_KEY = new AmqpSymbol.AmqpSymbolBean("truncate").getBuffer(AmqpMarshaller.SINGLETON);
+    private static final MapDecoder<AmqpSymbol, AmqpType<?, ?>> DECODER = new MapDecoder<AmqpSymbol, AmqpType<?, ?>>() {
 
+        public IAmqpMap<AmqpSymbol, AmqpType<?, ?>> createMap(int entryCount) {
+            return new IAmqpMap.AmqpWrapperMap<AmqpSymbol, AmqpType<?,?>>(new HashMap<AmqpSymbol, AmqpType<?,?>>());
 
-    private static final MapDecoder DECODER = new MapDecoder() {
-        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError {
+        }
+
+        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(encodedKey));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(TRUNCATE_KEY.getValue())){
-                map.put(TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpCompleted.TRUNCATE_KEY)){
+                map.put(AmqpCompleted.TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
             }
         }
-        public void unmarshalToMap(DataInput in, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError, IOException {
+
+        public void unmarshalToMap(DataInput in, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws IOException, AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(in));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(TRUNCATE_KEY.getValue())){
-                map.put(TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpCompleted.TRUNCATE_KEY)){
+                map.put(AmqpCompleted.TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
@@ -82,7 +85,7 @@
         }
     };
 
-    public static class AmqpCompletedEncoded extends DescribedEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+    public static class AmqpCompletedEncoded extends DescribedEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> {
 
         public AmqpCompletedEncoded(DescribedBuffer buffer) {
             super(buffer);
@@ -100,11 +103,11 @@
             return NUMERIC_ID;
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
             return AmqpMapMarshaller.createEncoded(encoded, DECODER);
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalDescribed(DataInput in) throws IOException {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalDescribed(DataInput in) throws IOException {
             return AmqpMapMarshaller.createEncoded(in, DECODER);
         }
 
@@ -113,19 +116,19 @@
         }
     }
 
-    public static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpCompleted value) throws AmqpEncodingError {
+    public static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpCompleted value) throws AmqpEncodingError {
         return new AmqpCompletedEncoded(value);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(source, offset));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
         byte fc = buffer.getEncodingFormatCode();
         if (fc == Encoder.NULL_FORMAT_CODE) {
             return NULL_ENCODED;

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMapMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMapMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMapMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMapMarshaller.java Fri Feb 12 04:25:25 2010
@@ -19,7 +19,6 @@
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
-import java.util.HashMap;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpVersion;
 import org.apache.activemq.amqp.protocol.marshaller.Encoded;
@@ -29,12 +28,13 @@
 import org.apache.activemq.amqp.protocol.marshaller.v1_0_0.Encoder.*;
 import org.apache.activemq.amqp.protocol.types.AmqpMap;
 import org.apache.activemq.amqp.protocol.types.AmqpType;
+import org.apache.activemq.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpMapMarshaller {
 
     private static final Encoder ENCODER = Encoder.SINGLETON;
-    private static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> NULL_ENCODED = new Encoder.NullEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>>();
+    private static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> NULL_ENCODED = new Encoder.NullEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>>();
 
     public static final byte MAP8_FORMAT_CODE = (byte) 0xc1;
     public static final byte MAP32_FORMAT_CODE = (byte) 0xd1;
@@ -86,7 +86,7 @@
             }
             }
         }
-        static final AmqpMapEncoded createEncoded(byte formatCode, HashMap<AmqpType<?,?>, AmqpType<?,?>> value) throws AmqpEncodingError {
+        static final AmqpMapEncoded createEncoded(byte formatCode, IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> value) throws AmqpEncodingError {
             switch(formatCode) {
             case MAP8_FORMAT_CODE: {
                 return new AmqpMapMap8Encoded(value);
@@ -100,14 +100,14 @@
             }
         }
     }
-    public static abstract class AmqpMapEncoded extends AbstractEncoded <HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+    public static abstract class AmqpMapEncoded extends AbstractEncoded <IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> {
         MapDecoder decoder = Encoder.DEFAULT_MAP_DECODER;
 
         public AmqpMapEncoded(EncodedBuffer encoded) {
             super(encoded);
         }
 
-        public AmqpMapEncoded(byte formatCode, HashMap<AmqpType<?,?>, AmqpType<?,?>> value) throws AmqpEncodingError {
+        public AmqpMapEncoded(byte formatCode, IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> value) throws AmqpEncodingError {
             super(formatCode, value);
         }
 
@@ -126,7 +126,7 @@
             super(encoded);
         }
 
-        public AmqpMapMap8Encoded(HashMap<AmqpType<?,?>, AmqpType<?,?>> value) throws AmqpEncodingError {
+        public AmqpMapMap8Encoded(IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> value) throws AmqpEncodingError {
             super(MAP_ENCODING.MAP8.FORMAT_CODE, value);
         }
 
@@ -138,11 +138,11 @@
             return ENCODER.getEncodedCountOfMap(value, encoding);
         }
 
-        public final void encode(HashMap<AmqpType<?,?>, AmqpType<?,?>> value, Buffer encoded, int offset) throws AmqpEncodingError {
+        public final void encode(IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> value, Buffer encoded, int offset) throws AmqpEncodingError {
             ENCODER.encodeMapMap8(value, encoded, offset);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> decode(EncodedBuffer encoded) throws AmqpEncodingError {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> decode(EncodedBuffer encoded) throws AmqpEncodingError {
             return ENCODER.decodeMapMap8(encoded.getBuffer(), encoded.getDataOffset(), encoded.getDataCount(), encoded.getDataSize(), decoder);
         }
 
@@ -150,7 +150,7 @@
             ENCODER.writeMapMap8(value, out);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> unmarshalData(DataInput in) throws IOException {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> unmarshalData(DataInput in) throws IOException {
             return ENCODER.readMapMap8(getDataCount(), getDataSize(), in, decoder);
         }
     }
@@ -165,7 +165,7 @@
             super(encoded);
         }
 
-        public AmqpMapMap32Encoded(HashMap<AmqpType<?,?>, AmqpType<?,?>> value) throws AmqpEncodingError {
+        public AmqpMapMap32Encoded(IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> value) throws AmqpEncodingError {
             super(MAP_ENCODING.MAP32.FORMAT_CODE, value);
         }
 
@@ -177,11 +177,11 @@
             return ENCODER.getEncodedCountOfMap(value, encoding);
         }
 
-        public final void encode(HashMap<AmqpType<?,?>, AmqpType<?,?>> value, Buffer encoded, int offset) throws AmqpEncodingError {
+        public final void encode(IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> value, Buffer encoded, int offset) throws AmqpEncodingError {
             ENCODER.encodeMapMap32(value, encoded, offset);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> decode(EncodedBuffer encoded) throws AmqpEncodingError {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> decode(EncodedBuffer encoded) throws AmqpEncodingError {
             return ENCODER.decodeMapMap32(encoded.getBuffer(), encoded.getDataOffset(), encoded.getDataCount(), encoded.getDataSize(), decoder);
         }
 
@@ -189,7 +189,7 @@
             ENCODER.writeMapMap32(value, out);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> unmarshalData(DataInput in) throws IOException {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> unmarshalData(DataInput in) throws IOException {
             return ENCODER.readMapMap32(getDataCount(), getDataSize(), in, decoder);
         }
     }
@@ -199,41 +199,41 @@
         return Encoder.chooseMapEncoding(val.getValue());
     }
 
-    private static final MAP_ENCODING chooseEncoding(HashMap<AmqpType<?,?>, AmqpType<?,?>> val) throws AmqpEncodingError {
+    private static final MAP_ENCODING chooseEncoding(IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> val) throws AmqpEncodingError {
         return Encoder.chooseMapEncoding(val);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpMap data) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpMap data) throws AmqpEncodingError {
         if(data == null) {
             return NULL_ENCODED;
         }
         return MAP_ENCODING.createEncoded(chooseEncoding(data).FORMAT_CODE, data.getValue());
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(source, offset));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(HashMap<AmqpType<?,?>, AmqpType<?,?>> val) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> val) throws AmqpEncodingError {
         return MAP_ENCODING.createEncoded(chooseEncoding(val).FORMAT_CODE, val);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
         if(buffer.getEncodingFormatCode() == AmqpNullMarshaller.FORMAT_CODE) {
             return NULL_ENCODED;
         }
         return MAP_ENCODING.createEncoded(buffer);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in, MapDecoder decoder) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in, MapDecoder decoder) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in), decoder);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer, MapDecoder decoder) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer, MapDecoder decoder) throws AmqpEncodingError {
         if(buffer.getEncodingFormatCode() == AmqpNullMarshaller.FORMAT_CODE) {
             return NULL_ENCODED;
         }

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpMarshaller.java Fri Feb 12 04:25:25 2010
@@ -82,6 +82,7 @@
 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.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpMarshaller implements org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller {
@@ -444,15 +445,15 @@
         return AmqpByteMarshaller.createEncoded(in);
     }
 
-    public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpRejected data) throws AmqpEncodingError {
+    public final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpRejected data) throws AmqpEncodingError {
         return AmqpRejectedMarshaller.encode(data);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpRejected(Buffer source, int offset) throws AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpRejected(Buffer source, int offset) throws AmqpEncodingError {
         return AmqpRejectedMarshaller.createEncoded(source, offset);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpRejected(DataInput in) throws IOException, AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpRejected(DataInput in) throws IOException, AmqpEncodingError {
         return AmqpRejectedMarshaller.createEncoded(in);
     }
 
@@ -720,15 +721,15 @@
         return AmqpShortMarshaller.createEncoded(in);
     }
 
-    public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpReleased data) throws AmqpEncodingError {
+    public final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpReleased data) throws AmqpEncodingError {
         return AmqpReleasedMarshaller.encode(data);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpReleased(Buffer source, int offset) throws AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpReleased(Buffer source, int offset) throws AmqpEncodingError {
         return AmqpReleasedMarshaller.createEncoded(source, offset);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpReleased(DataInput in) throws IOException, AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpReleased(DataInput in) throws IOException, AmqpEncodingError {
         return AmqpReleasedMarshaller.createEncoded(in);
     }
 
@@ -744,15 +745,15 @@
         return AmqpTxnMarshaller.createEncoded(in);
     }
 
-    public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpMap data) throws AmqpEncodingError {
+    public final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpMap data) throws AmqpEncodingError {
         return AmqpMapMarshaller.encode(data);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpMap(Buffer source, int offset) throws AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpMap(Buffer source, int offset) throws AmqpEncodingError {
         return AmqpMapMarshaller.createEncoded(source, offset);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpMap(DataInput in) throws IOException, AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpMap(DataInput in) throws IOException, AmqpEncodingError {
         return AmqpMapMarshaller.createEncoded(in);
     }
 
@@ -828,15 +829,15 @@
         return AmqpNullMarshaller.createEncoded(in);
     }
 
-    public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpCompleted data) throws AmqpEncodingError {
+    public final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpCompleted data) throws AmqpEncodingError {
         return AmqpCompletedMarshaller.encode(data);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpCompleted(Buffer source, int offset) throws AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpCompleted(Buffer source, int offset) throws AmqpEncodingError {
         return AmqpCompletedMarshaller.createEncoded(source, offset);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpCompleted(DataInput in) throws IOException, AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpCompleted(DataInput in) throws IOException, AmqpEncodingError {
         return AmqpCompletedMarshaller.createEncoded(in);
     }
 
@@ -888,15 +889,15 @@
         return AmqpFooterMarshaller.createEncoded(in);
     }
 
-    public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpSource data) throws AmqpEncodingError {
+    public final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpSource data) throws AmqpEncodingError {
         return AmqpSourceMarshaller.encode(data);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpSource(Buffer source, int offset) throws AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpSource(Buffer source, int offset) throws AmqpEncodingError {
         return AmqpSourceMarshaller.createEncoded(source, offset);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpSource(DataInput in) throws IOException, AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpSource(DataInput in) throws IOException, AmqpEncodingError {
         return AmqpSourceMarshaller.createEncoded(in);
     }
 
@@ -936,15 +937,15 @@
         return AmqpStringMarshaller.createEncoded(in);
     }
 
-    public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpTarget data) throws AmqpEncodingError {
+    public final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpTarget data) throws AmqpEncodingError {
         return AmqpTargetMarshaller.encode(data);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeAmqpTarget(Buffer source, int offset) throws AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeAmqpTarget(Buffer source, int offset) throws AmqpEncodingError {
         return AmqpTargetMarshaller.createEncoded(source, offset);
     }
 
-    public Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalAmqpTarget(DataInput in) throws IOException, AmqpEncodingError {
+    public Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalAmqpTarget(DataInput in) throws IOException, AmqpEncodingError {
         return AmqpTargetMarshaller.createEncoded(in);
     }
 

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpRejectedMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpRejectedMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpRejectedMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpRejectedMarshaller.java Fri Feb 12 04:25:25 2010
@@ -19,7 +19,6 @@
 import java.io.DataInput;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Map;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.Encoded;
 import org.apache.activemq.amqp.protocol.marshaller.UnexpectedTypeException;
@@ -31,12 +30,13 @@
 import org.apache.activemq.amqp.protocol.types.AmqpSymbol;
 import org.apache.activemq.amqp.protocol.types.AmqpType;
 import org.apache.activemq.amqp.protocol.types.AmqpUlong;
+import org.apache.activemq.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpRejectedMarshaller implements DescribedTypeMarshaller<AmqpRejected>{
 
     static final AmqpRejectedMarshaller SINGLETON = new AmqpRejectedMarshaller();
-    private static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> NULL_ENCODED = new Encoder.NullEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>>();
+    private static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> NULL_ENCODED = new Encoder.NullEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>>();
 
     public static final String SYMBOLIC_ID = "amqp:rejected:map";
     //Format code: 0x00000001:0x00009805:
@@ -50,39 +50,41 @@
         (byte) 0x00, (byte) 0x00, (byte) 0x98, (byte) 0x05   // DESCRIPTOR ID CODE
     }), 0);
 
-    //Accessor keys for field mapped fields:
-    private static final AmqpSymbol.AmqpSymbolBuffer TRUNCATE_KEY = new AmqpSymbol.AmqpSymbolBean("truncate").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer REJECT_PROPERTIES_KEY = new AmqpSymbol.AmqpSymbolBean("reject-properties").getBuffer(AmqpMarshaller.SINGLETON);
+    private static final MapDecoder<AmqpSymbol, AmqpType<?, ?>> DECODER = new MapDecoder<AmqpSymbol, AmqpType<?, ?>>() {
 
+        public IAmqpMap<AmqpSymbol, AmqpType<?, ?>> createMap(int entryCount) {
+            return new IAmqpMap.AmqpWrapperMap<AmqpSymbol, AmqpType<?,?>>(new HashMap<AmqpSymbol, AmqpType<?,?>>());
 
-    private static final MapDecoder DECODER = new MapDecoder() {
-        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError {
+        }
+
+        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(encodedKey));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(TRUNCATE_KEY.getValue())){
-                map.put(TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpRejected.TRUNCATE_KEY)){
+                map.put(AmqpRejected.TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(REJECT_PROPERTIES_KEY.getValue())){
-                map.put(REJECT_PROPERTIES_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpRejected.REJECT_PROPERTIES_KEY)){
+                map.put(AmqpRejected.REJECT_PROPERTIES_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
             }
         }
-        public void unmarshalToMap(DataInput in, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError, IOException {
+
+        public void unmarshalToMap(DataInput in, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws IOException, AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(in));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(TRUNCATE_KEY.getValue())){
-                map.put(TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpRejected.TRUNCATE_KEY)){
+                map.put(AmqpRejected.TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(REJECT_PROPERTIES_KEY.getValue())){
-                map.put(REJECT_PROPERTIES_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(in)));
+            if (key.equals(AmqpRejected.REJECT_PROPERTIES_KEY)){
+                map.put(AmqpRejected.REJECT_PROPERTIES_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(in)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
@@ -90,7 +92,7 @@
         }
     };
 
-    public static class AmqpRejectedEncoded extends DescribedEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+    public static class AmqpRejectedEncoded extends DescribedEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> {
 
         public AmqpRejectedEncoded(DescribedBuffer buffer) {
             super(buffer);
@@ -108,11 +110,11 @@
             return NUMERIC_ID;
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
             return AmqpMapMarshaller.createEncoded(encoded, DECODER);
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalDescribed(DataInput in) throws IOException {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalDescribed(DataInput in) throws IOException {
             return AmqpMapMarshaller.createEncoded(in, DECODER);
         }
 
@@ -121,19 +123,19 @@
         }
     }
 
-    public static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpRejected value) throws AmqpEncodingError {
+    public static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpRejected value) throws AmqpEncodingError {
         return new AmqpRejectedEncoded(value);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(source, offset));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
         byte fc = buffer.getEncodingFormatCode();
         if (fc == Encoder.NULL_FORMAT_CODE) {
             return NULL_ENCODED;

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpReleasedMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpReleasedMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpReleasedMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpReleasedMarshaller.java Fri Feb 12 04:25:25 2010
@@ -19,7 +19,6 @@
 import java.io.DataInput;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Map;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.Encoded;
 import org.apache.activemq.amqp.protocol.marshaller.UnexpectedTypeException;
@@ -31,12 +30,13 @@
 import org.apache.activemq.amqp.protocol.types.AmqpSymbol;
 import org.apache.activemq.amqp.protocol.types.AmqpType;
 import org.apache.activemq.amqp.protocol.types.AmqpUlong;
+import org.apache.activemq.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpReleasedMarshaller implements DescribedTypeMarshaller<AmqpReleased>{
 
     static final AmqpReleasedMarshaller SINGLETON = new AmqpReleasedMarshaller();
-    private static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> NULL_ENCODED = new Encoder.NullEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>>();
+    private static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> NULL_ENCODED = new Encoder.NullEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>>();
 
     public static final String SYMBOLIC_ID = "amqp:released:map";
     //Format code: 0x00000001:0x00009804:
@@ -50,60 +50,59 @@
         (byte) 0x00, (byte) 0x00, (byte) 0x98, (byte) 0x04   // DESCRIPTOR ID CODE
     }), 0);
 
-    //Accessor keys for field mapped fields:
-    private static final AmqpSymbol.AmqpSymbolBuffer TRUNCATE_KEY = new AmqpSymbol.AmqpSymbolBean("truncate").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer DELIVERY_FAILED_KEY = new AmqpSymbol.AmqpSymbolBean("delivery-failed").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer DELIVER_ELSEWHERE_KEY = new AmqpSymbol.AmqpSymbolBean("deliver-elsewhere").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer MESSAGE_ATTRS_KEY = new AmqpSymbol.AmqpSymbolBean("message-attrs").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer DELIVERY_ATTRS_KEY = new AmqpSymbol.AmqpSymbolBean("delivery-attrs").getBuffer(AmqpMarshaller.SINGLETON);
+    private static final MapDecoder<AmqpSymbol, AmqpType<?, ?>> DECODER = new MapDecoder<AmqpSymbol, AmqpType<?, ?>>() {
 
+        public IAmqpMap<AmqpSymbol, AmqpType<?, ?>> createMap(int entryCount) {
+            return new IAmqpMap.AmqpWrapperMap<AmqpSymbol, AmqpType<?,?>>(new HashMap<AmqpSymbol, AmqpType<?,?>>());
 
-    private static final MapDecoder DECODER = new MapDecoder() {
-        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError {
+        }
+
+        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(encodedKey));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(TRUNCATE_KEY.getValue())){
-                map.put(TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpReleased.TRUNCATE_KEY)){
+                map.put(AmqpReleased.TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(DELIVERY_FAILED_KEY.getValue())){
-                map.put(DELIVERY_FAILED_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpReleased.DELIVERY_FAILED_KEY)){
+                map.put(AmqpReleased.DELIVERY_FAILED_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(DELIVER_ELSEWHERE_KEY.getValue())){
-                map.put(DELIVER_ELSEWHERE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpReleased.DELIVER_ELSEWHERE_KEY)){
+                map.put(AmqpReleased.DELIVER_ELSEWHERE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(MESSAGE_ATTRS_KEY.getValue())){
-                map.put(MESSAGE_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpReleased.MESSAGE_ATTRS_KEY)){
+                map.put(AmqpReleased.MESSAGE_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(DELIVERY_ATTRS_KEY.getValue())){
-                map.put(DELIVERY_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpReleased.DELIVERY_ATTRS_KEY)){
+                map.put(AmqpReleased.DELIVERY_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
             }
         }
-        public void unmarshalToMap(DataInput in, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError, IOException {
+
+        public void unmarshalToMap(DataInput in, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws IOException, AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(in));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(TRUNCATE_KEY.getValue())){
-                map.put(TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpReleased.TRUNCATE_KEY)){
+                map.put(AmqpReleased.TRUNCATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(DELIVERY_FAILED_KEY.getValue())){
-                map.put(DELIVERY_FAILED_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpReleased.DELIVERY_FAILED_KEY)){
+                map.put(AmqpReleased.DELIVERY_FAILED_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(DELIVER_ELSEWHERE_KEY.getValue())){
-                map.put(DELIVER_ELSEWHERE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpReleased.DELIVER_ELSEWHERE_KEY)){
+                map.put(AmqpReleased.DELIVER_ELSEWHERE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(MESSAGE_ATTRS_KEY.getValue())){
-                map.put(MESSAGE_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(in)));
+            if (key.equals(AmqpReleased.MESSAGE_ATTRS_KEY)){
+                map.put(AmqpReleased.MESSAGE_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(DELIVERY_ATTRS_KEY.getValue())){
-                map.put(DELIVERY_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(in)));
+            if (key.equals(AmqpReleased.DELIVERY_ATTRS_KEY)){
+                map.put(AmqpReleased.DELIVERY_ATTRS_KEY, AmqpMessageAttributes.AmqpMessageAttributesBuffer.create(AmqpMapMarshaller.createEncoded(in)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
@@ -111,7 +110,7 @@
         }
     };
 
-    public static class AmqpReleasedEncoded extends DescribedEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+    public static class AmqpReleasedEncoded extends DescribedEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> {
 
         public AmqpReleasedEncoded(DescribedBuffer buffer) {
             super(buffer);
@@ -129,11 +128,11 @@
             return NUMERIC_ID;
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
             return AmqpMapMarshaller.createEncoded(encoded, DECODER);
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalDescribed(DataInput in) throws IOException {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalDescribed(DataInput in) throws IOException {
             return AmqpMapMarshaller.createEncoded(in, DECODER);
         }
 
@@ -142,19 +141,19 @@
         }
     }
 
-    public static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpReleased value) throws AmqpEncodingError {
+    public static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpReleased value) throws AmqpEncodingError {
         return new AmqpReleasedEncoded(value);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(source, offset));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
         byte fc = buffer.getEncodingFormatCode();
         if (fc == Encoder.NULL_FORMAT_CODE) {
             return NULL_ENCODED;

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSourceMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSourceMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSourceMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpSourceMarshaller.java Fri Feb 12 04:25:25 2010
@@ -19,7 +19,6 @@
 import java.io.DataInput;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Map;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.Encoded;
 import org.apache.activemq.amqp.protocol.marshaller.UnexpectedTypeException;
@@ -35,12 +34,13 @@
 import org.apache.activemq.amqp.protocol.types.AmqpType;
 import org.apache.activemq.amqp.protocol.types.AmqpUint;
 import org.apache.activemq.amqp.protocol.types.AmqpUlong;
+import org.apache.activemq.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpSourceMarshaller implements DescribedTypeMarshaller<AmqpSource>{
 
     static final AmqpSourceMarshaller SINGLETON = new AmqpSourceMarshaller();
-    private static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> NULL_ENCODED = new Encoder.NullEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>>();
+    private static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> NULL_ENCODED = new Encoder.NullEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>>();
 
     public static final String SYMBOLIC_ID = "amqp:source:map";
     //Format code: 0x00000001:0x00009701:
@@ -54,74 +54,71 @@
         (byte) 0x00, (byte) 0x00, (byte) 0x97, (byte) 0x01   // DESCRIPTOR ID CODE
     }), 0);
 
-    //Accessor keys for field mapped fields:
-    private static final AmqpSymbol.AmqpSymbolBuffer ADDRESS_KEY = new AmqpSymbol.AmqpSymbolBean("address").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer CREATE_KEY = new AmqpSymbol.AmqpSymbolBean("create").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer TIMEOUT_KEY = new AmqpSymbol.AmqpSymbolBean("timeout").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer DISTRIBUTION_MODE_KEY = new AmqpSymbol.AmqpSymbolBean("distribution-mode").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer FILTER_KEY = new AmqpSymbol.AmqpSymbolBean("filter").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer MESSAGE_STATES_KEY = new AmqpSymbol.AmqpSymbolBean("message-states").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer ORPHAN_DISPOSITION_KEY = new AmqpSymbol.AmqpSymbolBean("orphan-disposition").getBuffer(AmqpMarshaller.SINGLETON);
+    private static final MapDecoder<AmqpSymbol, AmqpType<?, ?>> DECODER = new MapDecoder<AmqpSymbol, AmqpType<?, ?>>() {
 
+        public IAmqpMap<AmqpSymbol, AmqpType<?, ?>> createMap(int entryCount) {
+            return new IAmqpMap.AmqpWrapperMap<AmqpSymbol, AmqpType<?,?>>(new HashMap<AmqpSymbol, AmqpType<?,?>>());
 
-    private static final MapDecoder DECODER = new MapDecoder() {
-        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError {
+        }
+
+        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(encodedKey));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(ADDRESS_KEY.getValue())){
-                map.put(ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.ADDRESS_KEY)){
+                map.put(AmqpSource.ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(CREATE_KEY.getValue())){
-                map.put(CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.CREATE_KEY)){
+                map.put(AmqpSource.CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(TIMEOUT_KEY.getValue())){
-                map.put(TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.TIMEOUT_KEY)){
+                map.put(AmqpSource.TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(DISTRIBUTION_MODE_KEY.getValue())){
-                map.put(DISTRIBUTION_MODE_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.DISTRIBUTION_MODE_KEY)){
+                map.put(AmqpSource.DISTRIBUTION_MODE_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(FILTER_KEY.getValue())){
-                map.put(FILTER_KEY, AmqpFilterSet.AmqpFilterSetBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.FILTER_KEY)){
+                map.put(AmqpSource.FILTER_KEY, AmqpFilterSet.AmqpFilterSetBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(MESSAGE_STATES_KEY.getValue())){
-                map.put(MESSAGE_STATES_KEY, AmqpList.AmqpListBuffer.create(AmqpListMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.MESSAGE_STATES_KEY)){
+                map.put(AmqpSource.MESSAGE_STATES_KEY, AmqpList.AmqpListBuffer.create(AmqpListMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(ORPHAN_DISPOSITION_KEY.getValue())){
-                map.put(ORPHAN_DISPOSITION_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpSource.ORPHAN_DISPOSITION_KEY)){
+                map.put(AmqpSource.ORPHAN_DISPOSITION_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(encodedValue)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
             }
         }
-        public void unmarshalToMap(DataInput in, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError, IOException {
+
+        public void unmarshalToMap(DataInput in, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws IOException, AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(in));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(ADDRESS_KEY.getValue())){
-                map.put(ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.ADDRESS_KEY)){
+                map.put(AmqpSource.ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(CREATE_KEY.getValue())){
-                map.put(CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.CREATE_KEY)){
+                map.put(AmqpSource.CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(TIMEOUT_KEY.getValue())){
-                map.put(TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.TIMEOUT_KEY)){
+                map.put(AmqpSource.TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(DISTRIBUTION_MODE_KEY.getValue())){
-                map.put(DISTRIBUTION_MODE_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.DISTRIBUTION_MODE_KEY)){
+                map.put(AmqpSource.DISTRIBUTION_MODE_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(FILTER_KEY.getValue())){
-                map.put(FILTER_KEY, AmqpFilterSet.AmqpFilterSetBuffer.create(AmqpMapMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.FILTER_KEY)){
+                map.put(AmqpSource.FILTER_KEY, AmqpFilterSet.AmqpFilterSetBuffer.create(AmqpMapMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(MESSAGE_STATES_KEY.getValue())){
-                map.put(MESSAGE_STATES_KEY, AmqpList.AmqpListBuffer.create(AmqpListMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.MESSAGE_STATES_KEY)){
+                map.put(AmqpSource.MESSAGE_STATES_KEY, AmqpList.AmqpListBuffer.create(AmqpListMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(ORPHAN_DISPOSITION_KEY.getValue())){
-                map.put(ORPHAN_DISPOSITION_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(in)));
+            if (key.equals(AmqpSource.ORPHAN_DISPOSITION_KEY)){
+                map.put(AmqpSource.ORPHAN_DISPOSITION_KEY, AmqpMap.AmqpMapBuffer.create(AmqpMapMarshaller.createEncoded(in)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
@@ -129,7 +126,7 @@
         }
     };
 
-    public static class AmqpSourceEncoded extends DescribedEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+    public static class AmqpSourceEncoded extends DescribedEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> {
 
         public AmqpSourceEncoded(DescribedBuffer buffer) {
             super(buffer);
@@ -147,11 +144,11 @@
             return NUMERIC_ID;
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
             return AmqpMapMarshaller.createEncoded(encoded, DECODER);
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalDescribed(DataInput in) throws IOException {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalDescribed(DataInput in) throws IOException {
             return AmqpMapMarshaller.createEncoded(in, DECODER);
         }
 
@@ -160,19 +157,19 @@
         }
     }
 
-    public static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpSource value) throws AmqpEncodingError {
+    public static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpSource value) throws AmqpEncodingError {
         return new AmqpSourceEncoded(value);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(source, offset));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
         byte fc = buffer.getEncodingFormatCode();
         if (fc == Encoder.NULL_FORMAT_CODE) {
             return NULL_ENCODED;

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTargetMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTargetMarshaller.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTargetMarshaller.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/marshaller/v1_0_0/AmqpTargetMarshaller.java Fri Feb 12 04:25:25 2010
@@ -19,7 +19,6 @@
 import java.io.DataInput;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.Map;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.Encoded;
 import org.apache.activemq.amqp.protocol.marshaller.UnexpectedTypeException;
@@ -32,12 +31,13 @@
 import org.apache.activemq.amqp.protocol.types.AmqpType;
 import org.apache.activemq.amqp.protocol.types.AmqpUint;
 import org.apache.activemq.amqp.protocol.types.AmqpUlong;
+import org.apache.activemq.amqp.protocol.types.IAmqpMap;
 import org.apache.activemq.util.buffer.Buffer;
 
 public class AmqpTargetMarshaller implements DescribedTypeMarshaller<AmqpTarget>{
 
     static final AmqpTargetMarshaller SINGLETON = new AmqpTargetMarshaller();
-    private static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> NULL_ENCODED = new Encoder.NullEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>>();
+    private static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> NULL_ENCODED = new Encoder.NullEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>>();
 
     public static final String SYMBOLIC_ID = "amqp:target:map";
     //Format code: 0x00000001:0x00009702:
@@ -51,46 +51,47 @@
         (byte) 0x00, (byte) 0x00, (byte) 0x97, (byte) 0x02   // DESCRIPTOR ID CODE
     }), 0);
 
-    //Accessor keys for field mapped fields:
-    private static final AmqpSymbol.AmqpSymbolBuffer ADDRESS_KEY = new AmqpSymbol.AmqpSymbolBean("address").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer CREATE_KEY = new AmqpSymbol.AmqpSymbolBean("create").getBuffer(AmqpMarshaller.SINGLETON);
-    private static final AmqpSymbol.AmqpSymbolBuffer TIMEOUT_KEY = new AmqpSymbol.AmqpSymbolBean("timeout").getBuffer(AmqpMarshaller.SINGLETON);
+    private static final MapDecoder<AmqpSymbol, AmqpType<?, ?>> DECODER = new MapDecoder<AmqpSymbol, AmqpType<?, ?>>() {
 
+        public IAmqpMap<AmqpSymbol, AmqpType<?, ?>> createMap(int entryCount) {
+            return new IAmqpMap.AmqpWrapperMap<AmqpSymbol, AmqpType<?,?>>(new HashMap<AmqpSymbol, AmqpType<?,?>>());
 
-    private static final MapDecoder DECODER = new MapDecoder() {
-        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError {
+        }
+
+        public void decodeToMap(EncodedBuffer encodedKey, EncodedBuffer encodedValue, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(encodedKey));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(ADDRESS_KEY.getValue())){
-                map.put(ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpTarget.ADDRESS_KEY)){
+                map.put(AmqpTarget.ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(CREATE_KEY.getValue())){
-                map.put(CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpTarget.CREATE_KEY)){
+                map.put(AmqpTarget.CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(encodedValue)));
             }
-            if (key.getValue().equals(TIMEOUT_KEY.getValue())){
-                map.put(TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(encodedValue)));
+            if (key.equals(AmqpTarget.TIMEOUT_KEY)){
+                map.put(AmqpTarget.TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(encodedValue)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
             }
         }
-        public void unmarshalToMap(DataInput in, Map<AmqpType<?, ?>,AmqpType<?, ?>> map) throws AmqpEncodingError, IOException {
+
+        public void unmarshalToMap(DataInput in, IAmqpMap<AmqpSymbol,AmqpType<?, ?>> map) throws IOException, AmqpEncodingError {
             AmqpSymbol key = AmqpSymbol.AmqpSymbolBuffer.create(AmqpSymbolMarshaller.createEncoded(in));
             if (key == null) {
                 throw new AmqpEncodingError("Null Key for " + SYMBOLIC_ID);
             }
 
-            if (key.getValue().equals(ADDRESS_KEY.getValue())){
-                map.put(ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(in)));
+            if (key.equals(AmqpTarget.ADDRESS_KEY)){
+                map.put(AmqpTarget.ADDRESS_KEY, AmqpAddress.AmqpAddressBuffer.create(AmqpBinaryMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(CREATE_KEY.getValue())){
-                map.put(CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
+            if (key.equals(AmqpTarget.CREATE_KEY)){
+                map.put(AmqpTarget.CREATE_KEY, AmqpBoolean.AmqpBooleanBuffer.create(AmqpBooleanMarshaller.createEncoded(in)));
             }
-            if (key.getValue().equals(TIMEOUT_KEY.getValue())){
-                map.put(TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(in)));
+            if (key.equals(AmqpTarget.TIMEOUT_KEY)){
+                map.put(AmqpTarget.TIMEOUT_KEY, AmqpUint.AmqpUintBuffer.create(AmqpUintMarshaller.createEncoded(in)));
             }
             else {
                 throw new UnexpectedTypeException("Invalid Key for " + SYMBOLIC_ID + " : " + key);
@@ -98,7 +99,7 @@
         }
     };
 
-    public static class AmqpTargetEncoded extends DescribedEncoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+    public static class AmqpTargetEncoded extends DescribedEncoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> {
 
         public AmqpTargetEncoded(DescribedBuffer buffer) {
             super(buffer);
@@ -116,11 +117,11 @@
             return NUMERIC_ID;
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> decodeDescribed(EncodedBuffer encoded) throws AmqpEncodingError {
             return AmqpMapMarshaller.createEncoded(encoded, DECODER);
         }
 
-        protected final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> unmarshalDescribed(DataInput in) throws IOException {
+        protected final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> unmarshalDescribed(DataInput in) throws IOException {
             return AmqpMapMarshaller.createEncoded(in, DECODER);
         }
 
@@ -129,19 +130,19 @@
         }
     }
 
-    public static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encode(AmqpTarget value) throws AmqpEncodingError {
+    public static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> encode(AmqpTarget value) throws AmqpEncodingError {
         return new AmqpTargetEncoded(value);
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(Buffer source, int offset) throws AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(source, offset));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(DataInput in) throws IOException, AmqpEncodingError {
         return createEncoded(FormatCategory.createBuffer(in.readByte(), in));
     }
 
-    static final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
+    static final Encoded<IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>>> createEncoded(EncodedBuffer buffer) throws AmqpEncodingError {
         byte fc = buffer.getEncodingFormatCode();
         if (fc == Encoder.NULL_FORMAT_CODE) {
             return NULL_ENCODED;



Mime
View raw message