activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmacn...@apache.org
Subject svn commit: r908857 [16/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/AmqpSessionName.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSessionName.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSessionName.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSessionName.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,168 @@
+/**
+ * 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 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.AmqpBinary;
+import org.apache.activemq.amqp.protocol.types.AmqpSessionName;
+import org.apache.activemq.util.buffer.Buffer;
+
+/**
+ * Represents a opaque Session name
+ * <p>
+ * The Session name uniquely identifies an interaction between two peers. It is globally
+ * unique among all open Sessions. Once a Session is cleanly closed, its name may be reused.
+ * </p>
+ */
+public interface AmqpSessionName extends AmqpBinary {
+
+
+    public static class AmqpSessionNameBean implements AmqpSessionName{
+
+        private AmqpSessionNameBuffer buffer;
+        private AmqpSessionNameBean bean = this;
+        private Buffer value;
+
+        protected AmqpSessionNameBean() {
+        }
+
+        public AmqpSessionNameBean(Buffer value) {
+            this.value = value;
+        }
+
+        public AmqpSessionNameBean(AmqpSessionName.AmqpSessionNameBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpSessionNameBean copy() {
+            return bean;
+        }
+
+        public final AmqpSessionName.AmqpSessionNameBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpSessionNameBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public Buffer getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpSessionName)) {
+                return false;
+            }
+
+            return equivalent((AmqpSessionName) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpSessionName.AmqpSessionNameBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpSessionName)) {
+                return false;
+            }
+
+            return equivalent((AmqpSessionName) t);
+        }
+
+        public boolean equivalent(AmqpSessionName 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 AmqpSessionNameBuffer extends AmqpBinary.AmqpBinaryBuffer implements AmqpSessionName{
+
+        private AmqpSessionNameBean bean;
+
+        protected AmqpSessionNameBuffer() {
+            super();
+        }
+
+        protected AmqpSessionNameBuffer(Encoded<Buffer> encoded) {
+            super(encoded);
+        }
+
+        public Buffer getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpSessionName.AmqpSessionNameBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpSessionName bean() {
+            if(bean == null) {
+                bean = new AmqpSessionName.AmqpSessionNameBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpSessionName.AmqpSessionNameBuffer create(Encoded<Buffer> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpSessionName.AmqpSessionNameBuffer(encoded);
+        }
+
+        public static AmqpSessionName.AmqpSessionNameBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpBinary(in));
+        }
+
+        public static AmqpSessionName.AmqpSessionNameBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpBinary(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/AmqpShort.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpShort.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpShort.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpShort.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.Short;
+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^15) to 2^15 - 1
+ */
+public interface AmqpShort extends AmqpType<AmqpShort.AmqpShortBean, AmqpShort.AmqpShortBuffer> {
+
+
+    public Short getValue();
+
+    public static class AmqpShortBean implements AmqpShort{
+
+        private AmqpShortBuffer buffer;
+        private AmqpShortBean bean = this;
+        private Short value;
+
+        protected AmqpShortBean() {
+        }
+
+        public AmqpShortBean(Short value) {
+            this.value = value;
+        }
+
+        public AmqpShortBean(AmqpShort.AmqpShortBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpShortBean copy() {
+            return bean;
+        }
+
+        public final AmqpShort.AmqpShortBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpShortBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public Short getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpShort)) {
+                return false;
+            }
+
+            return equivalent((AmqpShort) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpShort.AmqpShortBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpShort)) {
+                return false;
+            }
+
+            return equivalent((AmqpShort) t);
+        }
+
+        public boolean equivalent(AmqpShort 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 AmqpShortBuffer implements AmqpShort, AmqpBuffer< Short> {
+
+        private AmqpShortBean bean;
+        protected Encoded<Short> encoded;
+
+        protected AmqpShortBuffer() {
+        }
+
+        protected AmqpShortBuffer(Encoded<Short> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<Short> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public Short getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpShort.AmqpShortBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpShort bean() {
+            if(bean == null) {
+                bean = new AmqpShort.AmqpShortBean(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 AmqpShort.AmqpShortBuffer create(Encoded<Short> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpShort.AmqpShortBuffer(encoded);
+        }
+
+        public static AmqpShort.AmqpShortBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpShort(in));
+        }
+
+        public static AmqpShort.AmqpShortBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpShort(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/AmqpSource.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSource.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSource.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSource.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,558 @@
+/**
+ * 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.Boolean;
+import java.lang.Long;
+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;
+
+public interface AmqpSource extends AmqpMap {
+
+
+
+    /**
+     * the address of the source
+     * <p>
+     * The address is resolved to a Node in the Container of the sending Link Endpoint.
+     * </p>
+     * <p>
+     * command sent by the sending Link Endpoint. When sent by the receiving Link Endpoint the
+     * address MUST be set unless the create flag is set, in which case the address MUST NOT be
+     * set.
+     * </p>
+     */
+    public void setAddress(AmqpAddress address);
+
+    /**
+     * the address of the source
+     * <p>
+     * The address is resolved to a Node in the Container of the sending Link Endpoint.
+     * </p>
+     * <p>
+     * command sent by the sending Link Endpoint. When sent by the receiving Link Endpoint the
+     * address MUST be set unless the create flag is set, in which case the address MUST NOT be
+     * set.
+     * </p>
+     */
+    public AmqpAddress getAddress();
+
+    /**
+     * request creation of a remote Node
+     * <p>
+     * sent by the outgoing Link Endpoint.
+     * </p>
+     * <p>
+     * The algorithm used to produce the address from the Link name, must produce repeatable
+     * results. If the Link is durable, generating an address from a given Link name within a
+     * given client-id MUST always produce the same result. If the Link is not durable,
+     * generating an address from a given Link name within a given Session MUST always produce
+     * the same result. The generated address SHOULD include the Link name and Session-name or
+     * client-id in some recognizable form for ease of traceability.
+     * </p>
+     */
+    public void setCreate(Boolean create);
+
+    /**
+     * request creation of a remote Node
+     * <p>
+     * sent by the outgoing Link Endpoint.
+     * </p>
+     * <p>
+     * The algorithm used to produce the address from the Link name, must produce repeatable
+     * results. If the Link is durable, generating an address from a given Link name within a
+     * given client-id MUST always produce the same result. If the Link is not durable,
+     * generating an address from a given Link name within a given Session MUST always produce
+     * the same result. The generated address SHOULD include the Link name and Session-name or
+     * client-id in some recognizable form for ease of traceability.
+     * </p>
+     */
+    public void setCreate(AmqpBoolean create);
+
+    /**
+     * request creation of a remote Node
+     * <p>
+     * sent by the outgoing Link Endpoint.
+     * </p>
+     * <p>
+     * The algorithm used to produce the address from the Link name, must produce repeatable
+     * results. If the Link is durable, generating an address from a given Link name within a
+     * given client-id MUST always produce the same result. If the Link is not durable,
+     * generating an address from a given Link name within a given Session MUST always produce
+     * the same result. The generated address SHOULD include the Link name and Session-name or
+     * client-id in some recognizable form for ease of traceability.
+     * </p>
+     */
+    public Boolean getCreate();
+
+    /**
+     * the source timeout
+     * <p>
+     * The minimum length of time (in milliseconds) after the Session has been destroyed before
+     * the source is destroyed. The value set by the receiving Link endpoint is indicative of
+     * the timeout it desires, the value set by the sending Link endpoint defines the timeout
+     * which will be used.
+     * </p>
+     */
+    public void setTimeout(Long timeout);
+
+    /**
+     * the source timeout
+     * <p>
+     * The minimum length of time (in milliseconds) after the Session has been destroyed before
+     * the source is destroyed. The value set by the receiving Link endpoint is indicative of
+     * the timeout it desires, the value set by the sending Link endpoint defines the timeout
+     * which will be used.
+     * </p>
+     */
+    public void setTimeout(AmqpUint timeout);
+
+    /**
+     * the source timeout
+     * <p>
+     * The minimum length of time (in milliseconds) after the Session has been destroyed before
+     * the source is destroyed. The value set by the receiving Link endpoint is indicative of
+     * the timeout it desires, the value set by the sending Link endpoint defines the timeout
+     * which will be used.
+     * </p>
+     */
+    public Long getTimeout();
+
+    /**
+     * the distribution mode of the Link
+     * <p>
+     * Link.
+     * </p>
+     */
+    public void setDistributionMode(AmqpDistributionMode distributionMode);
+
+    /**
+     * the distribution mode of the Link
+     * <p>
+     * Link.
+     * </p>
+     */
+    public AmqpDistributionMode getDistributionMode();
+
+    /**
+     * a set of predicate to filter the Messages admitted onto the Link
+     */
+    public void setFilter(AmqpFilterSet filter);
+
+    /**
+     * a set of predicate to filter the Messages admitted onto the Link
+     */
+    public AmqpFilterSet getFilter();
+
+    /**
+     * states of messages to be considered for sending from the source
+     * <p>
+     * state.
+     * </p>
+     */
+    public void setMessageStates(IAmqpList messageStates);
+
+    /**
+     * states of messages to be considered for sending from the source
+     * <p>
+     * state.
+     * </p>
+     */
+    public void setMessageStates(AmqpList messageStates);
+
+    /**
+     * states of messages to be considered for sending from the source
+     * <p>
+     * state.
+     * </p>
+     */
+    public IAmqpList getMessageStates();
+
+    /**
+     * disposition for unacked Messages
+     * <p>
+     * value).
+     * </p>
+     */
+    public void setOrphanDisposition(HashMap<AmqpType<?,?>, AmqpType<?,?>> orphanDisposition);
+
+    /**
+     * disposition for unacked Messages
+     * <p>
+     * value).
+     * </p>
+     */
+    public void setOrphanDisposition(AmqpMap orphanDisposition);
+
+    /**
+     * disposition for unacked Messages
+     * <p>
+     * value).
+     * </p>
+     */
+    public HashMap<AmqpType<?,?>, AmqpType<?,?>> getOrphanDisposition();
+
+    public static class AmqpSourceBean implements AmqpSource{
+
+        private AmqpSourceBuffer buffer;
+        private AmqpSourceBean bean = this;
+        private AmqpAddress address;
+        private AmqpBoolean create;
+        private AmqpUint timeout;
+        private AmqpDistributionMode distributionMode;
+        private AmqpFilterSet filter;
+        private AmqpList messageStates;
+        private AmqpMap orphanDisposition;
+        private HashMap<AmqpType<?,?>, AmqpType<?,?>> value;
+
+        public AmqpSourceBean() {
+        }
+
+        public AmqpSourceBean(HashMap<AmqpType<?,?>, AmqpType<?,?>> value) {
+            this.value = value;
+        }
+
+        public AmqpSourceBean(AmqpSource.AmqpSourceBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpSourceBean copy() {
+            return new AmqpSource.AmqpSourceBean(bean);
+        }
+
+        public final AmqpSource.AmqpSourceBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpSourceBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public final void setAddress(AmqpAddress address) {
+            copyCheck();
+            bean.address = address;
+        }
+
+        public final AmqpAddress getAddress() {
+            return bean.address;
+        }
+
+        public void setCreate(Boolean create) {
+            setCreate(new AmqpBoolean.AmqpBooleanBean(create));
+        }
+
+
+        public final void setCreate(AmqpBoolean create) {
+            copyCheck();
+            bean.create = create;
+        }
+
+        public final Boolean getCreate() {
+            return bean.create.getValue();
+        }
+
+        public void setTimeout(Long timeout) {
+            setTimeout(new AmqpUint.AmqpUintBean(timeout));
+        }
+
+
+        public final void setTimeout(AmqpUint timeout) {
+            copyCheck();
+            bean.timeout = timeout;
+        }
+
+        public final Long getTimeout() {
+            return bean.timeout.getValue();
+        }
+
+        public final void setDistributionMode(AmqpDistributionMode distributionMode) {
+            copyCheck();
+            bean.distributionMode = distributionMode;
+        }
+
+        public final AmqpDistributionMode getDistributionMode() {
+            return bean.distributionMode;
+        }
+
+        public final void setFilter(AmqpFilterSet filter) {
+            copyCheck();
+            bean.filter = filter;
+        }
+
+        public final AmqpFilterSet getFilter() {
+            return bean.filter;
+        }
+
+        public void setMessageStates(IAmqpList messageStates) {
+            setMessageStates(new AmqpList.AmqpListBean(messageStates));
+        }
+
+
+        public final void setMessageStates(AmqpList messageStates) {
+            copyCheck();
+            bean.messageStates = messageStates;
+        }
+
+        public final IAmqpList getMessageStates() {
+            return bean.messageStates.getValue();
+        }
+
+        public void setOrphanDisposition(HashMap<AmqpType<?,?>, AmqpType<?,?>> orphanDisposition) {
+            setOrphanDisposition(new AmqpMap.AmqpMapBean(orphanDisposition));
+        }
+
+
+        public final void setOrphanDisposition(AmqpMap orphanDisposition) {
+            copyCheck();
+            bean.orphanDisposition = orphanDisposition;
+        }
+
+        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOrphanDisposition() {
+            return bean.orphanDisposition.getValue();
+        }
+        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(AmqpSource.AmqpSourceBean other) {
+            this.address= other.address;
+            this.create= other.create;
+            this.timeout= other.timeout;
+            this.distributionMode= other.distributionMode;
+            this.filter= other.filter;
+            this.messageStates= other.messageStates;
+            this.orphanDisposition= other.orphanDisposition;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpSource)) {
+                return false;
+            }
+
+            return equivalent((AmqpSource) t);
+        }
+
+        public boolean equivalent(AmqpSource b) {
+
+            if(b.getAddress() == null ^ getAddress() == null) {
+                return false;
+            }
+            if(b.getAddress() != null && !b.getAddress().equals(getAddress())){ 
+                return false;
+            }
+
+            if(b.getCreate() == null ^ getCreate() == null) {
+                return false;
+            }
+            if(b.getCreate() != null && !b.getCreate().equals(getCreate())){ 
+                return false;
+            }
+
+            if(b.getTimeout() == null ^ getTimeout() == null) {
+                return false;
+            }
+            if(b.getTimeout() != null && !b.getTimeout().equals(getTimeout())){ 
+                return false;
+            }
+
+            if(b.getDistributionMode() == null ^ getDistributionMode() == null) {
+                return false;
+            }
+            if(b.getDistributionMode() != null && !b.getDistributionMode().equals(getDistributionMode())){ 
+                return false;
+            }
+
+            if(b.getFilter() == null ^ getFilter() == null) {
+                return false;
+            }
+            if(b.getFilter() != null && !b.getFilter().equals(getFilter())){ 
+                return false;
+            }
+
+            if(b.getMessageStates() == null ^ getMessageStates() == null) {
+                return false;
+            }
+            if(b.getMessageStates() != null && !b.getMessageStates().equals(getMessageStates())){ 
+                return false;
+            }
+
+            if(b.getOrphanDisposition() == null ^ getOrphanDisposition() == null) {
+                return false;
+            }
+            if(b.getOrphanDisposition() != null && !b.getOrphanDisposition().equals(getOrphanDisposition())){ 
+                return false;
+            }
+            return true;
+        }
+    }
+
+    public static class AmqpSourceBuffer extends AmqpMap.AmqpMapBuffer implements AmqpSource{
+
+        private AmqpSourceBean bean;
+
+        protected AmqpSourceBuffer(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            super(encoded);
+        }
+
+        public final void setAddress(AmqpAddress address) {
+            bean().setAddress(address);
+        }
+
+        public final AmqpAddress getAddress() {
+            return bean().getAddress();
+        }
+
+    public void setCreate(Boolean create) {
+            bean().setCreate(create);
+        }
+
+        public final void setCreate(AmqpBoolean create) {
+            bean().setCreate(create);
+        }
+
+        public final Boolean getCreate() {
+            return bean().getCreate();
+        }
+
+    public void setTimeout(Long timeout) {
+            bean().setTimeout(timeout);
+        }
+
+        public final void setTimeout(AmqpUint timeout) {
+            bean().setTimeout(timeout);
+        }
+
+        public final Long getTimeout() {
+            return bean().getTimeout();
+        }
+
+        public final void setDistributionMode(AmqpDistributionMode distributionMode) {
+            bean().setDistributionMode(distributionMode);
+        }
+
+        public final AmqpDistributionMode getDistributionMode() {
+            return bean().getDistributionMode();
+        }
+
+        public final void setFilter(AmqpFilterSet filter) {
+            bean().setFilter(filter);
+        }
+
+        public final AmqpFilterSet getFilter() {
+            return bean().getFilter();
+        }
+
+    public void setMessageStates(IAmqpList messageStates) {
+            bean().setMessageStates(messageStates);
+        }
+
+        public final void setMessageStates(AmqpList messageStates) {
+            bean().setMessageStates(messageStates);
+        }
+
+        public final IAmqpList getMessageStates() {
+            return bean().getMessageStates();
+        }
+
+    public void setOrphanDisposition(HashMap<AmqpType<?,?>, AmqpType<?,?>> orphanDisposition) {
+            bean().setOrphanDisposition(orphanDisposition);
+        }
+
+        public final void setOrphanDisposition(AmqpMap orphanDisposition) {
+            bean().setOrphanDisposition(orphanDisposition);
+        }
+
+        public final HashMap<AmqpType<?,?>, AmqpType<?,?>> getOrphanDisposition() {
+            return bean().getOrphanDisposition();
+        }
+        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 AmqpSource.AmqpSourceBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpSource bean() {
+            if(bean == null) {
+                bean = new AmqpSource.AmqpSourceBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpSource.AmqpSourceBuffer create(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpSource.AmqpSourceBuffer(encoded);
+        }
+
+        public static AmqpSource.AmqpSourceBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpSource(in));
+        }
+
+        public static AmqpSource.AmqpSourceBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpSource(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/AmqpString.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpString.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpString.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpString.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.String;
+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 sequence of unicode characters
+ */
+public interface AmqpString extends AmqpType<AmqpString.AmqpStringBean, AmqpString.AmqpStringBuffer> {
+
+
+    public String getValue();
+
+    public static class AmqpStringBean implements AmqpString{
+
+        private AmqpStringBuffer buffer;
+        private AmqpStringBean bean = this;
+        private String value;
+
+        protected AmqpStringBean() {
+        }
+
+        public AmqpStringBean(String value) {
+            this.value = value;
+        }
+
+        public AmqpStringBean(AmqpString.AmqpStringBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpStringBean copy() {
+            return bean;
+        }
+
+        public final AmqpString.AmqpStringBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpStringBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public String getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpString)) {
+                return false;
+            }
+
+            return equivalent((AmqpString) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpString.AmqpStringBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpString)) {
+                return false;
+            }
+
+            return equivalent((AmqpString) t);
+        }
+
+        public boolean equivalent(AmqpString 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 AmqpStringBuffer implements AmqpString, AmqpBuffer< String> {
+
+        private AmqpStringBean bean;
+        protected Encoded<String> encoded;
+
+        protected AmqpStringBuffer() {
+        }
+
+        protected AmqpStringBuffer(Encoded<String> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<String> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public String getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpString.AmqpStringBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpString bean() {
+            if(bean == null) {
+                bean = new AmqpString.AmqpStringBean(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 AmqpString.AmqpStringBuffer create(Encoded<String> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpString.AmqpStringBuffer(encoded);
+        }
+
+        public static AmqpString.AmqpStringBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpString(in));
+        }
+
+        public static AmqpString.AmqpStringBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpString(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/AmqpSymbol.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSymbol.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSymbol.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpSymbol.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,186 @@
+/**
+ * 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.String;
+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 symbolic values from a constrained domain
+ * <p>
+ * Symbols are values from a constrained domain. Although the set of possible domains is
+ * open-ended, typically the both number and size of symbols in use for any given application
+ * will be small, e.g. small enough that it is reasonable to cache all the distinct values.
+ * </p>
+ */
+public interface AmqpSymbol extends AmqpType<AmqpSymbol.AmqpSymbolBean, AmqpSymbol.AmqpSymbolBuffer> {
+
+
+    public String getValue();
+
+    public static class AmqpSymbolBean implements AmqpSymbol{
+
+        private AmqpSymbolBuffer buffer;
+        private AmqpSymbolBean bean = this;
+        private String value;
+
+        protected AmqpSymbolBean() {
+        }
+
+        public AmqpSymbolBean(String value) {
+            this.value = value;
+        }
+
+        public AmqpSymbolBean(AmqpSymbol.AmqpSymbolBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpSymbolBean copy() {
+            return bean;
+        }
+
+        public final AmqpSymbol.AmqpSymbolBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpSymbolBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public String getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpSymbol)) {
+                return false;
+            }
+
+            return equivalent((AmqpSymbol) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpSymbol.AmqpSymbolBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpSymbol)) {
+                return false;
+            }
+
+            return equivalent((AmqpSymbol) t);
+        }
+
+        public boolean equivalent(AmqpSymbol 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 AmqpSymbolBuffer implements AmqpSymbol, AmqpBuffer< String> {
+
+        private AmqpSymbolBean bean;
+        protected Encoded<String> encoded;
+
+        protected AmqpSymbolBuffer() {
+        }
+
+        protected AmqpSymbolBuffer(Encoded<String> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<String> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public String getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpSymbol.AmqpSymbolBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpSymbol bean() {
+            if(bean == null) {
+                bean = new AmqpSymbol.AmqpSymbolBean(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 AmqpSymbol.AmqpSymbolBuffer create(Encoded<String> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpSymbol.AmqpSymbolBuffer(encoded);
+        }
+
+        public static AmqpSymbol.AmqpSymbolBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpSymbol(in));
+        }
+
+        public static AmqpSymbol.AmqpSymbolBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpSymbol(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/AmqpTarget.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTarget.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTarget.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTarget.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,362 @@
+/**
+ * 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.Boolean;
+import java.lang.Long;
+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;
+
+public interface AmqpTarget extends AmqpMap {
+
+
+
+    /**
+     * The address of the target.
+     * <p>
+     * The address is resolved to a Node by the Container of the receiving Link Endpoint.
+     * </p>
+     * <p>
+     * command sent by the receiving Link Endpoint. When sent by the sending Link Endpoint the
+     * address MUST be set unless the create flag is set, in which case the address MUST NOT be
+     * set.
+     * </p>
+     */
+    public void setAddress(AmqpAddress address);
+
+    /**
+     * The address of the target.
+     * <p>
+     * The address is resolved to a Node by the Container of the receiving Link Endpoint.
+     * </p>
+     * <p>
+     * command sent by the receiving Link Endpoint. When sent by the sending Link Endpoint the
+     * address MUST be set unless the create flag is set, in which case the address MUST NOT be
+     * set.
+     * </p>
+     */
+    public AmqpAddress getAddress();
+
+    /**
+     * request creation of a remote Node
+     * <p>
+     * sent by the incoming Link Endpoint.
+     * </p>
+     * <p>
+     * The algorithm used to produce the address from the Link name, must produce repeatable
+     * results. If the Link is durable, generating an address from a given Link name within a
+     * given client-id MUST always produce the same result. If the Link is not durable,
+     * generating an address from a given Link name within a given Session MUST always produce
+     * the same result. The generated address SHOULD include the Link name and Session-name or
+     * client-id in some recognizable form for ease of traceability.
+     * </p>
+     */
+    public void setCreate(Boolean create);
+
+    /**
+     * request creation of a remote Node
+     * <p>
+     * sent by the incoming Link Endpoint.
+     * </p>
+     * <p>
+     * The algorithm used to produce the address from the Link name, must produce repeatable
+     * results. If the Link is durable, generating an address from a given Link name within a
+     * given client-id MUST always produce the same result. If the Link is not durable,
+     * generating an address from a given Link name within a given Session MUST always produce
+     * the same result. The generated address SHOULD include the Link name and Session-name or
+     * client-id in some recognizable form for ease of traceability.
+     * </p>
+     */
+    public void setCreate(AmqpBoolean create);
+
+    /**
+     * request creation of a remote Node
+     * <p>
+     * sent by the incoming Link Endpoint.
+     * </p>
+     * <p>
+     * The algorithm used to produce the address from the Link name, must produce repeatable
+     * results. If the Link is durable, generating an address from a given Link name within a
+     * given client-id MUST always produce the same result. If the Link is not durable,
+     * generating an address from a given Link name within a given Session MUST always produce
+     * the same result. The generated address SHOULD include the Link name and Session-name or
+     * client-id in some recognizable form for ease of traceability.
+     * </p>
+     */
+    public Boolean getCreate();
+
+    /**
+     * the target timeout
+     * <p>
+     * The minimum length of time (in milliseconds) after the Link has been destroyed before
+     * the target is destroyed. The value set by the sending Link endpoint is indicative of
+     * the timeout it desires, the value set by the receiving Link endpoint defines the timeout
+     * which will be used.
+     * </p>
+     */
+    public void setTimeout(Long timeout);
+
+    /**
+     * the target timeout
+     * <p>
+     * The minimum length of time (in milliseconds) after the Link has been destroyed before
+     * the target is destroyed. The value set by the sending Link endpoint is indicative of
+     * the timeout it desires, the value set by the receiving Link endpoint defines the timeout
+     * which will be used.
+     * </p>
+     */
+    public void setTimeout(AmqpUint timeout);
+
+    /**
+     * the target timeout
+     * <p>
+     * The minimum length of time (in milliseconds) after the Link has been destroyed before
+     * the target is destroyed. The value set by the sending Link endpoint is indicative of
+     * the timeout it desires, the value set by the receiving Link endpoint defines the timeout
+     * which will be used.
+     * </p>
+     */
+    public Long getTimeout();
+
+    public static class AmqpTargetBean implements AmqpTarget{
+
+        private AmqpTargetBuffer buffer;
+        private AmqpTargetBean bean = this;
+        private AmqpAddress address;
+        private AmqpBoolean create;
+        private AmqpUint timeout;
+        private HashMap<AmqpType<?,?>, AmqpType<?,?>> value;
+
+        public AmqpTargetBean() {
+        }
+
+        public AmqpTargetBean(HashMap<AmqpType<?,?>, AmqpType<?,?>> value) {
+            this.value = value;
+        }
+
+        public AmqpTargetBean(AmqpTarget.AmqpTargetBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpTargetBean copy() {
+            return new AmqpTarget.AmqpTargetBean(bean);
+        }
+
+        public final AmqpTarget.AmqpTargetBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpTargetBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public final void setAddress(AmqpAddress address) {
+            copyCheck();
+            bean.address = address;
+        }
+
+        public final AmqpAddress getAddress() {
+            return bean.address;
+        }
+
+        public void setCreate(Boolean create) {
+            setCreate(new AmqpBoolean.AmqpBooleanBean(create));
+        }
+
+
+        public final void setCreate(AmqpBoolean create) {
+            copyCheck();
+            bean.create = create;
+        }
+
+        public final Boolean getCreate() {
+            return bean.create.getValue();
+        }
+
+        public void setTimeout(Long timeout) {
+            setTimeout(new AmqpUint.AmqpUintBean(timeout));
+        }
+
+
+        public final void setTimeout(AmqpUint timeout) {
+            copyCheck();
+            bean.timeout = timeout;
+        }
+
+        public final Long getTimeout() {
+            return bean.timeout.getValue();
+        }
+        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(AmqpTarget.AmqpTargetBean other) {
+            this.address= other.address;
+            this.create= other.create;
+            this.timeout= other.timeout;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpTarget)) {
+                return false;
+            }
+
+            return equivalent((AmqpTarget) t);
+        }
+
+        public boolean equivalent(AmqpTarget b) {
+
+            if(b.getAddress() == null ^ getAddress() == null) {
+                return false;
+            }
+            if(b.getAddress() != null && !b.getAddress().equals(getAddress())){ 
+                return false;
+            }
+
+            if(b.getCreate() == null ^ getCreate() == null) {
+                return false;
+            }
+            if(b.getCreate() != null && !b.getCreate().equals(getCreate())){ 
+                return false;
+            }
+
+            if(b.getTimeout() == null ^ getTimeout() == null) {
+                return false;
+            }
+            if(b.getTimeout() != null && !b.getTimeout().equals(getTimeout())){ 
+                return false;
+            }
+            return true;
+        }
+    }
+
+    public static class AmqpTargetBuffer extends AmqpMap.AmqpMapBuffer implements AmqpTarget{
+
+        private AmqpTargetBean bean;
+
+        protected AmqpTargetBuffer(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            super(encoded);
+        }
+
+        public final void setAddress(AmqpAddress address) {
+            bean().setAddress(address);
+        }
+
+        public final AmqpAddress getAddress() {
+            return bean().getAddress();
+        }
+
+    public void setCreate(Boolean create) {
+            bean().setCreate(create);
+        }
+
+        public final void setCreate(AmqpBoolean create) {
+            bean().setCreate(create);
+        }
+
+        public final Boolean getCreate() {
+            return bean().getCreate();
+        }
+
+    public void setTimeout(Long timeout) {
+            bean().setTimeout(timeout);
+        }
+
+        public final void setTimeout(AmqpUint timeout) {
+            bean().setTimeout(timeout);
+        }
+
+        public final Long getTimeout() {
+            return bean().getTimeout();
+        }
+        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 AmqpTarget.AmqpTargetBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpTarget bean() {
+            if(bean == null) {
+                bean = new AmqpTarget.AmqpTargetBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpTarget.AmqpTargetBuffer create(Encoded<HashMap<AmqpType<?,?>, AmqpType<?,?>>> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpTarget.AmqpTargetBuffer(encoded);
+        }
+
+        public static AmqpTarget.AmqpTargetBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpTarget(in));
+        }
+
+        public static AmqpTarget.AmqpTargetBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpTarget(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/AmqpTimestamp.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTimestamp.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTimestamp.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTimestamp.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.util.Date;
+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 an absolute point in time
+ */
+public interface AmqpTimestamp extends AmqpType<AmqpTimestamp.AmqpTimestampBean, AmqpTimestamp.AmqpTimestampBuffer> {
+
+
+    public Date getValue();
+
+    public static class AmqpTimestampBean implements AmqpTimestamp{
+
+        private AmqpTimestampBuffer buffer;
+        private AmqpTimestampBean bean = this;
+        private Date value;
+
+        protected AmqpTimestampBean() {
+        }
+
+        public AmqpTimestampBean(Date value) {
+            this.value = value;
+        }
+
+        public AmqpTimestampBean(AmqpTimestamp.AmqpTimestampBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpTimestampBean copy() {
+            return bean;
+        }
+
+        public final AmqpTimestamp.AmqpTimestampBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpTimestampBuffer(marshaller.encode(this));
+            }
+            return buffer;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            getBuffer(marshaller).marshal(out, marshaller);
+        }
+
+
+        public Date getValue() {
+            return bean.value;
+        }
+
+
+        public boolean equals(Object o){
+            if(this == o) {
+                return true;
+            }
+
+            if(o == null || !(o instanceof AmqpTimestamp)) {
+                return false;
+            }
+
+            return equivalent((AmqpTimestamp) o);
+        }
+
+        public int hashCode() {
+            if(getValue() == null) {
+                return AmqpTimestamp.AmqpTimestampBean.class.hashCode();
+            }
+            return getValue().hashCode();
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpTimestamp)) {
+                return false;
+            }
+
+            return equivalent((AmqpTimestamp) t);
+        }
+
+        public boolean equivalent(AmqpTimestamp 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 AmqpTimestampBuffer implements AmqpTimestamp, AmqpBuffer< Date> {
+
+        private AmqpTimestampBean bean;
+        protected Encoded<Date> encoded;
+
+        protected AmqpTimestampBuffer() {
+        }
+
+        protected AmqpTimestampBuffer(Encoded<Date> encoded) {
+            this.encoded = encoded;
+        }
+
+        public final Encoded<Date> getEncoded() throws AmqpEncodingError{
+            return encoded;
+        }
+
+        public final void marshal(DataOutput out, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError{
+            encoded.marshal(out);
+        }
+
+        public Date getValue() {
+            return bean().getValue();
+        }
+
+        public AmqpTimestamp.AmqpTimestampBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpTimestamp bean() {
+            if(bean == null) {
+                bean = new AmqpTimestamp.AmqpTimestampBean(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 AmqpTimestamp.AmqpTimestampBuffer create(Encoded<Date> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpTimestamp.AmqpTimestampBuffer(encoded);
+        }
+
+        public static AmqpTimestamp.AmqpTimestampBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpTimestamp(in));
+        }
+
+        public static AmqpTimestamp.AmqpTimestampBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpTimestamp(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/AmqpTransfer.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTransfer.java?rev=908857&view=auto
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTransfer.java (added)
+++ activemq/sandbox/activemq-apollo-actor/activemq-amqp/src/main/java/org/apache/activemq/amqp/protocol/types/AmqpTransfer.java Thu Feb 11 07:04:21 2010
@@ -0,0 +1,513 @@
+/**
+ * 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.Boolean;
+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 transfer a Message
+ * <p>
+ * The transfer command is used to send Messages across a Link. Messages may be carried by a
+ * single transfer command up to the maximum negotiated frame size for the Connection. Larger
+ * Messages may be split across several consecutive transfer commands.
+ * </p>
+ */
+public interface AmqpTransfer extends AmqpList, AmqpCommand {
+
+
+
+    /**
+     * options map
+     */
+    public void setOptions(AmqpOptions options);
+
+    /**
+     * options map
+     */
+    public AmqpOptions getOptions();
+
+    /**
+     * <p>
+     * Specifies the Link on which the Message is transferred.
+     * </p>
+     */
+    public void setHandle(AmqpHandle handle);
+
+    /**
+     * <p>
+     * Specifies the Link on which the Message is transferred.
+     * </p>
+     */
+    public AmqpHandle getHandle();
+
+    /**
+     * <p>
+     * Uniquely identifies the delivery attempt for a given Message on this Link.
+     * </p>
+     */
+    public void setDeliveryTag(AmqpDeliveryTag deliveryTag);
+
+    /**
+     * <p>
+     * Uniquely identifies the delivery attempt for a given Message on this Link.
+     * </p>
+     */
+    public AmqpDeliveryTag getDeliveryTag();
+
+    /**
+     * indicates that the Message has more content
+     */
+    public void setMore(Boolean more);
+
+    /**
+     * indicates that the Message has more content
+     */
+    public void setMore(AmqpBoolean more);
+
+    /**
+     * indicates that the Message has more content
+     */
+    public Boolean getMore();
+
+    /**
+     * indicates that the Message is aborted
+     * <p>
+     * Aborted Messages should be discarded by the recipient.
+     * </p>
+     */
+    public void setAborted(Boolean aborted);
+
+    /**
+     * indicates that the Message is aborted
+     * <p>
+     * Aborted Messages should be discarded by the recipient.
+     * </p>
+     */
+    public void setAborted(AmqpBoolean aborted);
+
+    /**
+     * indicates that the Message is aborted
+     * <p>
+     * Aborted Messages should be discarded by the recipient.
+     * </p>
+     */
+    public Boolean getAborted();
+
+    public void setFragments(IAmqpList fragments);
+
+    public void setFragments(AmqpList fragments);
+
+    public IAmqpList getFragments();
+
+    public static class AmqpTransferBean implements AmqpTransfer{
+
+        private AmqpTransferBuffer buffer;
+        private AmqpTransferBean bean = this;
+        private AmqpOptions options;
+        private AmqpHandle handle;
+        private AmqpDeliveryTag deliveryTag;
+        private AmqpBoolean more;
+        private AmqpBoolean aborted;
+        private AmqpList fragments;
+
+        public AmqpTransferBean() {
+        }
+
+        public AmqpTransferBean(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 AmqpTransferBean(AmqpTransfer.AmqpTransferBean other) {
+            this.bean = other;
+        }
+
+        public final AmqpTransferBean copy() {
+            return new AmqpTransfer.AmqpTransferBean(bean);
+        }
+
+        public final void handle(AmqpCommandHandler handler) throws Exception {
+            handler.handleTransfer(this);
+        }
+
+        public final AmqpTransfer.AmqpTransferBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            if(buffer == null) {
+                buffer = new AmqpTransferBuffer(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 setHandle(AmqpHandle handle) {
+            copyCheck();
+            bean.handle = handle;
+        }
+
+        public final AmqpHandle getHandle() {
+            return bean.handle;
+        }
+
+        public final void setDeliveryTag(AmqpDeliveryTag deliveryTag) {
+            copyCheck();
+            bean.deliveryTag = deliveryTag;
+        }
+
+        public final AmqpDeliveryTag getDeliveryTag() {
+            return bean.deliveryTag;
+        }
+
+        public void setMore(Boolean more) {
+            setMore(new AmqpBoolean.AmqpBooleanBean(more));
+        }
+
+
+        public final void setMore(AmqpBoolean more) {
+            copyCheck();
+            bean.more = more;
+        }
+
+        public final Boolean getMore() {
+            return bean.more.getValue();
+        }
+
+        public void setAborted(Boolean aborted) {
+            setAborted(new AmqpBoolean.AmqpBooleanBean(aborted));
+        }
+
+
+        public final void setAborted(AmqpBoolean aborted) {
+            copyCheck();
+            bean.aborted = aborted;
+        }
+
+        public final Boolean getAborted() {
+            return bean.aborted.getValue();
+        }
+
+        public void setFragments(IAmqpList fragments) {
+            setFragments(new AmqpList.AmqpListBean(fragments));
+        }
+
+
+        public final void setFragments(AmqpList fragments) {
+            copyCheck();
+            bean.fragments = fragments;
+        }
+
+        public final IAmqpList getFragments() {
+            return bean.fragments.getValue();
+        }
+
+        public void set(int index, AmqpType<?, ?> value) {
+            switch(index) {
+            case 0: {
+                setOptions((AmqpOptions) value);
+                break;
+            }
+            case 1: {
+                setHandle((AmqpHandle) value);
+                break;
+            }
+            case 2: {
+                setDeliveryTag((AmqpDeliveryTag) value);
+                break;
+            }
+            case 3: {
+                setMore((AmqpBoolean) value);
+                break;
+            }
+            case 4: {
+                setAborted((AmqpBoolean) value);
+                break;
+            }
+            case 5: {
+                setFragments((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.handle;
+            }
+            case 2: {
+                return bean.deliveryTag;
+            }
+            case 3: {
+                return bean.more;
+            }
+            case 4: {
+                return bean.aborted;
+            }
+            case 5: {
+                return bean.fragments;
+            }
+            default : {
+                throw new IndexOutOfBoundsException(String.valueOf(index));
+            }
+            }
+        }
+
+        public int getListCount() {
+            return 6;
+        }
+
+        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(AmqpTransfer.AmqpTransferBean other) {
+            this.options= other.options;
+            this.handle= other.handle;
+            this.deliveryTag= other.deliveryTag;
+            this.more= other.more;
+            this.aborted= other.aborted;
+            this.fragments= other.fragments;
+            bean = this;
+        }
+
+        public boolean equivalent(AmqpType<?,?> t){
+            if(this == t) {
+                return true;
+            }
+
+            if(t == null || !(t instanceof AmqpTransfer)) {
+                return false;
+            }
+
+            return equivalent((AmqpTransfer) t);
+        }
+
+        public boolean equivalent(AmqpTransfer b) {
+
+            if(b.getOptions() == null ^ getOptions() == null) {
+                return false;
+            }
+            if(b.getOptions() != null && !b.getOptions().equals(getOptions())){ 
+                return false;
+            }
+
+            if(b.getHandle() == null ^ getHandle() == null) {
+                return false;
+            }
+            if(b.getHandle() != null && !b.getHandle().equals(getHandle())){ 
+                return false;
+            }
+
+            if(b.getDeliveryTag() == null ^ getDeliveryTag() == null) {
+                return false;
+            }
+            if(b.getDeliveryTag() != null && !b.getDeliveryTag().equals(getDeliveryTag())){ 
+                return false;
+            }
+
+            if(b.getMore() == null ^ getMore() == null) {
+                return false;
+            }
+            if(b.getMore() != null && !b.getMore().equals(getMore())){ 
+                return false;
+            }
+
+            if(b.getAborted() == null ^ getAborted() == null) {
+                return false;
+            }
+            if(b.getAborted() != null && !b.getAborted().equals(getAborted())){ 
+                return false;
+            }
+
+            if(b.getFragments() == null ^ getFragments() == null) {
+                return false;
+            }
+            if(b.getFragments() != null && !b.getFragments().equals(getFragments())){ 
+                return false;
+            }
+            return true;
+        }
+    }
+
+    public static class AmqpTransferBuffer extends AmqpList.AmqpListBuffer implements AmqpTransfer{
+
+        private AmqpTransferBean bean;
+
+        protected AmqpTransferBuffer(Encoded<IAmqpList> encoded) {
+            super(encoded);
+        }
+
+        public final void setOptions(AmqpOptions options) {
+            bean().setOptions(options);
+        }
+
+        public final AmqpOptions getOptions() {
+            return bean().getOptions();
+        }
+
+        public final void setHandle(AmqpHandle handle) {
+            bean().setHandle(handle);
+        }
+
+        public final AmqpHandle getHandle() {
+            return bean().getHandle();
+        }
+
+        public final void setDeliveryTag(AmqpDeliveryTag deliveryTag) {
+            bean().setDeliveryTag(deliveryTag);
+        }
+
+        public final AmqpDeliveryTag getDeliveryTag() {
+            return bean().getDeliveryTag();
+        }
+
+    public void setMore(Boolean more) {
+            bean().setMore(more);
+        }
+
+        public final void setMore(AmqpBoolean more) {
+            bean().setMore(more);
+        }
+
+        public final Boolean getMore() {
+            return bean().getMore();
+        }
+
+    public void setAborted(Boolean aborted) {
+            bean().setAborted(aborted);
+        }
+
+        public final void setAborted(AmqpBoolean aborted) {
+            bean().setAborted(aborted);
+        }
+
+        public final Boolean getAborted() {
+            return bean().getAborted();
+        }
+
+    public void setFragments(IAmqpList fragments) {
+            bean().setFragments(fragments);
+        }
+
+        public final void setFragments(AmqpList fragments) {
+            bean().setFragments(fragments);
+        }
+
+        public final IAmqpList getFragments() {
+            return bean().getFragments();
+        }
+
+        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 AmqpTransfer.AmqpTransferBuffer getBuffer(AmqpMarshaller marshaller) throws AmqpEncodingError{
+            return this;
+        }
+
+        protected AmqpTransfer bean() {
+            if(bean == null) {
+                bean = new AmqpTransfer.AmqpTransferBean(encoded.getValue());
+                bean.buffer = this;
+            }
+            return bean;
+        }
+
+        public final void handle(AmqpCommandHandler handler) throws Exception {
+            handler.handleTransfer(this);
+        }
+
+        public boolean equivalent(AmqpType<?, ?> t) {
+            return bean().equivalent(t);
+        }
+
+        public static AmqpTransfer.AmqpTransferBuffer create(Encoded<IAmqpList> encoded) {
+            if(encoded.isNull()) {
+                return null;
+            }
+            return new AmqpTransfer.AmqpTransferBuffer(encoded);
+        }
+
+        public static AmqpTransfer.AmqpTransferBuffer create(DataInput in, AmqpMarshaller marshaller) throws IOException, AmqpEncodingError {
+            return create(marshaller.unmarshalAmqpTransfer(in));
+        }
+
+        public static AmqpTransfer.AmqpTransferBuffer create(Buffer buffer, int offset, AmqpMarshaller marshaller) throws AmqpEncodingError {
+            return create(marshaller.decodeAmqpTransfer(buffer, offset));
+        }
+    }
+}
\ No newline at end of file



Mime
View raw message