You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2015/08/14 21:08:05 UTC

[32/50] [abbrv] qpid-proton git commit: Adding the initial impl for Message types. Some types are missing, which will be added in due course.

Adding the initial impl for Message types. Some types are missing, which will be added in due course.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/240a07d1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/240a07d1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/240a07d1

Branch: refs/heads/rajith-codec
Commit: 240a07d1db8763d20f5ef0d4804736cf13a4d8a6
Parents: 1ff8367
Author: Rajith Attapattu <ra...@apache.org>
Authored: Fri Feb 20 20:21:10 2015 -0500
Committer: Rajith Attapattu <ra...@apache.org>
Committed: Thu Jul 9 09:12:38 2015 -0400

----------------------------------------------------------------------
 .../proton/message2/ApplicationProperties.java  |  73 +++++
 .../proton/message2/DeliveryAnnotations.java    |  73 +++++
 .../org/apache/qpid/proton/message2/Footer.java |  73 +++++
 .../org/apache/qpid/proton/message2/Header.java | 148 ++++++++++
 .../qpid/proton/message2/LifetimePolicy.java    |  60 ++++
 .../proton/message2/MessageAnnotations.java     |  73 +++++
 .../apache/qpid/proton/message2/Properties.java | 279 +++++++++++++++++++
 7 files changed, 779 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/ApplicationProperties.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/ApplicationProperties.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/ApplicationProperties.java
new file mode 100644
index 0000000..5385824
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/ApplicationProperties.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import java.util.Map;
+
+import org.apache.qpid.proton.codec2.CodecHelper;
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public final class ApplicationProperties implements Encodable
+{
+    public final static long DESCRIPTOR_LONG = 0x0000000000000074L;
+
+    public final static String DESCRIPTOR_STRING = "amqp:application-properties:map";
+
+    private final Map<Object, Object> _value;
+
+    public ApplicationProperties(Map<Object, Object> value)
+    {
+        _value = value;
+    }
+
+    public Map<Object, Object> getValue()
+    {
+        return _value;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(DESCRIPTOR_LONG);
+        CodecHelper.encodeMap(encoder, _value);
+        encoder.end();
+    }
+
+    public static final class Factory implements DescribedTypeFactory
+    {
+        @SuppressWarnings("unchecked")
+        public Object create(Object in) throws DecodeException
+        {
+            return new ApplicationProperties((Map<Object, Object>) in);
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return "ApplicationProperties{" + _value + '}';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/DeliveryAnnotations.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/DeliveryAnnotations.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/DeliveryAnnotations.java
new file mode 100644
index 0000000..7a4e1ba
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/DeliveryAnnotations.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import java.util.Map;
+
+import org.apache.qpid.proton.codec2.CodecHelper;
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public final class DeliveryAnnotations implements Encodable
+{
+    public final static long DESCRIPTOR_LONG = 0x0000000000000071L;
+
+    public final static String DESCRIPTOR_STRING = "amqp:delivery-annotations:ma";
+
+    private final Map<String, Object> _value;
+
+    public DeliveryAnnotations(Map<String, Object> value)
+    {
+        _value = value;
+    }
+
+    public Map<String, Object> getValue()
+    {
+        return _value;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(DESCRIPTOR_LONG);
+        CodecHelper.encodeMapWithKeyAsSymbol(encoder, _value);
+        encoder.end();
+    }
+
+    public static final class Factory implements DescribedTypeFactory
+    {
+        @SuppressWarnings("unchecked")
+        public Object create(Object in) throws DecodeException
+        {
+            return new DeliveryAnnotations((Map<String, Object>) in);
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return "DeliveryAnnotations{" + _value + '}';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/Footer.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/Footer.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/Footer.java
new file mode 100644
index 0000000..efcf570
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/Footer.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import java.util.Map;
+
+import org.apache.qpid.proton.codec2.CodecHelper;
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public final class Footer implements Encodable
+{
+    public final static long DESCRIPTOR_LONG = 0x0000000000000078L;
+
+    public final static String DESCRIPTOR_STRING = "amqp:footer:map";
+
+    private final Map<Object, Object> _value;
+
+    public Footer(Map<Object, Object> value)
+    {
+        _value = value;
+    }
+
+    public Map<Object, Object> getValue()
+    {
+        return _value;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(DESCRIPTOR_LONG);
+        CodecHelper.encodeMap(encoder, _value);
+        encoder.end();
+    }
+
+    public static final class Factory implements DescribedTypeFactory
+    {
+        @SuppressWarnings("unchecked")
+        public Object create(Object in) throws DecodeException
+        {
+            return new Footer((Map<Object, Object>) in);
+        }
+    }
+    
+    @Override
+    public String toString()
+    {
+        return "Footer{" + _value + '}';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/Header.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/Header.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/Header.java
new file mode 100644
index 0000000..fb0efa1
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/Header.java
@@ -0,0 +1,148 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import java.util.List;
+
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public final class Header implements Encodable
+{
+    public final static long DESCRIPTOR_LONG = 0x0000000000000070L;
+
+    public final static String DESCRIPTOR_STRING = "amqp:header:list";
+
+    private boolean _durable;
+
+    private byte _priority;
+
+    private int _ttl;
+
+    private boolean _firstAcquirer;
+
+    private int _deliveryCount;
+
+    public Boolean getDurable()
+    {
+        return _durable;
+    }
+
+    public void setDurable(Boolean durable)
+    {
+        _durable = durable;
+    }
+
+    public byte getPriority()
+    {
+        return _priority;
+    }
+
+    public void setPriority(byte priority)
+    {
+        _priority = priority;
+    }
+
+    public int getTtl()
+    {
+        return _ttl;
+    }
+
+    public void setTtl(int ttl)
+    {
+        _ttl = ttl;
+    }
+
+    public Boolean getFirstAcquirer()
+    {
+        return _firstAcquirer;
+    }
+
+    public void setFirstAcquirer(Boolean firstAcquirer)
+    {
+        _firstAcquirer = firstAcquirer;
+    }
+
+    public int getDeliveryCount()
+    {
+        return _deliveryCount;
+    }
+
+    public void setDeliveryCount(int deliveryCount)
+    {
+        _deliveryCount = deliveryCount;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(DESCRIPTOR_LONG);
+        encoder.putList();
+        encoder.putBoolean(_durable);
+        encoder.putUbyte(_priority);
+        encoder.putUint(_ttl);
+        encoder.putBoolean(_firstAcquirer);
+        encoder.putUint(_deliveryCount);
+        encoder.end();
+    }
+
+    public static final class Factory implements DescribedTypeFactory
+    {
+        @SuppressWarnings("unchecked")
+        public Object create(Object in) throws DecodeException
+        {
+            List<Object> l = (List<Object>) in;
+            Header header = new Header();
+
+            switch (5 - l.size())
+            {
+
+            case 0:
+                header.setDeliveryCount((int) l.get(4));
+            case 1:
+                header.setFirstAcquirer(l.get(3) == null ? false : (boolean) l.get(3));
+            case 2:
+                header.setTtl((int) l.get(2));
+            case 3:
+                header.setPriority(l.get(1) == null ? 4 : (byte) l.get(1));
+            case 4:
+                header.setDurable(l.get(0) == null ? false : (boolean) l.get(0));
+            }
+            return header;
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return "Header{" +
+               "durable=" + _durable +
+               ", priority=" + _priority +
+               ", ttl=" + _ttl +
+               ", firstAcquirer=" + _firstAcquirer +
+               ", deliveryCount=" + _deliveryCount +
+               '}';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/LifetimePolicy.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/LifetimePolicy.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/LifetimePolicy.java
new file mode 100644
index 0000000..e0ada46
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/LifetimePolicy.java
@@ -0,0 +1,60 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public enum LifetimePolicy implements Encodable, DescribedTypeFactory
+{
+    DELETE_ON_CLOSE_TYPE(0x000000000000002bL, "amqp:delete-on-close:list"), 
+    DELETE_ON_NO_LINKS_TYPE(0x000000000000002cL, "amqp:delete-on-no-links:list"),
+    DELETE_ON_NO_MSGS_TYPE(0x000000000000002dL, "amqp:delete-on-no-messages:list"),
+    DELETE_ON_NO_LINKS_OR_MSGS_TYPE(0x000000000000002eL, "amqp:delete-on-no-links-or-messages:list")
+    ;
+
+    public final long _descLong;
+
+    public final String _descString;
+
+    LifetimePolicy(long descLong, String descString)
+    {
+        _descLong = descLong;
+        _descString = descString;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(_descLong);
+        encoder.putList();
+        encoder.end();
+    }
+
+    @Override
+    public Object create(Object in) throws DecodeException
+    {
+        return this;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/MessageAnnotations.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/MessageAnnotations.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/MessageAnnotations.java
new file mode 100644
index 0000000..b874f6a
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/MessageAnnotations.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import java.util.Map;
+
+import org.apache.qpid.proton.codec2.CodecHelper;
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public final class MessageAnnotations implements Encodable
+{
+    public final static long DESCRIPTOR_LONG = 0x0000000000000072L;
+
+    public final static String DESCRIPTOR_STRING = "amqp:message-annotations:map";
+
+    private final Map<String, Object> _value;
+
+    public MessageAnnotations(Map<String, Object> value)
+    {
+        _value = value;
+    }
+
+    public Map<String, Object> getValue()
+    {
+        return _value;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(DESCRIPTOR_LONG);
+        CodecHelper.encodeMapWithKeyAsSymbol(encoder, _value);
+        encoder.end();
+    }
+
+    public static final class Factory implements DescribedTypeFactory
+    {
+        @SuppressWarnings("unchecked")
+        public Object create(Object in) throws DecodeException
+        {
+            return new MessageAnnotations((Map<String, Object>) in);
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return "MessageAnnotations{" + _value + '}';
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/240a07d1/proton-j/src/main/java/org/apache/qpid/proton/message2/Properties.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/message2/Properties.java b/proton-j/src/main/java/org/apache/qpid/proton/message2/Properties.java
new file mode 100644
index 0000000..b6d4e31
--- /dev/null
+++ b/proton-j/src/main/java/org/apache/qpid/proton/message2/Properties.java
@@ -0,0 +1,279 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this 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.qpid.proton.message2;
+
+import java.util.Date;
+import java.util.List;
+
+import org.apache.qpid.proton.codec2.CodecHelper;
+import org.apache.qpid.proton.codec2.DecodeException;
+import org.apache.qpid.proton.codec2.DescribedTypeFactory;
+import org.apache.qpid.proton.codec2.Encodable;
+import org.apache.qpid.proton.codec2.Encoder;
+
+public final class Properties implements Encodable
+{
+    public final static long DESCRIPTOR_LONG = 0x0000000000000073L;
+
+    public final static String DESCRIPTOR_STRING = "amqp:properties:list";
+
+    private Object _messageId;
+
+    private byte[] _userId;
+
+    private String _to;
+
+    private String _subject;
+
+    private String _replyTo;
+
+    private Object _correlationId;
+
+    private String _contentType;
+
+    private String _contentEncoding;
+
+    private Date _absoluteExpiryTime;
+
+    private Date _creationTime;
+
+    private String _groupId;
+
+    private int _groupSequence;
+
+    private String _replyToGroupId;
+
+    public Object getMessageId()
+    {
+        return _messageId;
+    }
+
+    public void setMessageId(Object messageId)
+    {
+        _messageId = messageId;
+    }
+
+    public byte[] getUserId()
+    {
+        return _userId;
+    }
+
+    public void setUserId(byte[] userId)
+    {
+        _userId = userId;
+    }
+
+    public String getTo()
+    {
+        return _to;
+    }
+
+    public void setTo(String to)
+    {
+        _to = to;
+    }
+
+    public String getSubject()
+    {
+        return _subject;
+    }
+
+    public void setSubject(String subject)
+    {
+        _subject = subject;
+    }
+
+    public String getReplyTo()
+    {
+        return _replyTo;
+    }
+
+    public void setReplyTo(String replyTo)
+    {
+        _replyTo = replyTo;
+    }
+
+    public Object getCorrelationId()
+    {
+        return _correlationId;
+    }
+
+    public void setCorrelationId(Object correlationId)
+    {
+        _correlationId = correlationId;
+    }
+
+    public String getContentType()
+    {
+        return _contentType;
+    }
+
+    public void setContentType(String contentType)
+    {
+        _contentType = contentType;
+    }
+
+    public String getContentEncoding()
+    {
+        return _contentEncoding;
+    }
+
+    public void setContentEncoding(String contentEncoding)
+    {
+        _contentEncoding = contentEncoding;
+    }
+
+    public Date getAbsoluteExpiryTime()
+    {
+        return _absoluteExpiryTime;
+    }
+
+    public void setAbsoluteExpiryTime(Date absoluteExpiryTime)
+    {
+        _absoluteExpiryTime = absoluteExpiryTime;
+    }
+
+    public Date getCreationTime()
+    {
+        return _creationTime;
+    }
+
+    public void setCreationTime(Date creationTime)
+    {
+        _creationTime = creationTime;
+    }
+
+    public String getGroupId()
+    {
+        return _groupId;
+    }
+
+    public void setGroupId(String groupId)
+    {
+        _groupId = groupId;
+    }
+
+    public int getGroupSequence()
+    {
+        return _groupSequence;
+    }
+
+    public void setGroupSequence(int groupSequence)
+    {
+        _groupSequence = groupSequence;
+    }
+
+    public String getReplyToGroupId()
+    {
+        return _replyToGroupId;
+    }
+
+    public void setReplyToGroupId(String replyToGroupId)
+    {
+        _replyToGroupId = replyToGroupId;
+    }
+
+    @Override
+    public void encode(Encoder encoder)
+    {
+        encoder.putDescriptor();
+        encoder.putUlong(DESCRIPTOR_LONG);
+        encoder.putList();
+        CodecHelper.encodeObject(encoder, _messageId);
+        encoder.putBinary(_userId, 0, _userId.length);
+        encoder.putString(_to);
+        encoder.putString(_subject);
+        encoder.putString(_replyTo);
+        CodecHelper.encodeObject(encoder, _correlationId);
+        encoder.putSymbol(_contentType);
+        encoder.putSymbol(_contentEncoding);
+        encoder.putTimestamp(_absoluteExpiryTime.getTime());
+        encoder.putTimestamp(_creationTime.getTime());
+        encoder.putString(_groupId);
+        encoder.putUint(_groupSequence);
+        encoder.putString(_replyToGroupId);
+        encoder.end();
+    }
+
+    public static final class Factory implements DescribedTypeFactory
+    {
+        @SuppressWarnings("unchecked")
+        public Object create(Object in) throws DecodeException
+        {
+            List<Object> l = (List<Object>) in;
+            Properties props = new Properties();
+
+            switch (13 - l.size())
+            {
+
+            case 0:
+                props.setReplyToGroupId((String) l.get(12));
+            case 1:
+                props.setGroupSequence((int) l.get(11));
+            case 2:
+                props.setGroupId((String) l.get(10));
+            case 3:
+                props.setCreationTime(new Date((long) l.get(9)));
+            case 4:
+                props.setAbsoluteExpiryTime(new Date((long) l.get(8)));
+            case 5:
+                props.setContentEncoding((String) l.get(7));
+            case 6:
+                props.setContentType((String) l.get(6));
+            case 7:
+                props.setCorrelationId((Object) l.get(5));
+            case 8:
+                props.setReplyTo((String) l.get(4));
+            case 9:
+                props.setSubject((String) l.get(3));
+            case 10:
+                props.setTo((String) l.get(2));
+            case 11:
+                props.setUserId((byte[]) l.get(1));
+            case 12:
+                props.setMessageId((Object) l.get(0));
+            }
+
+            return props;
+        }
+    }
+
+    @Override
+    public String toString()
+    {
+        return "Properties{" +
+               "messageId=" + _messageId +
+               ", userId=" + _userId +
+               ", to='" + _to + '\'' +
+               ", subject='" + _subject + '\'' +
+               ", replyTo='" + _replyTo + '\'' +
+               ", correlationId=" + _correlationId +
+               ", contentType=" + _contentType +
+               ", contentEncoding=" + _contentEncoding +
+               ", absoluteExpiryTime=" + _absoluteExpiryTime +
+               ", creationTime=" + _creationTime +
+               ", groupId='" + _groupId + '\'' +
+               ", groupSequence=" + _groupSequence +
+               ", replyToGroupId='" + _replyToGroupId + '\'' +
+               '}';
+    }
+}
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org