activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r909224 [7/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
Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpRelink.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpRelink.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpRelink.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpRelink.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 java.util.Iterator;
 import org.apache.activemq.amqp.protocol.AmqpCommand;
 import org.apache.activemq.amqp.protocol.AmqpCommandHandler;
@@ -56,33 +55,57 @@
 
     /**
      * identifies the Link
+     * <p>
+     * command and subsequently used
+     * by endpoints as a shorthand to refer to the Link in all outgoing commands. The two
+     * endpoints may potentially use different handles to refer to the same Link. Link handles
+     * may be reused once a Link is closed for both send and receive.
+     * </p>
      */
-    public void setHandle(AmqpHandle handle);
+    public void setHandle(Long handle);
 
     /**
      * identifies the Link
+     * <p>
+     * command and subsequently used
+     * by endpoints as a shorthand to refer to the Link in all outgoing commands. The two
+     * endpoints may potentially use different handles to refer to the same Link. Link handles
+     * may be reused once a Link is closed for both send and receive.
+     * </p>
      */
-    public AmqpHandle getHandle();
+    public void setHandle(long handle);
 
     /**
-     * the source for Messages
+     * identifies the Link
+     * <p>
+     * command and subsequently used
+     * by endpoints as a shorthand to refer to the Link in all outgoing commands. The two
+     * endpoints may potentially use different handles to refer to the same Link. Link handles
+     * may be reused once a Link is closed for both send and receive.
+     * </p>
      */
-    public void setSource(HashMap<AmqpType<?,?>, AmqpType<?,?>> source);
+    public void setHandle(AmqpHandle handle);
 
     /**
-     * the source for Messages
+     * identifies the Link
+     * <p>
+     * command and subsequently used
+     * by endpoints as a shorthand to refer to the Link in all outgoing commands. The two
+     * endpoints may potentially use different handles to refer to the same Link. Link handles
+     * may be reused once a Link is closed for both send and receive.
+     * </p>
      */
-    public void setSource(AmqpMap source);
+    public AmqpHandle getHandle();
 
     /**
      * the source for Messages
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getSource();
+    public void setSource(AmqpMap source);
 
     /**
-     * the target for Messages
+     * the source for Messages
      */
-    public void setTarget(HashMap<AmqpType<?,?>, AmqpType<?,?>> target);
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getSource();
 
     /**
      * the target for Messages
@@ -92,7 +115,7 @@
     /**
      * the target for Messages
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getTarget();
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getTarget();
 
     public static class AmqpRelinkBean implements AmqpRelink{
 
@@ -103,204 +126,204 @@
         private AmqpMap source;
         private AmqpMap target;
 
-        public AmqpRelinkBean() {
+        AmqpRelinkBean() {
         }
 
-        public AmqpRelinkBean(IAmqpList value) {
-            //TODO we should defer decoding of the described type:
-            for(int i = 0; i < value.getListCount(); i++) {
-                set(i, value.get(i));
-            }
-        }
+        AmqpRelinkBean(IAmqpList value) {
 
-        public AmqpRelinkBean(AmqpRelink.AmqpRelinkBean other) {
-            this.bean = other;
+        for(int i = 0; i < value.getListCount(); i++) {
+            set(i, value.get(i));
         }
+    }
 
-        public final AmqpRelinkBean copy() {
-            return new AmqpRelink.AmqpRelinkBean(bean);
-        }
+    AmqpRelinkBean(AmqpRelink.AmqpRelinkBean other) {
+        this.bean = other;
+    }
 
-        public final void handle(AmqpCommandHandler handler) throws Exception {
-            handler.handleRelink(this);
-        }
+    public final AmqpRelinkBean copy() {
+        return new AmqpRelink.AmqpRelinkBean(bean);
+    }
 
-        public final AmqpRelink.AmqpRelinkBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
-            if(buffer == null) {
-                buffer = new AmqpRelinkBuffer(marshaller.encode(this));
-            }
-            return buffer;
-        }
+    public final void handle(AmqpCommandHandler handler) throws Exception {
+        handler.handleRelink(this);
+    }
 
-        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
-            getBuffer(marshaller).marshal(out, marshaller);
+    public final AmqpRelink.AmqpRelinkBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+        if(buffer == null) {
+            buffer = new AmqpRelinkBuffer(marshaller.encode(this));
         }
+        return buffer;
+    }
 
+    public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+        getBuffer(marshaller).marshal(out, marshaller);
+    }
 
-        public final void setOptions(AmqpOptions options) {
-            copyCheck();
-            bean.options = options;
-        }
 
-        public final AmqpOptions getOptions() {
-            return bean.options;
-        }
+    public final void setOptions(AmqpOptions options) {
+        copyCheck();
+        bean.options = options;
+    }
 
-        public final void setHandle(AmqpHandle handle) {
-            copyCheck();
-            bean.handle = handle;
-        }
+    public final AmqpOptions getOptions() {
+        return bean.options;
+    }
 
-        public final AmqpHandle getHandle() {
-            return bean.handle;
-        }
+    public void setHandle(Long handle) {
+        setHandle(TypeFactory.createAmqpHandle(handle));
+    }
 
-        public void setSource(HashMap<AmqpType<?,?>, AmqpType<?,?>> source) {
-            setSource(new AmqpMap.AmqpMapBean(source));
-        }
 
+    public void setHandle(long handle) {
+        setHandle(TypeFactory.createAmqpHandle(handle));
+    }
 
-        public final void setSource(AmqpMap source) {
-            copyCheck();
-            bean.source = source;
-        }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getSource() {
-            return bean.source.getValue();
-        }
+    public final void setHandle(AmqpHandle handle) {
+        copyCheck();
+        bean.handle = handle;
+    }
 
-        public void setTarget(HashMap<AmqpType<?,?>, AmqpType<?,?>> target) {
-            setTarget(new AmqpMap.AmqpMapBean(target));
-        }
+    public final AmqpHandle getHandle() {
+        return bean.handle;
+    }
 
+    public final void setSource(AmqpMap source) {
+        copyCheck();
+        bean.source = source;
+    }
 
-        public final void setTarget(AmqpMap target) {
-            copyCheck();
-            bean.target = target;
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getSource() {
+        return bean.source.getValue();
+    }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getTarget() {
-            return bean.target.getValue();
-        }
+    public final void setTarget(AmqpMap target) {
+        copyCheck();
+        bean.target = target;
+    }
 
-        public void set(int index, AmqpType<?, ?> value) {
-            switch(index) {
-            case 0: {
-                setOptions((AmqpOptions) value);
-                break;
-            }
-            case 1: {
-                setHandle((AmqpHandle) value);
-                break;
-            }
-            case 2: {
-                setSource((AmqpMap) value);
-                break;
-            }
-            case 3: {
-                setTarget((AmqpMap) value);
-                break;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getTarget() {
+        return bean.target.getValue();
+    }
 
-        public AmqpType<?, ?> get(int index) {
-            switch(index) {
-            case 0: {
-                return bean.options;
-            }
-            case 1: {
-                return bean.handle;
-            }
-            case 2: {
-                return bean.source;
-            }
-            case 3: {
-                return bean.target;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
+    public void set(int index, AmqpType<?, ?> value) {
+        switch(index) {
+        case 0: {
+            setOptions((AmqpOptions) value);
+            break;
+        }
+        case 1: {
+            setHandle((AmqpHandle) value);
+            break;
+        }
+        case 2: {
+            setSource((AmqpMap) value);
+            break;
+        }
+        case 3: {
+            setTarget((AmqpMap) value);
+            break;
         }
-
-        public int getListCount() {
-            return 4;
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public IAmqpList getValue() {
-            return bean;
         }
+    }
 
-        public Iterator<AmqpType<?, ?>> iterator() {
-            return new AmqpListIterator(bean);
+    public AmqpType<?, ?> get(int index) {
+        switch(index) {
+        case 0: {
+            return bean.options;
         }
+        case 1: {
+            return bean.handle;
+        }
+        case 2: {
+            return bean.source;
+        }
+        case 3: {
+            return bean.target;
+        }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
+        }
+        }
+    }
+
+    public int getListCount() {
+        return 4;
+    }
 
+    public IAmqpList getValue() {
+        return bean;
+    }
+
+    public Iterator<AmqpType<?, ?>> iterator() {
+        return new AmqpListIterator(bean);
+    }
 
-        private final void copyCheck() {
-            if(buffer != null) {;
-                throw new IllegalStateException("unwriteable");
-            }
-            if(bean != this) {;
-                copy(bean);
-            }
-        }
 
-        private final void copy(AmqpRelink.AmqpRelinkBean other) {
-            this.options= other.options;
-            this.handle= other.handle;
-            this.source= other.source;
-            this.target= other.target;
-            bean = this;
+    private final void copyCheck() {
+        if(buffer != null) {;
+            throw new IllegalStateException("unwriteable");
         }
+        if(bean != this) {;
+            copy(bean);
+        }
+    }
 
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
+    private final void copy(AmqpRelink.AmqpRelinkBean other) {
+        bean = this;
+    }
 
-            if(t == null || !(t instanceof AmqpRelink)) {
-                return false;
-            }
+    public boolean equals(Object o){
+        if(this == o) {
+            return true;
+        }
 
-            return equivalent((AmqpRelink) t);
+        if(o == null || !(o instanceof AmqpRelink)) {
+            return false;
         }
 
-        public boolean equivalent(AmqpRelink b) {
+        return equals((AmqpRelink) o);
+    }
 
-            if(b.getOptions() == null ^ getOptions() == null) {
-                return false;
-            }
-            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
-                return false;
-            }
+    public boolean equals(AmqpRelink b) {
 
-            if(b.getHandle() == null ^ getHandle() == null) {
-                return false;
-            }
-            if(b.getHandle() != null && !b.getHandle().equals(getHandle())){ 
-                return false;
-            }
+        if(b.getOptions() == null ^ getOptions() == null) {
+            return false;
+        }
+        if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+            return false;
+        }
 
-            if(b.getSource() == null ^ getSource() == null) {
-                return false;
-            }
-            if(b.getSource() != null && !b.getSource().equals(getSource())){ 
-                return false;
-            }
+        if(b.getHandle() == null ^ getHandle() == null) {
+            return false;
+        }
+        if(b.getHandle() != null && !b.getHandle().equals(getHandle())){ 
+            return false;
+        }
 
-            if(b.getTarget() == null ^ getTarget() == null) {
-                return false;
-            }
-            if(b.getTarget() != null && !b.getTarget().equals(getTarget())){ 
-                return false;
-            }
-            return true;
+        if(b.getSource() == null ^ getSource() == null) {
+            return false;
+        }
+        if(b.getSource() != null && !b.getSource().equals(getSource())){ 
+            return false;
+        }
+
+        if(b.getTarget() == null ^ getTarget() == null) {
+            return false;
+        }
+        if(b.getTarget() != null && !b.getTarget().equals(getTarget())){ 
+            return false;
         }
+        return true;
+    }
+
+    public int hashCode() {
+        return AbstractAmqpList.hashCodeFor(this);
     }
+}
 
     public static class AmqpRelinkBuffer extends AmqpList.AmqpListBuffer implements AmqpRelink{
 
@@ -318,6 +341,15 @@
             return bean().getOptions();
         }
 
+        public void setHandle(Long handle) {
+            bean().setHandle(handle);
+        }
+
+        public void setHandle(long handle) {
+            bean().setHandle(handle);
+        }
+
+
         public final void setHandle(AmqpHandle handle) {
             bean().setHandle(handle);
         }
@@ -326,27 +358,19 @@
             return bean().getHandle();
         }
 
-    public void setSource(HashMap<AmqpType<?,?>, AmqpType<?,?>> source) {
-            bean().setSource(source);
-        }
-
         public final void setSource(AmqpMap source) {
             bean().setSource(source);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getSource() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getSource() {
             return bean().getSource();
         }
 
-    public void setTarget(HashMap<AmqpType<?,?>, AmqpType<?,?>> target) {
-            bean().setTarget(target);
-        }
-
         public final void setTarget(AmqpMap target) {
             bean().setTarget(target);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getTarget() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getTarget() {
             return bean().getTarget();
         }
 
@@ -386,8 +410,16 @@
             handler.handleRelink(this);
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpRelink o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpRelink.AmqpRelinkBuffer create(Encoded<IAmqpList> encoded) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslChallenge.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslChallenge.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslChallenge.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslChallenge.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 java.util.Iterator;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
@@ -40,17 +39,12 @@
     /**
      * options map
      */
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options);
-
-    /**
-     * options map
-     */
     public void setOptions(AmqpMap options);
 
     /**
      * options map
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions();
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions();
 
     /**
      * security challenge data
@@ -86,153 +80,150 @@
         private AmqpMap options;
         private AmqpBinary challenge;
 
-        public AmqpSaslChallengeBean() {
+        AmqpSaslChallengeBean() {
         }
 
-        public AmqpSaslChallengeBean(IAmqpList value) {
-            //TODO we should defer decoding of the described type:
-            for(int i = 0; i < value.getListCount(); i++) {
-                set(i, value.get(i));
-            }
-        }
+        AmqpSaslChallengeBean(IAmqpList value) {
 
-        public AmqpSaslChallengeBean(AmqpSaslChallenge.AmqpSaslChallengeBean other) {
-            this.bean = other;
+        for(int i = 0; i < value.getListCount(); i++) {
+            set(i, value.get(i));
         }
+    }
 
-        public final AmqpSaslChallengeBean copy() {
-            return new AmqpSaslChallenge.AmqpSaslChallengeBean(bean);
-        }
+    AmqpSaslChallengeBean(AmqpSaslChallenge.AmqpSaslChallengeBean other) {
+        this.bean = other;
+    }
 
-        public final AmqpSaslChallenge.AmqpSaslChallengeBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
-            if(buffer == null) {
-                buffer = new AmqpSaslChallengeBuffer(marshaller.encode(this));
-            }
-            return buffer;
-        }
+    public final AmqpSaslChallengeBean copy() {
+        return new AmqpSaslChallenge.AmqpSaslChallengeBean(bean);
+    }
 
-        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
-            getBuffer(marshaller).marshal(out, marshaller);
+    public final AmqpSaslChallenge.AmqpSaslChallengeBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+        if(buffer == null) {
+            buffer = new AmqpSaslChallengeBuffer(marshaller.encode(this));
         }
+        return buffer;
+    }
 
+    public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+        getBuffer(marshaller).marshal(out, marshaller);
+    }
 
-        public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            setOptions(new AmqpMap.AmqpMapBean(options));
-        }
 
+    public final void setOptions(AmqpMap options) {
+        copyCheck();
+        bean.options = options;
+    }
 
-        public final void setOptions(AmqpMap options) {
-            copyCheck();
-            bean.options = options;
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
+        return bean.options.getValue();
+    }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
-            return bean.options.getValue();
-        }
+    public void setChallenge(Buffer challenge) {
+        setChallenge(TypeFactory.createAmqpBinary(challenge));
+    }
 
-        public void setChallenge(Buffer challenge) {
-            setChallenge(new AmqpBinary.AmqpBinaryBean(challenge));
-        }
 
+    public final void setChallenge(AmqpBinary challenge) {
+        copyCheck();
+        bean.challenge = challenge;
+    }
 
-        public final void setChallenge(AmqpBinary challenge) {
-            copyCheck();
-            bean.challenge = challenge;
-        }
+    public final Buffer getChallenge() {
+        return bean.challenge.getValue();
+    }
 
-        public final Buffer getChallenge() {
-            return bean.challenge.getValue();
+    public void set(int index, AmqpType<?, ?> value) {
+        switch(index) {
+        case 0: {
+            setOptions((AmqpMap) value);
+            break;
+        }
+        case 1: {
+            setChallenge((AmqpBinary) value);
+            break;
         }
-
-        public void set(int index, AmqpType<?, ?> value) {
-            switch(index) {
-            case 0: {
-                setOptions((AmqpMap) value);
-                break;
-            }
-            case 1: {
-                setChallenge((AmqpBinary) value);
-                break;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public AmqpType<?, ?> get(int index) {
-            switch(index) {
-            case 0: {
-                return bean.options;
-            }
-            case 1: {
-                return bean.challenge;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
         }
+    }
 
-        public int getListCount() {
-            return 2;
+    public AmqpType<?, ?> get(int index) {
+        switch(index) {
+        case 0: {
+            return bean.options;
         }
-
-        public IAmqpList getValue() {
-            return bean;
+        case 1: {
+            return bean.challenge;
+        }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public Iterator<AmqpType<?, ?>> iterator() {
-            return new AmqpListIterator(bean);
         }
+    }
 
+    public int getListCount() {
+        return 2;
+    }
 
-        private final void copyCheck() {
-            if(buffer != null) {;
-                throw new IllegalStateException("unwriteable");
-            }
-            if(bean != this) {;
-                copy(bean);
-            }
-        }
+    public IAmqpList getValue() {
+        return bean;
+    }
+
+    public Iterator<AmqpType<?, ?>> iterator() {
+        return new AmqpListIterator(bean);
+    }
 
-        private final void copy(AmqpSaslChallenge.AmqpSaslChallengeBean other) {
-            this.options= other.options;
-            this.challenge= other.challenge;
-            bean = this;
+
+    private final void copyCheck() {
+        if(buffer != null) {;
+            throw new IllegalStateException("unwriteable");
+        }
+        if(bean != this) {;
+            copy(bean);
         }
+    }
 
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
+    private final void copy(AmqpSaslChallenge.AmqpSaslChallengeBean other) {
+        bean = this;
+    }
 
-            if(t == null || !(t instanceof AmqpSaslChallenge)) {
-                return false;
-            }
+    public boolean equals(Object o){
+        if(this == o) {
+            return true;
+        }
 
-            return equivalent((AmqpSaslChallenge) t);
+        if(o == null || !(o instanceof AmqpSaslChallenge)) {
+            return false;
         }
 
-        public boolean equivalent(AmqpSaslChallenge b) {
+        return equals((AmqpSaslChallenge) o);
+    }
 
-            if(b.getOptions() == null ^ getOptions() == null) {
-                return false;
-            }
-            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
-                return false;
-            }
+    public boolean equals(AmqpSaslChallenge b) {
 
-            if(b.getChallenge() == null ^ getChallenge() == null) {
-                return false;
-            }
-            if(b.getChallenge() != null && !b.getChallenge().equals(getChallenge())){ 
-                return false;
-            }
-            return true;
+        if(b.getOptions() == null ^ getOptions() == null) {
+            return false;
         }
+        if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+            return false;
+        }
+
+        if(b.getChallenge() == null ^ getChallenge() == null) {
+            return false;
+        }
+        if(b.getChallenge() != null && !b.getChallenge().equals(getChallenge())){ 
+            return false;
+        }
+        return true;
     }
 
+    public int hashCode() {
+        return AbstractAmqpList.hashCodeFor(this);
+    }
+}
+
     public static class AmqpSaslChallengeBuffer extends AmqpList.AmqpListBuffer implements AmqpSaslChallenge{
 
         private AmqpSaslChallengeBean bean;
@@ -241,19 +232,15 @@
             super(encoded);
         }
 
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            bean().setOptions(options);
-        }
-
         public final void setOptions(AmqpMap options) {
             bean().setOptions(options);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
             return bean().getOptions();
         }
 
-    public void setChallenge(Buffer challenge) {
+        public void setChallenge(Buffer challenge) {
             bean().setChallenge(challenge);
         }
 
@@ -297,8 +284,16 @@
             return bean;
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpSaslChallenge o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpSaslChallenge.AmqpSaslChallengeBuffer create(Encoded<IAmqpList> encoded) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslInit.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslInit.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslInit.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslInit.java Fri Feb 12 04:25:25 2010
@@ -20,7 +20,6 @@
 import java.io.DataOutput;
 import java.io.IOException;
 import java.lang.String;
-import java.util.HashMap;
 import java.util.Iterator;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
@@ -41,17 +40,12 @@
     /**
      * options map
      */
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options);
-
-    /**
-     * options map
-     */
     public void setOptions(AmqpMap options);
 
     /**
      * options map
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions();
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions();
 
     /**
      * selected security mechanism
@@ -121,182 +115,178 @@
         private AmqpString mechanism;
         private AmqpBinary initialResponse;
 
-        public AmqpSaslInitBean() {
+        AmqpSaslInitBean() {
         }
 
-        public AmqpSaslInitBean(IAmqpList value) {
-            //TODO we should defer decoding of the described type:
-            for(int i = 0; i < value.getListCount(); i++) {
-                set(i, value.get(i));
-            }
-        }
+        AmqpSaslInitBean(IAmqpList value) {
 
-        public AmqpSaslInitBean(AmqpSaslInit.AmqpSaslInitBean other) {
-            this.bean = other;
+        for(int i = 0; i < value.getListCount(); i++) {
+            set(i, value.get(i));
         }
+    }
 
-        public final AmqpSaslInitBean copy() {
-            return new AmqpSaslInit.AmqpSaslInitBean(bean);
-        }
+    AmqpSaslInitBean(AmqpSaslInit.AmqpSaslInitBean other) {
+        this.bean = other;
+    }
 
-        public final AmqpSaslInit.AmqpSaslInitBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
-            if(buffer == null) {
-                buffer = new AmqpSaslInitBuffer(marshaller.encode(this));
-            }
-            return buffer;
-        }
+    public final AmqpSaslInitBean copy() {
+        return new AmqpSaslInit.AmqpSaslInitBean(bean);
+    }
 
-        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
-            getBuffer(marshaller).marshal(out, marshaller);
+    public final AmqpSaslInit.AmqpSaslInitBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+        if(buffer == null) {
+            buffer = new AmqpSaslInitBuffer(marshaller.encode(this));
         }
+        return buffer;
+    }
 
+    public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+        getBuffer(marshaller).marshal(out, marshaller);
+    }
 
-        public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            setOptions(new AmqpMap.AmqpMapBean(options));
-        }
 
+    public final void setOptions(AmqpMap options) {
+        copyCheck();
+        bean.options = options;
+    }
 
-        public final void setOptions(AmqpMap options) {
-            copyCheck();
-            bean.options = options;
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
+        return bean.options.getValue();
+    }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
-            return bean.options.getValue();
-        }
+    public void setMechanism(String mechanism) {
+        setMechanism(TypeFactory.createAmqpString(mechanism));
+    }
 
-        public void setMechanism(String mechanism) {
-            setMechanism(new AmqpString.AmqpStringBean(mechanism));
-        }
 
+    public final void setMechanism(AmqpString mechanism) {
+        copyCheck();
+        bean.mechanism = mechanism;
+    }
 
-        public final void setMechanism(AmqpString mechanism) {
-            copyCheck();
-            bean.mechanism = mechanism;
-        }
+    public final String getMechanism() {
+        return bean.mechanism.getValue();
+    }
 
-        public final String getMechanism() {
-            return bean.mechanism.getValue();
-        }
+    public void setInitialResponse(Buffer initialResponse) {
+        setInitialResponse(TypeFactory.createAmqpBinary(initialResponse));
+    }
 
-        public void setInitialResponse(Buffer initialResponse) {
-            setInitialResponse(new AmqpBinary.AmqpBinaryBean(initialResponse));
-        }
 
+    public final void setInitialResponse(AmqpBinary initialResponse) {
+        copyCheck();
+        bean.initialResponse = initialResponse;
+    }
 
-        public final void setInitialResponse(AmqpBinary initialResponse) {
-            copyCheck();
-            bean.initialResponse = initialResponse;
-        }
+    public final Buffer getInitialResponse() {
+        return bean.initialResponse.getValue();
+    }
 
-        public final Buffer getInitialResponse() {
-            return bean.initialResponse.getValue();
+    public void set(int index, AmqpType<?, ?> value) {
+        switch(index) {
+        case 0: {
+            setOptions((AmqpMap) value);
+            break;
+        }
+        case 1: {
+            setMechanism((AmqpString) value);
+            break;
+        }
+        case 2: {
+            setInitialResponse((AmqpBinary) value);
+            break;
         }
-
-        public void set(int index, AmqpType<?, ?> value) {
-            switch(index) {
-            case 0: {
-                setOptions((AmqpMap) value);
-                break;
-            }
-            case 1: {
-                setMechanism((AmqpString) value);
-                break;
-            }
-            case 2: {
-                setInitialResponse((AmqpBinary) value);
-                break;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public AmqpType<?, ?> get(int index) {
-            switch(index) {
-            case 0: {
-                return bean.options;
-            }
-            case 1: {
-                return bean.mechanism;
-            }
-            case 2: {
-                return bean.initialResponse;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
         }
+    }
 
-        public int getListCount() {
-            return 3;
+    public AmqpType<?, ?> get(int index) {
+        switch(index) {
+        case 0: {
+            return bean.options;
         }
-
-        public IAmqpList getValue() {
-            return bean;
+        case 1: {
+            return bean.mechanism;
         }
-
-        public Iterator<AmqpType<?, ?>> iterator() {
-            return new AmqpListIterator(bean);
+        case 2: {
+            return bean.initialResponse;
         }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
+        }
+        }
+    }
 
+    public int getListCount() {
+        return 3;
+    }
 
-        private final void copyCheck() {
-            if(buffer != null) {;
-                throw new IllegalStateException("unwriteable");
-            }
-            if(bean != this) {;
-                copy(bean);
-            }
-        }
+    public IAmqpList getValue() {
+        return bean;
+    }
+
+    public Iterator<AmqpType<?, ?>> iterator() {
+        return new AmqpListIterator(bean);
+    }
 
-        private final void copy(AmqpSaslInit.AmqpSaslInitBean other) {
-            this.options= other.options;
-            this.mechanism= other.mechanism;
-            this.initialResponse= other.initialResponse;
-            bean = this;
+
+    private final void copyCheck() {
+        if(buffer != null) {;
+            throw new IllegalStateException("unwriteable");
+        }
+        if(bean != this) {;
+            copy(bean);
         }
+    }
 
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
+    private final void copy(AmqpSaslInit.AmqpSaslInitBean other) {
+        bean = this;
+    }
 
-            if(t == null || !(t instanceof AmqpSaslInit)) {
-                return false;
-            }
+    public boolean equals(Object o){
+        if(this == o) {
+            return true;
+        }
 
-            return equivalent((AmqpSaslInit) t);
+        if(o == null || !(o instanceof AmqpSaslInit)) {
+            return false;
         }
 
-        public boolean equivalent(AmqpSaslInit b) {
+        return equals((AmqpSaslInit) o);
+    }
+
+    public boolean equals(AmqpSaslInit b) {
 
-            if(b.getOptions() == null ^ getOptions() == null) {
-                return false;
-            }
-            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
-                return false;
-            }
+        if(b.getOptions() == null ^ getOptions() == null) {
+            return false;
+        }
+        if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+            return false;
+        }
 
-            if(b.getMechanism() == null ^ getMechanism() == null) {
-                return false;
-            }
-            if(b.getMechanism() != null && !b.getMechanism().equals(getMechanism())){ 
-                return false;
-            }
+        if(b.getMechanism() == null ^ getMechanism() == null) {
+            return false;
+        }
+        if(b.getMechanism() != null && !b.getMechanism().equals(getMechanism())){ 
+            return false;
+        }
 
-            if(b.getInitialResponse() == null ^ getInitialResponse() == null) {
-                return false;
-            }
-            if(b.getInitialResponse() != null && !b.getInitialResponse().equals(getInitialResponse())){ 
-                return false;
-            }
-            return true;
+        if(b.getInitialResponse() == null ^ getInitialResponse() == null) {
+            return false;
+        }
+        if(b.getInitialResponse() != null && !b.getInitialResponse().equals(getInitialResponse())){ 
+            return false;
         }
+        return true;
     }
 
+    public int hashCode() {
+        return AbstractAmqpList.hashCodeFor(this);
+    }
+}
+
     public static class AmqpSaslInitBuffer extends AmqpList.AmqpListBuffer implements AmqpSaslInit{
 
         private AmqpSaslInitBean bean;
@@ -305,19 +295,15 @@
             super(encoded);
         }
 
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            bean().setOptions(options);
-        }
-
         public final void setOptions(AmqpMap options) {
             bean().setOptions(options);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
             return bean().getOptions();
         }
 
-    public void setMechanism(String mechanism) {
+        public void setMechanism(String mechanism) {
             bean().setMechanism(mechanism);
         }
 
@@ -329,7 +315,7 @@
             return bean().getMechanism();
         }
 
-    public void setInitialResponse(Buffer initialResponse) {
+        public void setInitialResponse(Buffer initialResponse) {
             bean().setInitialResponse(initialResponse);
         }
 
@@ -373,8 +359,16 @@
             return bean;
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpSaslInit o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpSaslInit.AmqpSaslInitBuffer create(Encoded<IAmqpList> encoded) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslMechanisms.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslMechanisms.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslMechanisms.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslMechanisms.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 java.util.Iterator;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
@@ -40,27 +39,12 @@
     /**
      * options map
      */
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options);
-
-    /**
-     * options map
-     */
     public void setOptions(AmqpMap options);
 
     /**
      * options map
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions();
-
-    /**
-     * supported sasl mechanisms
-     * <p>
-     * A list of the sasl security mechanisms supported by the sending peer. If the sending
-     * peer does not require its partner to authenticate with it, this list may be empty or
-     * absent. The server mechanisms are ordered in decreasing level of preference.
-     * </p>
-     */
-    public void setSaslServerMechanisms(IAmqpList saslServerMechanisms);
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions();
 
     /**
      * supported sasl mechanisms
@@ -89,153 +73,145 @@
         private AmqpMap options;
         private AmqpList saslServerMechanisms;
 
-        public AmqpSaslMechanismsBean() {
+        AmqpSaslMechanismsBean() {
         }
 
-        public AmqpSaslMechanismsBean(IAmqpList value) {
-            //TODO we should defer decoding of the described type:
-            for(int i = 0; i < value.getListCount(); i++) {
-                set(i, value.get(i));
-            }
-        }
+        AmqpSaslMechanismsBean(IAmqpList value) {
 
-        public AmqpSaslMechanismsBean(AmqpSaslMechanisms.AmqpSaslMechanismsBean other) {
-            this.bean = other;
+        for(int i = 0; i < value.getListCount(); i++) {
+            set(i, value.get(i));
         }
+    }
 
-        public final AmqpSaslMechanismsBean copy() {
-            return new AmqpSaslMechanisms.AmqpSaslMechanismsBean(bean);
-        }
+    AmqpSaslMechanismsBean(AmqpSaslMechanisms.AmqpSaslMechanismsBean other) {
+        this.bean = other;
+    }
 
-        public final AmqpSaslMechanisms.AmqpSaslMechanismsBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
-            if(buffer == null) {
-                buffer = new AmqpSaslMechanismsBuffer(marshaller.encode(this));
-            }
-            return buffer;
-        }
+    public final AmqpSaslMechanismsBean copy() {
+        return new AmqpSaslMechanisms.AmqpSaslMechanismsBean(bean);
+    }
 
-        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
-            getBuffer(marshaller).marshal(out, marshaller);
+    public final AmqpSaslMechanisms.AmqpSaslMechanismsBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+        if(buffer == null) {
+            buffer = new AmqpSaslMechanismsBuffer(marshaller.encode(this));
         }
+        return buffer;
+    }
 
-
-        public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            setOptions(new AmqpMap.AmqpMapBean(options));
-        }
+    public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+        getBuffer(marshaller).marshal(out, marshaller);
+    }
 
 
-        public final void setOptions(AmqpMap options) {
-            copyCheck();
-            bean.options = options;
-        }
+    public final void setOptions(AmqpMap options) {
+        copyCheck();
+        bean.options = options;
+    }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
-            return bean.options.getValue();
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
+        return bean.options.getValue();
+    }
 
-        public void setSaslServerMechanisms(IAmqpList saslServerMechanisms) {
-            setSaslServerMechanisms(new AmqpList.AmqpListBean(saslServerMechanisms));
-        }
+    public final void setSaslServerMechanisms(AmqpList saslServerMechanisms) {
+        copyCheck();
+        bean.saslServerMechanisms = saslServerMechanisms;
+    }
 
+    public final IAmqpList getSaslServerMechanisms() {
+        return bean.saslServerMechanisms.getValue();
+    }
 
-        public final void setSaslServerMechanisms(AmqpList saslServerMechanisms) {
-            copyCheck();
-            bean.saslServerMechanisms = saslServerMechanisms;
+    public void set(int index, AmqpType<?, ?> value) {
+        switch(index) {
+        case 0: {
+            setOptions((AmqpMap) value);
+            break;
+        }
+        case 1: {
+            setSaslServerMechanisms((AmqpList) value);
+            break;
         }
-
-        public final IAmqpList getSaslServerMechanisms() {
-            return bean.saslServerMechanisms.getValue();
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public void set(int index, AmqpType<?, ?> value) {
-            switch(index) {
-            case 0: {
-                setOptions((AmqpMap) value);
-                break;
-            }
-            case 1: {
-                setSaslServerMechanisms((AmqpList) value);
-                break;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
         }
+    }
 
-        public AmqpType<?, ?> get(int index) {
-            switch(index) {
-            case 0: {
-                return bean.options;
-            }
-            case 1: {
-                return bean.saslServerMechanisms;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
+    public AmqpType<?, ?> get(int index) {
+        switch(index) {
+        case 0: {
+            return bean.options;
         }
-
-        public int getListCount() {
-            return 2;
+        case 1: {
+            return bean.saslServerMechanisms;
         }
-
-        public IAmqpList getValue() {
-            return bean;
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public Iterator<AmqpType<?, ?>> iterator() {
-            return new AmqpListIterator(bean);
         }
+    }
 
+    public int getListCount() {
+        return 2;
+    }
+
+    public IAmqpList getValue() {
+        return bean;
+    }
+
+    public Iterator<AmqpType<?, ?>> iterator() {
+        return new AmqpListIterator(bean);
+    }
 
-        private final void copyCheck() {
-            if(buffer != null) {;
-                throw new IllegalStateException("unwriteable");
-            }
-            if(bean != this) {;
-                copy(bean);
-            }
-        }
 
-        private final void copy(AmqpSaslMechanisms.AmqpSaslMechanismsBean other) {
-            this.options= other.options;
-            this.saslServerMechanisms= other.saslServerMechanisms;
-            bean = this;
+    private final void copyCheck() {
+        if(buffer != null) {;
+            throw new IllegalStateException("unwriteable");
+        }
+        if(bean != this) {;
+            copy(bean);
         }
+    }
 
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
+    private final void copy(AmqpSaslMechanisms.AmqpSaslMechanismsBean other) {
+        bean = this;
+    }
 
-            if(t == null || !(t instanceof AmqpSaslMechanisms)) {
-                return false;
-            }
+    public boolean equals(Object o){
+        if(this == o) {
+            return true;
+        }
 
-            return equivalent((AmqpSaslMechanisms) t);
+        if(o == null || !(o instanceof AmqpSaslMechanisms)) {
+            return false;
         }
 
-        public boolean equivalent(AmqpSaslMechanisms b) {
+        return equals((AmqpSaslMechanisms) o);
+    }
 
-            if(b.getOptions() == null ^ getOptions() == null) {
-                return false;
-            }
-            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
-                return false;
-            }
+    public boolean equals(AmqpSaslMechanisms b) {
 
-            if(b.getSaslServerMechanisms() == null ^ getSaslServerMechanisms() == null) {
-                return false;
-            }
-            if(b.getSaslServerMechanisms() != null && !b.getSaslServerMechanisms().equals(getSaslServerMechanisms())){ 
-                return false;
-            }
-            return true;
+        if(b.getOptions() == null ^ getOptions() == null) {
+            return false;
+        }
+        if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+            return false;
+        }
+
+        if(b.getSaslServerMechanisms() == null ^ getSaslServerMechanisms() == null) {
+            return false;
+        }
+        if(b.getSaslServerMechanisms() != null && !b.getSaslServerMechanisms().equals(getSaslServerMechanisms())){ 
+            return false;
         }
+        return true;
     }
 
+    public int hashCode() {
+        return AbstractAmqpList.hashCodeFor(this);
+    }
+}
+
     public static class AmqpSaslMechanismsBuffer extends AmqpList.AmqpListBuffer implements AmqpSaslMechanisms{
 
         private AmqpSaslMechanismsBean bean;
@@ -244,22 +220,14 @@
             super(encoded);
         }
 
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            bean().setOptions(options);
-        }
-
         public final void setOptions(AmqpMap options) {
             bean().setOptions(options);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
             return bean().getOptions();
         }
 
-    public void setSaslServerMechanisms(IAmqpList saslServerMechanisms) {
-            bean().setSaslServerMechanisms(saslServerMechanisms);
-        }
-
         public final void setSaslServerMechanisms(AmqpList saslServerMechanisms) {
             bean().setSaslServerMechanisms(saslServerMechanisms);
         }
@@ -300,8 +268,16 @@
             return bean;
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpSaslMechanisms o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpSaslMechanisms.AmqpSaslMechanismsBuffer create(Encoded<IAmqpList> encoded) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslOutcome.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslOutcome.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslOutcome.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslOutcome.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 java.util.Iterator;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
@@ -42,17 +41,12 @@
     /**
      * options map
      */
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options);
-
-    /**
-     * options map
-     */
     public void setOptions(AmqpMap options);
 
     /**
      * options map
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions();
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions();
 
     /**
      * indicates the outcome of the sasl dialog
@@ -108,179 +102,175 @@
         private AmqpSaslCode code;
         private AmqpBinary additionalData;
 
-        public AmqpSaslOutcomeBean() {
+        AmqpSaslOutcomeBean() {
         }
 
-        public AmqpSaslOutcomeBean(IAmqpList value) {
-            //TODO we should defer decoding of the described type:
-            for(int i = 0; i < value.getListCount(); i++) {
-                set(i, value.get(i));
-            }
-        }
+        AmqpSaslOutcomeBean(IAmqpList value) {
 
-        public AmqpSaslOutcomeBean(AmqpSaslOutcome.AmqpSaslOutcomeBean other) {
-            this.bean = other;
+        for(int i = 0; i < value.getListCount(); i++) {
+            set(i, value.get(i));
         }
+    }
 
-        public final AmqpSaslOutcomeBean copy() {
-            return new AmqpSaslOutcome.AmqpSaslOutcomeBean(bean);
-        }
+    AmqpSaslOutcomeBean(AmqpSaslOutcome.AmqpSaslOutcomeBean other) {
+        this.bean = other;
+    }
 
-        public final AmqpSaslOutcome.AmqpSaslOutcomeBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
-            if(buffer == null) {
-                buffer = new AmqpSaslOutcomeBuffer(marshaller.encode(this));
-            }
-            return buffer;
-        }
+    public final AmqpSaslOutcomeBean copy() {
+        return new AmqpSaslOutcome.AmqpSaslOutcomeBean(bean);
+    }
 
-        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
-            getBuffer(marshaller).marshal(out, marshaller);
+    public final AmqpSaslOutcome.AmqpSaslOutcomeBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+        if(buffer == null) {
+            buffer = new AmqpSaslOutcomeBuffer(marshaller.encode(this));
         }
+        return buffer;
+    }
 
+    public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+        getBuffer(marshaller).marshal(out, marshaller);
+    }
 
-        public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            setOptions(new AmqpMap.AmqpMapBean(options));
-        }
 
+    public final void setOptions(AmqpMap options) {
+        copyCheck();
+        bean.options = options;
+    }
 
-        public final void setOptions(AmqpMap options) {
-            copyCheck();
-            bean.options = options;
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
+        return bean.options.getValue();
+    }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
-            return bean.options.getValue();
-        }
+    public final void setCode(AmqpSaslCode code) {
+        copyCheck();
+        bean.code = code;
+    }
 
-        public final void setCode(AmqpSaslCode code) {
-            copyCheck();
-            bean.code = code;
-        }
+    public final AmqpSaslCode getCode() {
+        return bean.code;
+    }
 
-        public final AmqpSaslCode getCode() {
-            return bean.code;
-        }
+    public void setAdditionalData(Buffer additionalData) {
+        setAdditionalData(TypeFactory.createAmqpBinary(additionalData));
+    }
 
-        public void setAdditionalData(Buffer additionalData) {
-            setAdditionalData(new AmqpBinary.AmqpBinaryBean(additionalData));
-        }
 
+    public final void setAdditionalData(AmqpBinary additionalData) {
+        copyCheck();
+        bean.additionalData = additionalData;
+    }
 
-        public final void setAdditionalData(AmqpBinary additionalData) {
-            copyCheck();
-            bean.additionalData = additionalData;
-        }
+    public final Buffer getAdditionalData() {
+        return bean.additionalData.getValue();
+    }
 
-        public final Buffer getAdditionalData() {
-            return bean.additionalData.getValue();
+    public void set(int index, AmqpType<?, ?> value) {
+        switch(index) {
+        case 0: {
+            setOptions((AmqpMap) value);
+            break;
+        }
+        case 1: {
+            setCode(AmqpSaslCode.get((AmqpUbyte)value));
+            break;
+        }
+        case 2: {
+            setAdditionalData((AmqpBinary) value);
+            break;
+        }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public void set(int index, AmqpType<?, ?> value) {
-            switch(index) {
-            case 0: {
-                setOptions((AmqpMap) value);
-                break;
-            }
-            case 1: {
-                setCode(AmqpSaslCode.get((AmqpUbyte)value));
-                break;
-            }
-            case 2: {
-                setAdditionalData((AmqpBinary) value);
-                break;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
         }
+    }
 
-        public AmqpType<?, ?> get(int index) {
-            switch(index) {
-            case 0: {
-                return bean.options;
-            }
-            case 1: {
-                if(code == null) {
-                    return null;
-                }
-                return code.getValue();
-            }
-            case 2: {
-                return bean.additionalData;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
+    public AmqpType<?, ?> get(int index) {
+        switch(index) {
+        case 0: {
+            return bean.options;
+        }
+        case 1: {
+            if(code == null) {
+                return null;
             }
+            return code.getValue();
         }
-
-        public int getListCount() {
-            return 3;
+        case 2: {
+            return bean.additionalData;
         }
-
-        public IAmqpList getValue() {
-            return bean;
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public Iterator<AmqpType<?, ?>> iterator() {
-            return new AmqpListIterator(bean);
         }
+    }
 
+    public int getListCount() {
+        return 3;
+    }
 
-        private final void copyCheck() {
-            if(buffer != null) {;
-                throw new IllegalStateException("unwriteable");
-            }
-            if(bean != this) {;
-                copy(bean);
-            }
-        }
+    public IAmqpList getValue() {
+        return bean;
+    }
+
+    public Iterator<AmqpType<?, ?>> iterator() {
+        return new AmqpListIterator(bean);
+    }
 
-        private final void copy(AmqpSaslOutcome.AmqpSaslOutcomeBean other) {
-            this.options= other.options;
-            this.code= other.code;
-            this.additionalData= other.additionalData;
-            bean = this;
+
+    private final void copyCheck() {
+        if(buffer != null) {;
+            throw new IllegalStateException("unwriteable");
+        }
+        if(bean != this) {;
+            copy(bean);
         }
+    }
 
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
+    private final void copy(AmqpSaslOutcome.AmqpSaslOutcomeBean other) {
+        bean = this;
+    }
 
-            if(t == null || !(t instanceof AmqpSaslOutcome)) {
-                return false;
-            }
+    public boolean equals(Object o){
+        if(this == o) {
+            return true;
+        }
 
-            return equivalent((AmqpSaslOutcome) t);
+        if(o == null || !(o instanceof AmqpSaslOutcome)) {
+            return false;
         }
 
-        public boolean equivalent(AmqpSaslOutcome b) {
+        return equals((AmqpSaslOutcome) o);
+    }
 
-            if(b.getOptions() == null ^ getOptions() == null) {
-                return false;
-            }
-            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
-                return false;
-            }
+    public boolean equals(AmqpSaslOutcome b) {
 
-            if(b.getCode() == null ^ getCode() == null) {
-                return false;
-            }
-            if(b.getCode() != null && !b.getCode().equals(getCode())){ 
-                return false;
-            }
+        if(b.getOptions() == null ^ getOptions() == null) {
+            return false;
+        }
+        if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+            return false;
+        }
 
-            if(b.getAdditionalData() == null ^ getAdditionalData() == null) {
-                return false;
-            }
-            if(b.getAdditionalData() != null && !b.getAdditionalData().equals(getAdditionalData())){ 
-                return false;
-            }
-            return true;
+        if(b.getCode() == null ^ getCode() == null) {
+            return false;
+        }
+        if(b.getCode() != null && !b.getCode().equals(getCode())){ 
+            return false;
+        }
+
+        if(b.getAdditionalData() == null ^ getAdditionalData() == null) {
+            return false;
         }
+        if(b.getAdditionalData() != null && !b.getAdditionalData().equals(getAdditionalData())){ 
+            return false;
+        }
+        return true;
+    }
+
+    public int hashCode() {
+        return AbstractAmqpList.hashCodeFor(this);
     }
+}
 
     public static class AmqpSaslOutcomeBuffer extends AmqpList.AmqpListBuffer implements AmqpSaslOutcome{
 
@@ -290,15 +280,11 @@
             super(encoded);
         }
 
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            bean().setOptions(options);
-        }
-
         public final void setOptions(AmqpMap options) {
             bean().setOptions(options);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
             return bean().getOptions();
         }
 
@@ -310,7 +296,7 @@
             return bean().getCode();
         }
 
-    public void setAdditionalData(Buffer additionalData) {
+        public void setAdditionalData(Buffer additionalData) {
             bean().setAdditionalData(additionalData);
         }
 
@@ -354,8 +340,16 @@
             return bean;
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpSaslOutcome o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpSaslOutcome.AmqpSaslOutcomeBuffer create(Encoded<IAmqpList> encoded) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslResponse.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslResponse.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslResponse.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSaslResponse.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 java.util.Iterator;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
 import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
@@ -40,17 +39,12 @@
     /**
      * options map
      */
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options);
-
-    /**
-     * options map
-     */
     public void setOptions(AmqpMap options);
 
     /**
      * options map
      */
-    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions();
+    public IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions();
 
     /**
      * security response data
@@ -86,153 +80,150 @@
         private AmqpMap options;
         private AmqpBinary response;
 
-        public AmqpSaslResponseBean() {
+        AmqpSaslResponseBean() {
         }
 
-        public AmqpSaslResponseBean(IAmqpList value) {
-            //TODO we should defer decoding of the described type:
-            for(int i = 0; i < value.getListCount(); i++) {
-                set(i, value.get(i));
-            }
-        }
+        AmqpSaslResponseBean(IAmqpList value) {
 
-        public AmqpSaslResponseBean(AmqpSaslResponse.AmqpSaslResponseBean other) {
-            this.bean = other;
+        for(int i = 0; i < value.getListCount(); i++) {
+            set(i, value.get(i));
         }
+    }
 
-        public final AmqpSaslResponseBean copy() {
-            return new AmqpSaslResponse.AmqpSaslResponseBean(bean);
-        }
+    AmqpSaslResponseBean(AmqpSaslResponse.AmqpSaslResponseBean other) {
+        this.bean = other;
+    }
 
-        public final AmqpSaslResponse.AmqpSaslResponseBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
-            if(buffer == null) {
-                buffer = new AmqpSaslResponseBuffer(marshaller.encode(this));
-            }
-            return buffer;
-        }
+    public final AmqpSaslResponseBean copy() {
+        return new AmqpSaslResponse.AmqpSaslResponseBean(bean);
+    }
 
-        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
-            getBuffer(marshaller).marshal(out, marshaller);
+    public final AmqpSaslResponse.AmqpSaslResponseBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+        if(buffer == null) {
+            buffer = new AmqpSaslResponseBuffer(marshaller.encode(this));
         }
+        return buffer;
+    }
 
+    public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+        getBuffer(marshaller).marshal(out, marshaller);
+    }
 
-        public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            setOptions(new AmqpMap.AmqpMapBean(options));
-        }
 
+    public final void setOptions(AmqpMap options) {
+        copyCheck();
+        bean.options = options;
+    }
 
-        public final void setOptions(AmqpMap options) {
-            copyCheck();
-            bean.options = options;
-        }
+    public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
+        return bean.options.getValue();
+    }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
-            return bean.options.getValue();
-        }
+    public void setResponse(Buffer response) {
+        setResponse(TypeFactory.createAmqpBinary(response));
+    }
 
-        public void setResponse(Buffer response) {
-            setResponse(new AmqpBinary.AmqpBinaryBean(response));
-        }
 
+    public final void setResponse(AmqpBinary response) {
+        copyCheck();
+        bean.response = response;
+    }
 
-        public final void setResponse(AmqpBinary response) {
-            copyCheck();
-            bean.response = response;
-        }
+    public final Buffer getResponse() {
+        return bean.response.getValue();
+    }
 
-        public final Buffer getResponse() {
-            return bean.response.getValue();
+    public void set(int index, AmqpType<?, ?> value) {
+        switch(index) {
+        case 0: {
+            setOptions((AmqpMap) value);
+            break;
+        }
+        case 1: {
+            setResponse((AmqpBinary) value);
+            break;
         }
-
-        public void set(int index, AmqpType<?, ?> value) {
-            switch(index) {
-            case 0: {
-                setOptions((AmqpMap) value);
-                break;
-            }
-            case 1: {
-                setResponse((AmqpBinary) value);
-                break;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public AmqpType<?, ?> get(int index) {
-            switch(index) {
-            case 0: {
-                return bean.options;
-            }
-            case 1: {
-                return bean.response;
-            }
-            default : {
-                throw new IndexOutOfBoundsException(String.valueOf(index));
-            }
-            }
         }
+    }
 
-        public int getListCount() {
-            return 2;
+    public AmqpType<?, ?> get(int index) {
+        switch(index) {
+        case 0: {
+            return bean.options;
         }
-
-        public IAmqpList getValue() {
-            return bean;
+        case 1: {
+            return bean.response;
+        }
+        default : {
+            throw new IndexOutOfBoundsException(String.valueOf(index));
         }
-
-        public Iterator<AmqpType<?, ?>> iterator() {
-            return new AmqpListIterator(bean);
         }
+    }
 
+    public int getListCount() {
+        return 2;
+    }
 
-        private final void copyCheck() {
-            if(buffer != null) {;
-                throw new IllegalStateException("unwriteable");
-            }
-            if(bean != this) {;
-                copy(bean);
-            }
-        }
+    public IAmqpList getValue() {
+        return bean;
+    }
+
+    public Iterator<AmqpType<?, ?>> iterator() {
+        return new AmqpListIterator(bean);
+    }
 
-        private final void copy(AmqpSaslResponse.AmqpSaslResponseBean other) {
-            this.options= other.options;
-            this.response= other.response;
-            bean = this;
+
+    private final void copyCheck() {
+        if(buffer != null) {;
+            throw new IllegalStateException("unwriteable");
+        }
+        if(bean != this) {;
+            copy(bean);
         }
+    }
 
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
+    private final void copy(AmqpSaslResponse.AmqpSaslResponseBean other) {
+        bean = this;
+    }
 
-            if(t == null || !(t instanceof AmqpSaslResponse)) {
-                return false;
-            }
+    public boolean equals(Object o){
+        if(this == o) {
+            return true;
+        }
 
-            return equivalent((AmqpSaslResponse) t);
+        if(o == null || !(o instanceof AmqpSaslResponse)) {
+            return false;
         }
 
-        public boolean equivalent(AmqpSaslResponse b) {
+        return equals((AmqpSaslResponse) o);
+    }
 
-            if(b.getOptions() == null ^ getOptions() == null) {
-                return false;
-            }
-            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
-                return false;
-            }
+    public boolean equals(AmqpSaslResponse b) {
 
-            if(b.getResponse() == null ^ getResponse() == null) {
-                return false;
-            }
-            if(b.getResponse() != null && !b.getResponse().equals(getResponse())){ 
-                return false;
-            }
-            return true;
+        if(b.getOptions() == null ^ getOptions() == null) {
+            return false;
         }
+        if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+            return false;
+        }
+
+        if(b.getResponse() == null ^ getResponse() == null) {
+            return false;
+        }
+        if(b.getResponse() != null && !b.getResponse().equals(getResponse())){ 
+            return false;
+        }
+        return true;
     }
 
+    public int hashCode() {
+        return AbstractAmqpList.hashCodeFor(this);
+    }
+}
+
     public static class AmqpSaslResponseBuffer extends AmqpList.AmqpListBuffer implements AmqpSaslResponse{
 
         private AmqpSaslResponseBean bean;
@@ -241,19 +232,15 @@
             super(encoded);
         }
 
-    public void setOptions(HashMap<AmqpType<?,?>, AmqpType<?,?>> options) {
-            bean().setOptions(options);
-        }
-
         public final void setOptions(AmqpMap options) {
             bean().setOptions(options);
         }
 
-        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOptions() {
+        public final IAmqpMap<AmqpType<?, ?>, AmqpType<?, ?>> getOptions() {
             return bean().getOptions();
         }
 
-    public void setResponse(Buffer response) {
+        public void setResponse(Buffer response) {
             bean().setResponse(response);
         }
 
@@ -297,8 +284,16 @@
             return bean;
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpSaslResponse o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpSaslResponse.AmqpSaslResponseBuffer create(Encoded<IAmqpList> encoded) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSequenceNo.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSequenceNo.java?rev=909224&r1=909223&r2=909224&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSequenceNo.java (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSequenceNo.java Fri Feb 12 04:25:25 2010
@@ -43,14 +43,11 @@
         private AmqpSequenceNoBean bean = this;
         private Long value;
 
-        protected AmqpSequenceNoBean() {
-        }
-
-        public AmqpSequenceNoBean(Long value) {
+        AmqpSequenceNoBean(Long value) {
             this.value = value;
         }
 
-        public AmqpSequenceNoBean(AmqpSequenceNo.AmqpSequenceNoBean other) {
+        AmqpSequenceNoBean(AmqpSequenceNo.AmqpSequenceNoBean other) {
             this.bean = other;
         }
 
@@ -84,29 +81,10 @@
                 return false;
             }
 
-            return equivalent((AmqpSequenceNo) o);
-        }
-
-        public int hashCode() {
-            if(getValue() == null) {
-                return AmqpSequenceNo.AmqpSequenceNoBean.class.hashCode();
-            }
-            return getValue().hashCode();
-        }
-
-        public boolean equivalent(AmqpType<?,?> t){
-            if(this == t) {
-                return true;
-            }
-
-            if(t == null || !(t instanceof AmqpSequenceNo)) {
-                return false;
-            }
-
-            return equivalent((AmqpSequenceNo) t);
+            return equals((AmqpSequenceNo) o);
         }
 
-        public boolean equivalent(AmqpSequenceNo b) {
+        public boolean equals(AmqpSequenceNo b) {
             if(b == null) {
                 return false;
             }
@@ -117,6 +95,13 @@
 
             return b.getValue() == null || b.getValue().equals(getValue());
         }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpSequenceNo.AmqpSequenceNoBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
     }
 
     public static class AmqpSequenceNoBuffer extends AmqpUint.AmqpUintBuffer implements AmqpSequenceNo{
@@ -147,8 +132,16 @@
             return bean;
         }
 
-        public boolean equivalent(AmqpType<?, ?> t) {
-            return bean().equivalent(t);
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public boolean equals(AmqpSequenceNo o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
         }
 
         public static AmqpSequenceNo.AmqpSequenceNoBuffer create(Encoded<Long> encoded) {



Mime
View raw message