activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r908857 [13/17] - in /activemq/sandbox/activemq-apollo-actor/activemq-amqp: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/activemq/ src/main/java/org/apache/activemq/amqp/ src/main/ja...
Date Thu, 11 Feb 2010 07:04:46 GMT
Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpList.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpList.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpList.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpList.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,204 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Iterator;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.amqp.protocol.types.IAmqpList;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a a sequence of polymorphic values
+ */
+public interface AmqpList extends AmqpType<AmqpList.AmqpListBean, AmqpList.AmqpListBuffer>, IAmqpList {
+
+    public void set(int index, AmqpType<?, ?> value);
+    public AmqpType<?, ?> get(int index);
+    public int getListCount();
+
+    public IAmqpList getValue();
+
+    public static class AmqpListBean implements AmqpList{
+
+        private AmqpListBuffer buffer;
+        private AmqpListBean bean = this;
+        private IAmqpList value;
+
+        protected AmqpListBean() {
+        }
+
+        public AmqpListBean(IAmqpList value) {
+            this.value = value;
+        }
+
+        public AmqpListBean(AmqpList.AmqpListBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpListBean copy() {
+            return new AmqpList.AmqpListBean(bean);
+        }
+
+        public final AmqpList.AmqpListBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpListBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public void set(int index, AmqpType<?, ?> value) {
+            bean.value.set(index, value);
+        }
+
+        public AmqpType<?, ?> get(int index) {
+            return bean.value.get(index);
+        }
+
+        public int getListCount() {
+            return bean.value.getListCount();
+        }
+
+        public Iterator<AmqpType<?, ?>> iterator() {
+            return new AmqpListIterator(bean.value);
+        }
+
+        public IAmqpList getValue() {
+            return bean;
+        }
+
+
+        private final void copyCheck() {
+            if(buffer != null) {;
+                throw new IllegalStateException("unwriteable");
+            }
+            if(bean != this) {;
+                copy(bean);
+            }
+        }
+
+        private final void copy(AmqpList.AmqpListBean other) {
+            this.value = other.value;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpList)) {
+                return false;
+            }
+
+            return equivalent((AmqpList) t);
+        }
+
+        public boolean equivalent(AmqpList b) {
+            if(b == null) {
+                return false;
+            }
+
+            if(b.getValue() == null ^ getValue() == null) {
+                return false;
+            }
+
+            return b.getValue() == null || b.getValue().equals(getValue());
+        }
+    }
+
+    public static class AmqpListBuffer implements AmqpList, AmqpBuffer< IAmqpList> {
+
+        private AmqpListBean bean;
+        protected Encoded<IAmqpList> encoded;
+
+        protected AmqpListBuffer() {
+        }
+
+        protected AmqpListBuffer(Encoded<IAmqpList> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<IAmqpList> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public void set(int index, AmqpType<?, ?> value) {
+            bean().set(index, value);
+        }
+
+        public AmqpType<?, ?> get(int index) {
+            return bean().get(index);
+        }
+
+        public int getListCount() {
+            return bean().getListCount();
+        }
+
+        public Iterator<AmqpType<?, ?>> iterator() {
+            return bean().iterator();
+        }
+
+        public IAmqpList getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpList.AmqpListBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpList bean() {
+            if(bean == null) {
+                bean = new AmqpList.AmqpListBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpList.AmqpListBuffer create(Encoded<IAmqpList> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpList.AmqpListBuffer(encoded);
+        }
+
+        public static AmqpList.AmqpListBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpList(in));
+        }
+
+        public static AmqpList.AmqpListBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpList(buffer, offset));
+        }
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLong.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLong.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLong.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpLong.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,181 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.lang.Long;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a integer in the range -(2^63) to 2^63 - 1
+ */
+public interface AmqpLong extends AmqpType<AmqpLong.AmqpLongBean, AmqpLong.AmqpLongBuffer> {
+
+
+    public Long getValue();
+
+    public static class AmqpLongBean implements AmqpLong{
+
+        private AmqpLongBuffer buffer;
+        private AmqpLongBean bean = this;
+        private Long value;
+
+        protected AmqpLongBean() {
+        }
+
+        public AmqpLongBean(Long value) {
+            this.value = value;
+        }
+
+        public AmqpLongBean(AmqpLong.AmqpLongBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpLongBean copy() {
+            return bean;
+        }
+
+        public final AmqpLong.AmqpLongBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpLongBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public Long getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpLong)) {
+                return false;
+            }
+
+            return equivalent((AmqpLong) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpLong.AmqpLongBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpLong)) {
+                return false;
+            }
+
+            return equivalent((AmqpLong) t);
+        }
+
+        public boolean equivalent(AmqpLong b) {
+            if(b == null) {
+                return false;
+            }
+
+            if(b.getValue() == null ^ getValue() == null) {
+                return false;
+            }
+
+            return b.getValue() == null || b.getValue().equals(getValue());
+        }
+    }
+
+    public static class AmqpLongBuffer implements AmqpLong, AmqpBuffer< Long> {
+
+        private AmqpLongBean bean;
+        protected Encoded<Long> encoded;
+
+        protected AmqpLongBuffer() {
+        }
+
+        protected AmqpLongBuffer(Encoded<Long> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<Long> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public Long getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpLong.AmqpLongBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpLong bean() {
+            if(bean == null) {
+                bean = new AmqpLong.AmqpLongBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpLong.AmqpLongBuffer create(Encoded<Long> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpLong.AmqpLongBuffer(encoded);
+        }
+
+        public static AmqpLong.AmqpLongBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpLong(in));
+        }
+
+        public static AmqpLong.AmqpLongBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpLong(buffer, offset));
+        }
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMap.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMap.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMap.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMap.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,184 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+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.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a a polymorphic mapping from distinct keys to values
+ */
+public interface AmqpMap extends AmqpType<AmqpMap.AmqpMapBean, AmqpMap.AmqpMapBuffer> {
+
+    public void put(AmqpType<?, ?> key, AmqpType<?, ?> value);
+    public AmqpType<?, ?> get(AmqpType<?, ?> key);
+
+    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getValue();
+
+    public static class AmqpMapBean implements AmqpMap{
+
+        private AmqpMapBuffer buffer;
+        private AmqpMapBean bean = this;
+        private HashMap<AmqpType<?,?>, AmqpType<?,?>> value;
+
+        protected AmqpMapBean() {
+        }
+
+        public AmqpMapBean(HashMap<AmqpType<?,?>, AmqpType<?,?>> value) {
+            this.value = value;
+        }
+
+        public AmqpMapBean(AmqpMap.AmqpMapBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpMapBean copy() {
+            return new AmqpMap.AmqpMapBean(bean);
+        }
+
+        public final AmqpMap.AmqpMapBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpMapBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+        public void put(AmqpType<?, ?> key, AmqpType<?, ?> value) {
+            bean.value.put(key, value);
+        }
+
+        public AmqpType<?, ?> get(AmqpType<?, ?> key) {
+            return bean.value.get(key);
+        }
+
+        public HashMap<AmqpType<?,?>, AmqpType<?,?>> getValue() {
+            return bean.value;
+        }
+
+
+        private final void copyCheck() {
+            if(buffer != null) {;
+                throw new IllegalStateException("unwriteable");
+            }
+            if(bean != this) {;
+                copy(bean);
+            }
+        }
+
+        private final void copy(AmqpMap.AmqpMapBean other) {
+            this.value = other.value;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpMap)) {
+                return false;
+            }
+
+            return equivalent((AmqpMap) t);
+        }
+
+        public boolean equivalent(AmqpMap b) {
+            if(b == null) {
+                return false;
+            }
+
+            if(b.getValue() == null ^ getValue() == null) {
+                return false;
+            }
+
+            return b.getValue() == null || b.getValue().equals(getValue());
+        }
+    }
+
+    public static class AmqpMapBuffer implements AmqpMap, AmqpBuffer< HashMap<AmqpType<?,?>, AmqpType<?,?>>> {
+
+        private AmqpMapBean bean;
+        protected Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded;
+
+        protected AmqpMapBuffer() {
+        }
+
+        protected AmqpMapBuffer(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+        public void put(AmqpType<?, ?> key, AmqpType<?, ?> value) {
+            bean().put(key, value);
+        }
+
+        public AmqpType<?, ?> get(AmqpType<?, ?> key) {
+            return bean().get(key);
+        }
+
+        public HashMap<AmqpType<?,?>, AmqpType<?,?>> getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpMap.AmqpMapBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpMap bean() {
+            if(bean == null) {
+                bean = new AmqpMap.AmqpMapBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpMap.AmqpMapBuffer create(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpMap.AmqpMapBuffer(encoded);
+        }
+
+        public static AmqpMap.AmqpMapBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpMap(in));
+        }
+
+        public static AmqpMap.AmqpMapBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpMap(buffer, offset));
+        }
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageAttributes.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageAttributes.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageAttributes.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageAttributes.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,179 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+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.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.amqp.protocol.types.AmqpMap;
+import org.apache.activemq.amqp.protocol.types.AmqpMessageAttributes;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * <p>
+ * A map providing an extension point by which annotations on message deliveries. All values
+ * used as keys in the map MUST be of type symbol. Further if a key begins with the string
+ * "x-req-" then the target MUST reject the message unless it understands how to process the
+ * supplied key/value.
+ * </p>
+ */
+public interface AmqpMessageAttributes extends AmqpMap {
+
+
+    public static class AmqpMessageAttributesBean implements AmqpMessageAttributes{
+
+        private AmqpMessageAttributesBuffer buffer;
+        private AmqpMessageAttributesBean bean = this;
+        private HashMap<AmqpType<?,?>, AmqpType<?,?>> value;
+
+        protected AmqpMessageAttributesBean() {
+        }
+
+        public AmqpMessageAttributesBean(HashMap<AmqpType<?,?>, AmqpType<?,?>> value) {
+            this.value = value;
+        }
+
+        public AmqpMessageAttributesBean(AmqpMessageAttributes.AmqpMessageAttributesBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpMessageAttributesBean copy() {
+            return new AmqpMessageAttributes.AmqpMessageAttributesBean(bean);
+        }
+
+        public final AmqpMessageAttributes.AmqpMessageAttributesBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpMessageAttributesBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+        public void put(AmqpType<?, ?> key, AmqpType<?, ?> value) {
+            bean.value.put(key, value);
+        }
+
+        public AmqpType<?, ?> get(AmqpType<?, ?> key) {
+            return bean.value.get(key);
+        }
+
+        public HashMap<AmqpType<?,?>, AmqpType<?,?>> getValue() {
+            return bean.value;
+        }
+
+
+        private final void copyCheck() {
+            if(buffer != null) {;
+                throw new IllegalStateException("unwriteable");
+            }
+            if(bean != this) {;
+                copy(bean);
+            }
+        }
+
+        private final void copy(AmqpMessageAttributes.AmqpMessageAttributesBean other) {
+            this.value = other.value;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpMessageAttributes)) {
+                return false;
+            }
+
+            return equivalent((AmqpMessageAttributes) t);
+        }
+
+        public boolean equivalent(AmqpMessageAttributes b) {
+            if(b == null) {
+                return false;
+            }
+
+            if(b.getValue() == null ^ getValue() == null) {
+                return false;
+            }
+
+            return b.getValue() == null || b.getValue().equals(getValue());
+        }
+    }
+
+    public static class AmqpMessageAttributesBuffer extends AmqpMap.AmqpMapBuffer implements AmqpMessageAttributes{
+
+        private AmqpMessageAttributesBean bean;
+
+        protected AmqpMessageAttributesBuffer() {
+            super();
+        }
+
+        protected AmqpMessageAttributesBuffer(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            super(encoded);
+        }
+        public void put(AmqpType<?, ?> key, AmqpType<?, ?> value) {
+            bean().put(key, value);
+        }
+
+        public AmqpType<?, ?> get(AmqpType<?, ?> key) {
+            return bean().get(key);
+        }
+
+        public HashMap<AmqpType<?,?>, AmqpType<?,?>> getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpMessageAttributes.AmqpMessageAttributesBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpMessageAttributes bean() {
+            if(bean == null) {
+                bean = new AmqpMessageAttributes.AmqpMessageAttributesBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpMessageAttributes.AmqpMessageAttributesBuffer create(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpMessageAttributes.AmqpMessageAttributesBuffer(encoded);
+        }
+
+        public static AmqpMessageAttributes.AmqpMessageAttributesBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpMap(in));
+        }
+
+        public static AmqpMessageAttributes.AmqpMessageAttributesBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpMap(buffer, offset));
+        }
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageState.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageState.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageState.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpMessageState.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+import java.lang.Short;
+import java.util.HashMap;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
+import org.apache.activemq.amqp.protocol.types.AmqpUbyte;
+
+/**
+ * <p>
+ * An enumeration of the defined states of a Message on a Node.
+ * </p>
+ */
+public enum AmqpMessageState {
+
+    /**
+     * <p>
+     * The AVAILABLE state.
+     * </p>
+     */
+    AVAILABLE(new Short("0")),
+    /**
+     * <p>
+     * The ACQUIRED state.
+     * </p>
+     */
+    ACQUIRED(new Short("1")),
+    /**
+     * <p>
+     * The ARCHIVED state.
+     * </p>
+     */
+    ARCHIVED(new Short("2"));
+
+    private static final HashMap<Short, AmqpMessageState> LOOKUP = new HashMap<Short, AmqpMessageState>(2);
+    static {
+        for (AmqpMessageState messageState : AmqpMessageState.values()) {
+            LOOKUP.put(messageState.value.getValue(), messageState);
+        }
+    }
+
+    private final AmqpUbyte value;
+
+    private AmqpMessageState(Short value) {
+        this.value = new AmqpUbyte.AmqpUbyteBean(value);
+    }
+
+    public final AmqpUbyte getValue() {
+        return value;
+    }
+
+    public static final AmqpMessageState get(AmqpUbyte value) throws AmqpEncodingError{
+        AmqpMessageState messageState= LOOKUP.get(value.getValue());
+        if (messageState == null) {
+            //TODO perhaps this should be an IllegalArgumentException?
+            throw new AmqpEncodingError("Unknown messageState: " + value + " expected one of " + LOOKUP.keySet());
+        }
+        return messageState;
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNoop.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNoop.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNoop.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNoop.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,245 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Iterator;
+import org.apache.activemq.amqp.protocol.AmqpCommand;
+import org.apache.activemq.amqp.protocol.AmqpCommandHandler;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.amqp.protocol.types.IAmqpList;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a a command that does nothing
+ * <p>
+ * A command that does nothing.
+ * </p>
+ */
+public interface AmqpNoop extends AmqpList, AmqpCommand {
+
+
+
+    /**
+     * options map
+     */
+    public void setOptions(AmqpOptions options);
+
+    /**
+     * options map
+     */
+    public AmqpOptions getOptions();
+
+    public static class AmqpNoopBean implements AmqpNoop{
+
+        private AmqpNoopBuffer buffer;
+        private AmqpNoopBean bean = this;
+        private AmqpOptions options;
+
+        public AmqpNoopBean() {
+        }
+
+        public AmqpNoopBean(IAmqpList value) {
+            //TODO we should defer decoding of the described type:
+            for(int i = 0; i < value.getListCount(); i++) {
+                set(i, value.get(i));
+            }
+        }
+
+        public AmqpNoopBean(AmqpNoop.AmqpNoopBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpNoopBean copy() {
+            return new AmqpNoop.AmqpNoopBean(bean);
+        }
+
+        public final void handle(AmqpCommandHandler handler) throws Exception {
+            handler.handleNoop(this);
+        }
+
+        public final AmqpNoop.AmqpNoopBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpNoopBuffer(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 void set(int index, AmqpType<?, ?> value) {
+            switch(index) {
+            case 0: {
+                setOptions((AmqpOptions) value);
+                break;
+            }
+            default : {
+                throw new IndexOutOfBoundsException(String.valueOf(index));
+            }
+            }
+        }
+
+        public AmqpType<?, ?> get(int index) {
+            switch(index) {
+            case 0: {
+                return bean.options;
+            }
+            default : {
+                throw new IndexOutOfBoundsException(String.valueOf(index));
+            }
+            }
+        }
+
+        public int getListCount() {
+            return 1;
+        }
+
+        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(AmqpNoop.AmqpNoopBean other) {
+            this.options= other.options;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpNoop)) {
+                return false;
+            }
+
+            return equivalent((AmqpNoop) t);
+        }
+
+        public boolean equivalent(AmqpNoop b) {
+
+            if(b.getOptions() == null ^ getOptions() == null) {
+                return false;
+            }
+            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+                return false;
+            }
+            return true;
+        }
+    }
+
+    public static class AmqpNoopBuffer extends AmqpList.AmqpListBuffer implements AmqpNoop{
+
+        private AmqpNoopBean bean;
+
+        protected AmqpNoopBuffer(Encoded<IAmqpList> encoded) {
+            super(encoded);
+        }
+
+        public final void setOptions(AmqpOptions options) {
+            bean().setOptions(options);
+        }
+
+        public final AmqpOptions getOptions() {
+            return bean().getOptions();
+        }
+
+        public void set(int index, AmqpType<?, ?> value) {
+            bean().set(index, value);
+        }
+
+        public AmqpType<?, ?> get(int index) {
+            return bean().get(index);
+        }
+
+        public int getListCount() {
+            return bean().getListCount();
+        }
+
+        public Iterator<AmqpType<?, ?>> iterator() {
+            return bean().iterator();
+        }
+
+        public IAmqpList getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpNoop.AmqpNoopBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpNoop bean() {
+            if(bean == null) {
+                bean = new AmqpNoop.AmqpNoopBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public final void handle(AmqpCommandHandler handler) throws Exception {
+            handler.handleNoop(this);
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpNoop.AmqpNoopBuffer create(Encoded<IAmqpList> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpNoop.AmqpNoopBuffer(encoded);
+        }
+
+        public static AmqpNoop.AmqpNoopBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpNoop(in));
+        }
+
+        public static AmqpNoop.AmqpNoopBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpNoop(buffer, offset));
+        }
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNull.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNull.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNull.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpNull.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,181 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.lang.Object;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a indicates an empty value
+ */
+public interface AmqpNull extends AmqpType<AmqpNull.AmqpNullBean, AmqpNull.AmqpNullBuffer> {
+
+
+    public Object getValue();
+
+    public static class AmqpNullBean implements AmqpNull{
+
+        private AmqpNullBuffer buffer;
+        private AmqpNullBean bean = this;
+        private Object value;
+
+        protected AmqpNullBean() {
+        }
+
+        public AmqpNullBean(Object value) {
+            this.value = value;
+        }
+
+        public AmqpNullBean(AmqpNull.AmqpNullBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpNullBean copy() {
+            return bean;
+        }
+
+        public final AmqpNull.AmqpNullBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpNullBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public Object getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpNull)) {
+                return false;
+            }
+
+            return equivalent((AmqpNull) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpNull.AmqpNullBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpNull)) {
+                return false;
+            }
+
+            return equivalent((AmqpNull) t);
+        }
+
+        public boolean equivalent(AmqpNull b) {
+            if(b == null) {
+                return false;
+            }
+
+            if(b.getValue() == null ^ getValue() == null) {
+                return false;
+            }
+
+            return b.getValue() == null || b.getValue().equals(getValue());
+        }
+    }
+
+    public static class AmqpNullBuffer implements AmqpNull, AmqpBuffer< Object> {
+
+        private AmqpNullBean bean;
+        protected Encoded<Object> encoded;
+
+        protected AmqpNullBuffer() {
+        }
+
+        protected AmqpNullBuffer(Encoded<Object> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<Object> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public Object getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpNull.AmqpNullBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpNull bean() {
+            if(bean == null) {
+                bean = new AmqpNull.AmqpNullBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equals(Object o){
+            return bean().equals(o);
+        }
+
+        public int hashCode() {
+            return bean().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpNull.AmqpNullBuffer create(Encoded<Object> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpNull.AmqpNullBuffer(encoded);
+        }
+
+        public static AmqpNull.AmqpNullBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpNull(in));
+        }
+
+        public static AmqpNull.AmqpNullBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpNull(buffer, offset));
+        }
+    }
+}
\ No newline at end of file

Added: activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpOpen.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpOpen.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpOpen.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpOpen.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,1004 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * his work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.amqp.protocol.types;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.lang.Integer;
+import java.lang.Long;
+import java.lang.String;
+import java.util.HashMap;
+import java.util.Iterator;
+import org.apache.activemq.amqp.protocol.AmqpCommand;
+import org.apache.activemq.amqp.protocol.AmqpCommandHandler;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpEncodingError;
+import org.apache.activemq.amqp.protocol.marshaller.AmqpMarshaller;
+import org.apache.activemq.amqp.protocol.marshaller.Encoded;
+import org.apache.activemq.amqp.protocol.types.IAmqpList;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a negotiate Connection parameters
+ * <p>
+ * The open control MUST be the first frame sent in each direction on the Connection. (Note
+ * that the Connection header which is sent first on the Connection is *not* a frame.) The
+ * fields indicate the capabilities and limitations of the sending peer.
+ * </p>
+ */
+public interface AmqpOpen extends AmqpList, AmqpCommand {
+
+
+
+    /**
+     * options map
+     */
+    public void setOptions(AmqpOptions options);
+
+    /**
+     * options map
+     */
+    public AmqpOptions getOptions();
+
+    /**
+     * the id of the source container
+     */
+    public void setContainerId(String containerId);
+
+    /**
+     * the id of the source container
+     */
+    public void setContainerId(AmqpString containerId);
+
+    /**
+     * the id of the source container
+     */
+    public String getContainerId();
+
+    /**
+     * the name of the target host
+     * <p>
+     * The dns name of the host (either fully qualified or relative) to which the sending peer
+     * is connecting. It is not mandatory to provide the hostname. If no hostname is provided
+     * the receiving peer should select a default based on its own configuration.
+     * </p>
+     */
+    public void setHostname(String hostname);
+
+    /**
+     * the name of the target host
+     * <p>
+     * The dns name of the host (either fully qualified or relative) to which the sending peer
+     * is connecting. It is not mandatory to provide the hostname. If no hostname is provided
+     * the receiving peer should select a default based on its own configuration.
+     * </p>
+     */
+    public void setHostname(AmqpString hostname);
+
+    /**
+     * the name of the target host
+     * <p>
+     * The dns name of the host (either fully qualified or relative) to which the sending peer
+     * is connecting. It is not mandatory to provide the hostname. If no hostname is provided
+     * the receiving peer should select a default based on its own configuration.
+     * </p>
+     */
+    public String getHostname();
+
+    /**
+     * proposed maximum frame size
+     * <p>
+     * The largest frame size that the sending peer is able to accept on this Connection. If
+     * this field is not set it means that the peer does not impose any specific limit. A peer
+     * MUST NOT send frames larger than its partner can handle. A peer that receives an
+     * oversized frame MUST close the Connection with the framing-error error-code.
+     * </p>
+     * <p>
+     * octets
+     * large.
+     * </p>
+     */
+    public void setMaxFrameSize(Long maxFrameSize);
+
+    /**
+     * proposed maximum frame size
+     * <p>
+     * The largest frame size that the sending peer is able to accept on this Connection. If
+     * this field is not set it means that the peer does not impose any specific limit. A peer
+     * MUST NOT send frames larger than its partner can handle. A peer that receives an
+     * oversized frame MUST close the Connection with the framing-error error-code.
+     * </p>
+     * <p>
+     * octets
+     * large.
+     * </p>
+     */
+    public void setMaxFrameSize(AmqpUint maxFrameSize);
+
+    /**
+     * proposed maximum frame size
+     * <p>
+     * The largest frame size that the sending peer is able to accept on this Connection. If
+     * this field is not set it means that the peer does not impose any specific limit. A peer
+     * MUST NOT send frames larger than its partner can handle. A peer that receives an
+     * oversized frame MUST close the Connection with the framing-error error-code.
+     * </p>
+     * <p>
+     * octets
+     * large.
+     * </p>
+     */
+    public Long getMaxFrameSize();
+
+    /**
+     * the maximum channel number that may be used on the Connection
+     * <p>
+     * The channel-max value is the highest channel number that may be used on the Connection.
+     * This value plus one is the maximum number of Sessions that may be simultaneously
+     * attached. A peer MUST not use channel numbers outside the range that its partner can
+     * handle. A peer that receives a channel number outside the supported range MUST close the
+     * Connection with the framing-error error-code.
+     * </p>
+     */
+    public void setChannelMax(Integer channelMax);
+
+    /**
+     * the maximum channel number that may be used on the Connection
+     * <p>
+     * The channel-max value is the highest channel number that may be used on the Connection.
+     * This value plus one is the maximum number of Sessions that may be simultaneously
+     * attached. A peer MUST not use channel numbers outside the range that its partner can
+     * handle. A peer that receives a channel number outside the supported range MUST close the
+     * Connection with the framing-error error-code.
+     * </p>
+     */
+    public void setChannelMax(AmqpUshort channelMax);
+
+    /**
+     * the maximum channel number that may be used on the Connection
+     * <p>
+     * The channel-max value is the highest channel number that may be used on the Connection.
+     * This value plus one is the maximum number of Sessions that may be simultaneously
+     * attached. A peer MUST not use channel numbers outside the range that its partner can
+     * handle. A peer that receives a channel number outside the supported range MUST close the
+     * Connection with the framing-error error-code.
+     * </p>
+     */
+    public Integer getChannelMax();
+
+    /**
+     * proposed heartbeat interval
+     * <p>
+     * The proposed interval, in seconds, of the Connection heartbeat desired by the sender. A
+     * value of zero means heartbeats are not supported. If the value is not set, the sender
+     * supports all heartbeat intervals. The heartbeat-interval established is the minimum of
+     * the two proposed heartbeat-intervals. If neither value is set, there is no heartbeat.
+     * </p>
+     */
+    public void setHeartbeatInterval(Integer heartbeatInterval);
+
+    /**
+     * proposed heartbeat interval
+     * <p>
+     * The proposed interval, in seconds, of the Connection heartbeat desired by the sender. A
+     * value of zero means heartbeats are not supported. If the value is not set, the sender
+     * supports all heartbeat intervals. The heartbeat-interval established is the minimum of
+     * the two proposed heartbeat-intervals. If neither value is set, there is no heartbeat.
+     * </p>
+     */
+    public void setHeartbeatInterval(AmqpUshort heartbeatInterval);
+
+    /**
+     * proposed heartbeat interval
+     * <p>
+     * The proposed interval, in seconds, of the Connection heartbeat desired by the sender. A
+     * value of zero means heartbeats are not supported. If the value is not set, the sender
+     * supports all heartbeat intervals. The heartbeat-interval established is the minimum of
+     * the two proposed heartbeat-intervals. If neither value is set, there is no heartbeat.
+     * </p>
+     */
+    public Integer getHeartbeatInterval();
+
+    /**
+     * locales available for outgoing text
+     * <p>
+     * A list of the locales that the peer supports for sending informational text. This
+     * includes Connection, Session and Link exception text. The default is the en_US locale.
+     * A peer MUST support at least the en_US locale. Since this value is always supported, it
+     * need not be supplied in the outgoing-locales.
+     * </p>
+     */
+    public void setOutgoingLocales(IAmqpList outgoingLocales);
+
+    /**
+     * locales available for outgoing text
+     * <p>
+     * A list of the locales that the peer supports for sending informational text. This
+     * includes Connection, Session and Link exception text. The default is the en_US locale.
+     * A peer MUST support at least the en_US locale. Since this value is always supported, it
+     * need not be supplied in the outgoing-locales.
+     * </p>
+     */
+    public void setOutgoingLocales(AmqpList outgoingLocales);
+
+    /**
+     * locales available for outgoing text
+     * <p>
+     * A list of the locales that the peer supports for sending informational text. This
+     * includes Connection, Session and Link exception text. The default is the en_US locale.
+     * A peer MUST support at least the en_US locale. Since this value is always supported, it
+     * need not be supplied in the outgoing-locales.
+     * </p>
+     */
+    public IAmqpList getOutgoingLocales();
+
+    /**
+     * desired locales for incoming text in decreasing level of preference
+     * <p>
+     * A list of locales that the sending peer permits for incoming informational text. This
+     * list is ordered in decreasing level of preference. The receiving partner will chose the
+     * first (most preferred) incoming locale from those which it supports. If none of the
+     * requested locales are supported, en_US will be chosen. Note that en_US need not be
+     * supplied in this list as it is always the fallback. A peer may determine which of the
+     * permitted incoming locales is chosen by examining the partner's supported locales as
+     * specified in the outgoing-locales field.
+     * </p>
+     */
+    public void setIncomingLocales(IAmqpList incomingLocales);
+
+    /**
+     * desired locales for incoming text in decreasing level of preference
+     * <p>
+     * A list of locales that the sending peer permits for incoming informational text. This
+     * list is ordered in decreasing level of preference. The receiving partner will chose the
+     * first (most preferred) incoming locale from those which it supports. If none of the
+     * requested locales are supported, en_US will be chosen. Note that en_US need not be
+     * supplied in this list as it is always the fallback. A peer may determine which of the
+     * permitted incoming locales is chosen by examining the partner's supported locales as
+     * specified in the outgoing-locales field.
+     * </p>
+     */
+    public void setIncomingLocales(AmqpList incomingLocales);
+
+    /**
+     * desired locales for incoming text in decreasing level of preference
+     * <p>
+     * A list of locales that the sending peer permits for incoming informational text. This
+     * list is ordered in decreasing level of preference. The receiving partner will chose the
+     * first (most preferred) incoming locale from those which it supports. If none of the
+     * requested locales are supported, en_US will be chosen. Note that en_US need not be
+     * supplied in this list as it is always the fallback. A peer may determine which of the
+     * permitted incoming locales is chosen by examining the partner's supported locales as
+     * specified in the outgoing-locales field.
+     * </p>
+     */
+    public IAmqpList getIncomingLocales();
+
+    /**
+     * peer properties
+     * <p>
+     * The properties SHOULD contain at least these fields: "product", giving the name of the
+     * client product, "version", giving the name of the client version, "platform", giving the
+     * name of the operating system, "copyright", if appropriate, and "information", giving
+     * other general information.
+     * </p>
+     */
+    public void setPeerProperties(HashMap<AmqpType<?,?>, AmqpType<?,?>> peerProperties);
+
+    /**
+     * peer properties
+     * <p>
+     * The properties SHOULD contain at least these fields: "product", giving the name of the
+     * client product, "version", giving the name of the client version, "platform", giving the
+     * name of the operating system, "copyright", if appropriate, and "information", giving
+     * other general information.
+     * </p>
+     */
+    public void setPeerProperties(AmqpMap peerProperties);
+
+    /**
+     * peer properties
+     * <p>
+     * The properties SHOULD contain at least these fields: "product", giving the name of the
+     * client product, "version", giving the name of the client version, "platform", giving the
+     * name of the operating system, "copyright", if appropriate, and "information", giving
+     * other general information.
+     * </p>
+     */
+    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getPeerProperties();
+
+    /**
+     * the extension capabilities the sender supports
+     * <p>
+     * If the receiver of the offered-capabilities requires an extension capability which is
+     * not present in the offered-capability list then it MUST close the connection.
+     * </p>
+     */
+    public void setOfferedCapabilities(IAmqpList offeredCapabilities);
+
+    /**
+     * the extension capabilities the sender supports
+     * <p>
+     * If the receiver of the offered-capabilities requires an extension capability which is
+     * not present in the offered-capability list then it MUST close the connection.
+     * </p>
+     */
+    public void setOfferedCapabilities(AmqpList offeredCapabilities);
+
+    /**
+     * the extension capabilities the sender supports
+     * <p>
+     * If the receiver of the offered-capabilities requires an extension capability which is
+     * not present in the offered-capability list then it MUST close the connection.
+     * </p>
+     */
+    public IAmqpList getOfferedCapabilities();
+
+    /**
+     * the extension capabilities the sender may use if the receiver supports them
+     * <p>
+     * The desired-capability list defines which extension capabilities the sender MAY use if
+     * the receiver offers them (i.e. they are in the offered-capabilities list received by the
+     * sender of the desired-capabilities). If the receiver of the desired-capabilities offers
+     * extension capabilities which are not present in the desired-capability list it received,
+     * then it can be sure those (undesired) capabilities will not be used on the
+     * Connection.
+     * </p>
+     */
+    public void setDesiredCapabilities(IAmqpList desiredCapabilities);
+
+    /**
+     * the extension capabilities the sender may use if the receiver supports them
+     * <p>
+     * The desired-capability list defines which extension capabilities the sender MAY use if
+     * the receiver offers them (i.e. they are in the offered-capabilities list received by the
+     * sender of the desired-capabilities). If the receiver of the desired-capabilities offers
+     * extension capabilities which are not present in the desired-capability list it received,
+     * then it can be sure those (undesired) capabilities will not be used on the
+     * Connection.
+     * </p>
+     */
+    public void setDesiredCapabilities(AmqpList desiredCapabilities);
+
+    /**
+     * the extension capabilities the sender may use if the receiver supports them
+     * <p>
+     * The desired-capability list defines which extension capabilities the sender MAY use if
+     * the receiver offers them (i.e. they are in the offered-capabilities list received by the
+     * sender of the desired-capabilities). If the receiver of the desired-capabilities offers
+     * extension capabilities which are not present in the desired-capability list it received,
+     * then it can be sure those (undesired) capabilities will not be used on the
+     * Connection.
+     * </p>
+     */
+    public IAmqpList getDesiredCapabilities();
+
+    public static class AmqpOpenBean implements AmqpOpen{
+
+        private AmqpOpenBuffer buffer;
+        private AmqpOpenBean bean = this;
+        private AmqpOptions options;
+        private AmqpString containerId;
+        private AmqpString hostname;
+        private AmqpUint maxFrameSize;
+        private AmqpUshort channelMax;
+        private AmqpUshort heartbeatInterval;
+        private AmqpList outgoingLocales;
+        private AmqpList incomingLocales;
+        private AmqpMap peerProperties;
+        private AmqpList offeredCapabilities;
+        private AmqpList desiredCapabilities;
+
+        public AmqpOpenBean() {
+        }
+
+        public AmqpOpenBean(IAmqpList value) {
+            //TODO we should defer decoding of the described type:
+            for(int i = 0; i < value.getListCount(); i++) {
+                set(i, value.get(i));
+            }
+        }
+
+        public AmqpOpenBean(AmqpOpen.AmqpOpenBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpOpenBean copy() {
+            return new AmqpOpen.AmqpOpenBean(bean);
+        }
+
+        public final void handle(AmqpCommandHandler handler) throws Exception {
+            handler.handleOpen(this);
+        }
+
+        public final AmqpOpen.AmqpOpenBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpOpenBuffer(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 void setContainerId(String containerId) {
+            setContainerId(new AmqpString.AmqpStringBean(containerId));
+        }
+
+
+        public final void setContainerId(AmqpString containerId) {
+            copyCheck();
+            bean.containerId = containerId;
+        }
+
+        public final String getContainerId() {
+            return bean.containerId.getValue();
+        }
+
+        public void setHostname(String hostname) {
+            setHostname(new AmqpString.AmqpStringBean(hostname));
+        }
+
+
+        public final void setHostname(AmqpString hostname) {
+            copyCheck();
+            bean.hostname = hostname;
+        }
+
+        public final String getHostname() {
+            return bean.hostname.getValue();
+        }
+
+        public void setMaxFrameSize(Long maxFrameSize) {
+            setMaxFrameSize(new AmqpUint.AmqpUintBean(maxFrameSize));
+        }
+
+
+        public final void setMaxFrameSize(AmqpUint maxFrameSize) {
+            copyCheck();
+            bean.maxFrameSize = maxFrameSize;
+        }
+
+        public final Long getMaxFrameSize() {
+            return bean.maxFrameSize.getValue();
+        }
+
+        public void setChannelMax(Integer channelMax) {
+            setChannelMax(new AmqpUshort.AmqpUshortBean(channelMax));
+        }
+
+
+        public final void setChannelMax(AmqpUshort channelMax) {
+            copyCheck();
+            bean.channelMax = channelMax;
+        }
+
+        public final Integer getChannelMax() {
+            return bean.channelMax.getValue();
+        }
+
+        public void setHeartbeatInterval(Integer heartbeatInterval) {
+            setHeartbeatInterval(new AmqpUshort.AmqpUshortBean(heartbeatInterval));
+        }
+
+
+        public final void setHeartbeatInterval(AmqpUshort heartbeatInterval) {
+            copyCheck();
+            bean.heartbeatInterval = heartbeatInterval;
+        }
+
+        public final Integer getHeartbeatInterval() {
+            return bean.heartbeatInterval.getValue();
+        }
+
+        public void setOutgoingLocales(IAmqpList outgoingLocales) {
+            setOutgoingLocales(new AmqpList.AmqpListBean(outgoingLocales));
+        }
+
+
+        public final void setOutgoingLocales(AmqpList outgoingLocales) {
+            copyCheck();
+            bean.outgoingLocales = outgoingLocales;
+        }
+
+        public final IAmqpList getOutgoingLocales() {
+            return bean.outgoingLocales.getValue();
+        }
+
+        public void setIncomingLocales(IAmqpList incomingLocales) {
+            setIncomingLocales(new AmqpList.AmqpListBean(incomingLocales));
+        }
+
+
+        public final void setIncomingLocales(AmqpList incomingLocales) {
+            copyCheck();
+            bean.incomingLocales = incomingLocales;
+        }
+
+        public final IAmqpList getIncomingLocales() {
+            return bean.incomingLocales.getValue();
+        }
+
+        public void setPeerProperties(HashMap<AmqpType<?,?>, AmqpType<?,?>> peerProperties) {
+            setPeerProperties(new AmqpMap.AmqpMapBean(peerProperties));
+        }
+
+
+        public final void setPeerProperties(AmqpMap peerProperties) {
+            copyCheck();
+            bean.peerProperties = peerProperties;
+        }
+
+        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getPeerProperties() {
+            return bean.peerProperties.getValue();
+        }
+
+        public void setOfferedCapabilities(IAmqpList offeredCapabilities) {
+            setOfferedCapabilities(new AmqpList.AmqpListBean(offeredCapabilities));
+        }
+
+
+        public final void setOfferedCapabilities(AmqpList offeredCapabilities) {
+            copyCheck();
+            bean.offeredCapabilities = offeredCapabilities;
+        }
+
+        public final IAmqpList getOfferedCapabilities() {
+            return bean.offeredCapabilities.getValue();
+        }
+
+        public void setDesiredCapabilities(IAmqpList desiredCapabilities) {
+            setDesiredCapabilities(new AmqpList.AmqpListBean(desiredCapabilities));
+        }
+
+
+        public final void setDesiredCapabilities(AmqpList desiredCapabilities) {
+            copyCheck();
+            bean.desiredCapabilities = desiredCapabilities;
+        }
+
+        public final IAmqpList getDesiredCapabilities() {
+            return bean.desiredCapabilities.getValue();
+        }
+
+        public void set(int index, AmqpType<?, ?> value) {
+            switch(index) {
+            case 0: {
+                setOptions((AmqpOptions) value);
+                break;
+            }
+            case 1: {
+                setContainerId((AmqpString) value);
+                break;
+            }
+            case 2: {
+                setHostname((AmqpString) value);
+                break;
+            }
+            case 3: {
+                setMaxFrameSize((AmqpUint) value);
+                break;
+            }
+            case 4: {
+                setChannelMax((AmqpUshort) value);
+                break;
+            }
+            case 5: {
+                setHeartbeatInterval((AmqpUshort) value);
+                break;
+            }
+            case 6: {
+                setOutgoingLocales((AmqpList) value);
+                break;
+            }
+            case 7: {
+                setIncomingLocales((AmqpList) value);
+                break;
+            }
+            case 8: {
+                setPeerProperties((AmqpMap) value);
+                break;
+            }
+            case 9: {
+                setOfferedCapabilities((AmqpList) value);
+                break;
+            }
+            case 10: {
+                setDesiredCapabilities((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.containerId;
+            }
+            case 2: {
+                return bean.hostname;
+            }
+            case 3: {
+                return bean.maxFrameSize;
+            }
+            case 4: {
+                return bean.channelMax;
+            }
+            case 5: {
+                return bean.heartbeatInterval;
+            }
+            case 6: {
+                return bean.outgoingLocales;
+            }
+            case 7: {
+                return bean.incomingLocales;
+            }
+            case 8: {
+                return bean.peerProperties;
+            }
+            case 9: {
+                return bean.offeredCapabilities;
+            }
+            case 10: {
+                return bean.desiredCapabilities;
+            }
+            default : {
+                throw new IndexOutOfBoundsException(String.valueOf(index));
+            }
+            }
+        }
+
+        public int getListCount() {
+            return 11;
+        }
+
+        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(AmqpOpen.AmqpOpenBean other) {
+            this.options= other.options;
+            this.containerId= other.containerId;
+            this.hostname= other.hostname;
+            this.maxFrameSize= other.maxFrameSize;
+            this.channelMax= other.channelMax;
+            this.heartbeatInterval= other.heartbeatInterval;
+            this.outgoingLocales= other.outgoingLocales;
+            this.incomingLocales= other.incomingLocales;
+            this.peerProperties= other.peerProperties;
+            this.offeredCapabilities= other.offeredCapabilities;
+            this.desiredCapabilities= other.desiredCapabilities;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpOpen)) {
+                return false;
+            }
+
+            return equivalent((AmqpOpen) t);
+        }
+
+        public boolean equivalent(AmqpOpen b) {
+
+            if(b.getOptions() == null ^ getOptions() == null) {
+                return false;
+            }
+            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+                return false;
+            }
+
+            if(b.getContainerId() == null ^ getContainerId() == null) {
+                return false;
+            }
+            if(b.getContainerId() != null && !b.getContainerId().equals(getContainerId())){ 
+                return false;
+            }
+
+            if(b.getHostname() == null ^ getHostname() == null) {
+                return false;
+            }
+            if(b.getHostname() != null && !b.getHostname().equals(getHostname())){ 
+                return false;
+            }
+
+            if(b.getMaxFrameSize() == null ^ getMaxFrameSize() == null) {
+                return false;
+            }
+            if(b.getMaxFrameSize() != null && !b.getMaxFrameSize().equals(getMaxFrameSize())){ 
+                return false;
+            }
+
+            if(b.getChannelMax() == null ^ getChannelMax() == null) {
+                return false;
+            }
+            if(b.getChannelMax() != null && !b.getChannelMax().equals(getChannelMax())){ 
+                return false;
+            }
+
+            if(b.getHeartbeatInterval() == null ^ getHeartbeatInterval() == null) {
+                return false;
+            }
+            if(b.getHeartbeatInterval() != null && !b.getHeartbeatInterval().equals(getHeartbeatInterval())){ 
+                return false;
+            }
+
+            if(b.getOutgoingLocales() == null ^ getOutgoingLocales() == null) {
+                return false;
+            }
+            if(b.getOutgoingLocales() != null && !b.getOutgoingLocales().equals(getOutgoingLocales())){ 
+                return false;
+            }
+
+            if(b.getIncomingLocales() == null ^ getIncomingLocales() == null) {
+                return false;
+            }
+            if(b.getIncomingLocales() != null && !b.getIncomingLocales().equals(getIncomingLocales())){ 
+                return false;
+            }
+
+            if(b.getPeerProperties() == null ^ getPeerProperties() == null) {
+                return false;
+            }
+            if(b.getPeerProperties() != null && !b.getPeerProperties().equals(getPeerProperties())){ 
+                return false;
+            }
+
+            if(b.getOfferedCapabilities() == null ^ getOfferedCapabilities() == null) {
+                return false;
+            }
+            if(b.getOfferedCapabilities() != null && !b.getOfferedCapabilities().equals(getOfferedCapabilities())){ 
+                return false;
+            }
+
+            if(b.getDesiredCapabilities() == null ^ getDesiredCapabilities() == null) {
+                return false;
+            }
+            if(b.getDesiredCapabilities() != null && !b.getDesiredCapabilities().equals(getDesiredCapabilities())){ 
+                return false;
+            }
+            return true;
+        }
+    }
+
+    public static class AmqpOpenBuffer extends AmqpList.AmqpListBuffer implements AmqpOpen{
+
+        private AmqpOpenBean bean;
+
+        protected AmqpOpenBuffer(Encoded<IAmqpList> encoded) {
+            super(encoded);
+        }
+
+        public final void setOptions(AmqpOptions options) {
+            bean().setOptions(options);
+        }
+
+        public final AmqpOptions getOptions() {
+            return bean().getOptions();
+        }
+
+    public void setContainerId(String containerId) {
+            bean().setContainerId(containerId);
+        }
+
+        public final void setContainerId(AmqpString containerId) {
+            bean().setContainerId(containerId);
+        }
+
+        public final String getContainerId() {
+            return bean().getContainerId();
+        }
+
+    public void setHostname(String hostname) {
+            bean().setHostname(hostname);
+        }
+
+        public final void setHostname(AmqpString hostname) {
+            bean().setHostname(hostname);
+        }
+
+        public final String getHostname() {
+            return bean().getHostname();
+        }
+
+    public void setMaxFrameSize(Long maxFrameSize) {
+            bean().setMaxFrameSize(maxFrameSize);
+        }
+
+        public final void setMaxFrameSize(AmqpUint maxFrameSize) {
+            bean().setMaxFrameSize(maxFrameSize);
+        }
+
+        public final Long getMaxFrameSize() {
+            return bean().getMaxFrameSize();
+        }
+
+    public void setChannelMax(Integer channelMax) {
+            bean().setChannelMax(channelMax);
+        }
+
+        public final void setChannelMax(AmqpUshort channelMax) {
+            bean().setChannelMax(channelMax);
+        }
+
+        public final Integer getChannelMax() {
+            return bean().getChannelMax();
+        }
+
+    public void setHeartbeatInterval(Integer heartbeatInterval) {
+            bean().setHeartbeatInterval(heartbeatInterval);
+        }
+
+        public final void setHeartbeatInterval(AmqpUshort heartbeatInterval) {
+            bean().setHeartbeatInterval(heartbeatInterval);
+        }
+
+        public final Integer getHeartbeatInterval() {
+            return bean().getHeartbeatInterval();
+        }
+
+    public void setOutgoingLocales(IAmqpList outgoingLocales) {
+            bean().setOutgoingLocales(outgoingLocales);
+        }
+
+        public final void setOutgoingLocales(AmqpList outgoingLocales) {
+            bean().setOutgoingLocales(outgoingLocales);
+        }
+
+        public final IAmqpList getOutgoingLocales() {
+            return bean().getOutgoingLocales();
+        }
+
+    public void setIncomingLocales(IAmqpList incomingLocales) {
+            bean().setIncomingLocales(incomingLocales);
+        }
+
+        public final void setIncomingLocales(AmqpList incomingLocales) {
+            bean().setIncomingLocales(incomingLocales);
+        }
+
+        public final IAmqpList getIncomingLocales() {
+            return bean().getIncomingLocales();
+        }
+
+    public void setPeerProperties(HashMap<AmqpType<?,?>, AmqpType<?,?>> peerProperties) {
+            bean().setPeerProperties(peerProperties);
+        }
+
+        public final void setPeerProperties(AmqpMap peerProperties) {
+            bean().setPeerProperties(peerProperties);
+        }
+
+        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getPeerProperties() {
+            return bean().getPeerProperties();
+        }
+
+    public void setOfferedCapabilities(IAmqpList offeredCapabilities) {
+            bean().setOfferedCapabilities(offeredCapabilities);
+        }
+
+        public final void setOfferedCapabilities(AmqpList offeredCapabilities) {
+            bean().setOfferedCapabilities(offeredCapabilities);
+        }
+
+        public final IAmqpList getOfferedCapabilities() {
+            return bean().getOfferedCapabilities();
+        }
+
+    public void setDesiredCapabilities(IAmqpList desiredCapabilities) {
+            bean().setDesiredCapabilities(desiredCapabilities);
+        }
+
+        public final void setDesiredCapabilities(AmqpList desiredCapabilities) {
+            bean().setDesiredCapabilities(desiredCapabilities);
+        }
+
+        public final IAmqpList getDesiredCapabilities() {
+            return bean().getDesiredCapabilities();
+        }
+
+        public void set(int index, AmqpType<?, ?> value) {
+            bean().set(index, value);
+        }
+
+        public AmqpType<?, ?> get(int index) {
+            return bean().get(index);
+        }
+
+        public int getListCount() {
+            return bean().getListCount();
+        }
+
+        public Iterator<AmqpType<?, ?>> iterator() {
+            return bean().iterator();
+        }
+
+        public IAmqpList getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpOpen.AmqpOpenBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpOpen bean() {
+            if(bean == null) {
+                bean = new AmqpOpen.AmqpOpenBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public final void handle(AmqpCommandHandler handler) throws Exception {
+            handler.handleOpen(this);
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpOpen.AmqpOpenBuffer create(Encoded<IAmqpList> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpOpen.AmqpOpenBuffer(encoded);
+        }
+
+        public static AmqpOpen.AmqpOpenBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpOpen(in));
+        }
+
+        public static AmqpOpen.AmqpOpenBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpOpen(buffer, offset));
+        }
+    }
+}
\ No newline at end of file



Mime
View raw message