You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by lq...@apache.org on 2017/09/28 13:36:05 UTC

[08/12] qpid-broker-j git commit: QPID-7932: [Java Broker, AMQP 1.0] Improve error handling when deserializing composite types

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/PropertiesConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/PropertiesConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/PropertiesConstructor.java
deleted file mode 100644
index e3b226d..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/PropertiesConstructor.java
+++ /dev/null
@@ -1,426 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.messaging.codec;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.Binary;
-import org.apache.qpid.server.protocol.v1_0.type.Symbol;
-import org.apache.qpid.server.protocol.v1_0.type.UnsignedInteger;
-import org.apache.qpid.server.protocol.v1_0.type.UnsignedLong;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.Properties;
-
-public class PropertiesConstructor extends AbstractDescribedTypeConstructor<Properties>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:properties:list"),UnsignedLong.valueOf(0x0000000000000073L),
-    };
-
-    private static final PropertiesConstructor INSTANCE = new PropertiesConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public Properties construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            Properties obj = new Properties();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setMessageId( val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setUserId( (Binary) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setTo( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setSubject( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setReplyTo( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setCorrelationId( val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setContentType( (Symbol) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setContentEncoding( (Symbol) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setAbsoluteExpiryTime( (Date) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setCreationTime( (Date) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setGroupId( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setGroupSequence( (UnsignedInteger) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setReplyToGroupId( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReceivedConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReceivedConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReceivedConstructor.java
deleted file mode 100644
index 6fca7c7..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReceivedConstructor.java
+++ /dev/null
@@ -1,126 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.messaging.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.*;
-
-
-import java.util.List;
-
-public class ReceivedConstructor extends AbstractDescribedTypeConstructor<Received>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:received:list"),UnsignedLong.valueOf(0x0000000000000023L),
-    };
-
-    private static final ReceivedConstructor INSTANCE = new ReceivedConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public Received construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            Received obj = new Received();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setSectionNumber( (UnsignedInteger) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setSectionOffset( (UnsignedLong) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/RejectedConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/RejectedConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/RejectedConstructor.java
deleted file mode 100644
index f4941e0..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/RejectedConstructor.java
+++ /dev/null
@@ -1,98 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.messaging.codec;
-
-import java.util.List;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.UnsignedLong;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.Rejected;
-
-public class RejectedConstructor extends AbstractDescribedTypeConstructor<Rejected>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Rejected.REJECTED_SYMBOL,UnsignedLong.valueOf(0x0000000000000025L),
-    };
-
-    private static final RejectedConstructor INSTANCE = new RejectedConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public Rejected construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            Rejected obj = new Rejected();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setError( (org.apache.qpid.server.protocol.v1_0.type.transport.Error) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReleasedConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReleasedConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReleasedConstructor.java
deleted file mode 100644
index 605ea2b..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/ReleasedConstructor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.messaging.codec;
-
-import java.util.List;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.UnsignedLong;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.Released;
-
-public class ReleasedConstructor extends AbstractDescribedTypeConstructor<Released>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Released.RELEASED_SYMBOL,UnsignedLong.valueOf(0x0000000000000026L),
-    };
-
-    private static final ReleasedConstructor INSTANCE = new ReleasedConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public Released construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            Released obj = new Released();
-            int position = 0;
-            final int size = list.size();
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/SourceConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/SourceConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/SourceConstructor.java
deleted file mode 100644
index 7156c06..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/SourceConstructor.java
+++ /dev/null
@@ -1,385 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.messaging.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.*;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.Source;
-
-
-import java.util.List;
-import java.util.Map;
-
-public class SourceConstructor extends AbstractDescribedTypeConstructor<Source>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:source:list"),UnsignedLong.valueOf(0x0000000000000028L),
-    };
-
-    private static final SourceConstructor INSTANCE = new SourceConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public Source construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            Source obj = new Source();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setAddress( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDurable( TerminusDurability.valueOf( val ) );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setExpiryPolicy( TerminusExpiryPolicy.valueOf( val ) );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setTimeout( (UnsignedInteger) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDynamic( (Boolean) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDynamicNodeProperties( (Map) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDistributionMode( StdDistMode.valueOf(val) );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setFilter( (Map) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDefaultOutcome( (Outcome) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-
-                    if (val instanceof Symbol[] )
-                    {
-                        obj.setOutcomes( (Symbol[]) val );
-                    }
-                    else
-		            {
-                        try
-                        {
-                            obj.setOutcomes( new Symbol[] { (Symbol) val } );
-                        }
-                        catch(ClassCastException e)
-                        {
-                            // TODO Error
-                        }
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-
-                    if (val instanceof Symbol[] )
-                    {
-                        obj.setCapabilities( (Symbol[]) val );
-                    }
-                    else
-		            {
-                        try
-                        {
-                            obj.setCapabilities( new Symbol[] { (Symbol) val } );
-                        }
-                        catch(ClassCastException e)
-                        {
-                            // TODO Error
-                        }
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/TargetConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/TargetConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/TargetConstructor.java
deleted file mode 100644
index 2294acc..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/codec/TargetConstructor.java
+++ /dev/null
@@ -1,270 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.messaging.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.*;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.Target;
-
-
-import java.util.List;
-import java.util.Map;
-
-public class TargetConstructor extends AbstractDescribedTypeConstructor<Target>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:target:list"),UnsignedLong.valueOf(0x0000000000000029L),
-    };
-
-    private static final TargetConstructor INSTANCE = new TargetConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public Target construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            Target obj = new Target();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setAddress( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDurable( TerminusDurability.valueOf( val ) );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setExpiryPolicy( TerminusExpiryPolicy.valueOf( val ) );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setTimeout( (UnsignedInteger) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDynamic( (Boolean) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setDynamicNodeProperties( (Map) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-
-                    if (val instanceof Symbol[] )
-                    {
-                        obj.setCapabilities( (Symbol[]) val );
-                    }
-                    else
-		            {
-                        try
-                        {
-                            obj.setCapabilities( new Symbol[] { (Symbol) val } );
-                        }
-                        catch(ClassCastException e)
-                        {
-                            // TODO Error
-                        }
-                    }
-                    
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslChallenge.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslChallenge.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslChallenge.java
index ac28d18..5c15541 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslChallenge.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslChallenge.java
@@ -25,16 +25,15 @@ package org.apache.qpid.server.protocol.v1_0.type.security;
 
 
 import org.apache.qpid.server.protocol.v1_0.SASLEndpoint;
-
-
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class SaslChallenge
-  implements SaslFrameBody
-  {
-
-
-    @CompositeTypeField(mandatory = true)
+import org.apache.qpid.server.protocol.v1_0.type.Binary;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.type.SaslFrameBody;
+
+@CompositeType( symbolicDescriptor = "amqp:sasl-challenge:list", numericDescriptor = 0x0000000000000042L)
+public class SaslChallenge implements SaslFrameBody
+{
+    @CompositeTypeField(index = 0, mandatory = true)
     private Binary _challenge;
 
     public Binary getChallenge()
@@ -53,9 +52,9 @@ public class SaslChallenge
         StringBuilder builder = new StringBuilder("SaslChallenge{");
         final int origLength = builder.length();
 
-        if(_challenge != null)
+        if (_challenge != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -71,6 +70,4 @@ public class SaslChallenge
     {
         conn.receiveSaslChallenge(this);
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslCode.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslCode.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslCode.java
index 7894104..ec58ef4 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslCode.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslCode.java
@@ -24,30 +24,22 @@
 package org.apache.qpid.server.protocol.v1_0.type.security;
 
 
+import org.apache.qpid.server.protocol.v1_0.type.RestrictedType;
+import org.apache.qpid.server.protocol.v1_0.type.UnsignedByte;
 
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class SaslCode
-  implements RestrictedType<UnsignedByte>
-  
-  {
-
-
-
+public class SaslCode implements RestrictedType<UnsignedByte>
+{
     private final UnsignedByte _val;
 
-    
     public static final SaslCode OK = new SaslCode(UnsignedByte.valueOf((byte) 0));
-    
+
     public static final SaslCode AUTH = new SaslCode(UnsignedByte.valueOf((byte) 1));
-    
+
     public static final SaslCode SYS = new SaslCode(UnsignedByte.valueOf((byte) 2));
-    
+
     public static final SaslCode SYS_PERM = new SaslCode(UnsignedByte.valueOf((byte) 3));
-    
-    public static final SaslCode SYS_TEMP = new SaslCode(UnsignedByte.valueOf((byte) 4));
-    
 
+    public static final SaslCode SYS_TEMP = new SaslCode(UnsignedByte.valueOf((byte) 4));
 
     private SaslCode(UnsignedByte val)
     {
@@ -63,32 +55,31 @@ public class SaslCode
     @Override
     public String toString()
     {
-        
-        if(this == OK)
+        if (this == OK)
         {
             return "ok";
         }
-        
-        if(this == AUTH)
+
+        if (this == AUTH)
         {
             return "auth";
         }
-        
-        if(this == SYS)
+
+        if (this == SYS)
         {
             return "sys";
         }
-        
-        if(this == SYS_PERM)
+
+        if (this == SYS_PERM)
         {
             return "sys-perm";
         }
-        
-        if(this == SYS_TEMP)
+
+        if (this == SYS_TEMP)
         {
             return "sys-temp";
         }
-        
+
         else
         {
             return String.valueOf(_val);
@@ -99,35 +90,32 @@ public class SaslCode
     {
         UnsignedByte val = (UnsignedByte) obj;
 
-        if(OK._val.equals(val))
+        if (OK._val.equals(val))
         {
             return OK;
         }
-    
-        if(AUTH._val.equals(val))
+
+        if (AUTH._val.equals(val))
         {
             return AUTH;
         }
-    
-        if(SYS._val.equals(val))
+
+        if (SYS._val.equals(val))
         {
             return SYS;
         }
-    
-        if(SYS_PERM._val.equals(val))
+
+        if (SYS_PERM._val.equals(val))
         {
             return SYS_PERM;
         }
-    
-        if(SYS_TEMP._val.equals(val))
+
+        if (SYS_TEMP._val.equals(val))
         {
             return SYS_TEMP;
         }
-    
+
         // TODO ERROR
         return null;
     }
-
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslInit.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslInit.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslInit.java
index 54d02e0..a7ff3d4 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslInit.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslInit.java
@@ -25,22 +25,23 @@ package org.apache.qpid.server.protocol.v1_0.type.security;
 
 
 import org.apache.qpid.server.protocol.v1_0.SASLEndpoint;
+import org.apache.qpid.server.protocol.v1_0.type.Binary;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.type.SaslFrameBody;
+import org.apache.qpid.server.protocol.v1_0.type.Symbol;
 
+@CompositeType( symbolicDescriptor = "amqp:sasl-init:list", numericDescriptor = 0x0000000000000041L)
+public class SaslInit implements SaslFrameBody
+{
 
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class SaslInit
-  implements SaslFrameBody
-  {
-
-
-    @CompositeTypeField(mandatory = true)
+    @CompositeTypeField(index = 0, mandatory = true)
     private Symbol _mechanism;
 
-    @CompositeTypeField
+    @CompositeTypeField(index = 1)
     private Binary _initialResponse;
 
-    @CompositeTypeField
+    @CompositeTypeField(index = 2)
     private String _hostname;
 
     public Symbol getMechanism()
@@ -79,27 +80,27 @@ public class SaslInit
         StringBuilder builder = new StringBuilder("SaslInit{");
         final int origLength = builder.length();
 
-        if(_mechanism != null)
+        if (_mechanism != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
             builder.append("mechanism=").append(_mechanism);
         }
 
-        if(_initialResponse != null)
+        if (_initialResponse != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
             builder.append("initialResponse=").append(_initialResponse);
         }
 
-        if(_hostname != null)
+        if (_hostname != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -115,6 +116,4 @@ public class SaslInit
     {
         conn.receiveSaslInit(this);
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslMechanisms.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslMechanisms.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslMechanisms.java
index 3817839..350bfdd 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslMechanisms.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslMechanisms.java
@@ -25,17 +25,17 @@ package org.apache.qpid.server.protocol.v1_0.type.security;
 
 
 import java.util.Arrays;
+
 import org.apache.qpid.server.protocol.v1_0.SASLEndpoint;
-import org.apache.qpid.server.protocol.v1_0.type.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
 import org.apache.qpid.server.protocol.v1_0.type.SaslFrameBody;
 import org.apache.qpid.server.protocol.v1_0.type.Symbol;
 
-public class SaslMechanisms
-  implements SaslFrameBody
-  {
-
-
-    @CompositeTypeField(mandatory = true)
+@CompositeType( symbolicDescriptor = "amqp:sasl-mechanisms:list", numericDescriptor = 0x0000000000000040L)
+public class SaslMechanisms implements SaslFrameBody
+{
+    @CompositeTypeField(index = 0, mandatory = true)
     private Symbol[] _saslServerMechanisms;
 
     public Symbol[] getSaslServerMechanisms()
@@ -54,9 +54,9 @@ public class SaslMechanisms
         StringBuilder builder = new StringBuilder("SaslMechanisms{");
         final int origLength = builder.length();
 
-        if(_saslServerMechanisms != null)
+        if (_saslServerMechanisms != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -72,6 +72,4 @@ public class SaslMechanisms
     {
         conn.receiveSaslMechanisms(this);
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslOutcome.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslOutcome.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslOutcome.java
index 9c1c3b7..aeb1c57 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslOutcome.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslOutcome.java
@@ -25,19 +25,18 @@ package org.apache.qpid.server.protocol.v1_0.type.security;
 
 
 import org.apache.qpid.server.protocol.v1_0.SASLEndpoint;
-
-
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class SaslOutcome
-  implements SaslFrameBody
-  {
-
-
-    @CompositeTypeField(mandatory = true)
+import org.apache.qpid.server.protocol.v1_0.type.Binary;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.type.SaslFrameBody;
+
+@CompositeType( symbolicDescriptor = "amqp:sasl-outcome:list", numericDescriptor = 0x0000000000000044L)
+public class SaslOutcome implements SaslFrameBody
+{
+    @CompositeTypeField(index = 0, mandatory = true)
     private SaslCode _code;
 
-    @CompositeTypeField
+    @CompositeTypeField(index = 1)
     private Binary _additionalData;
 
     public SaslCode getCode()
@@ -66,18 +65,18 @@ public class SaslOutcome
         StringBuilder builder = new StringBuilder("SaslOutcome{");
         final int origLength = builder.length();
 
-        if(_code != null)
+        if (_code != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
             builder.append("code=").append(_code);
         }
 
-        if(_additionalData != null)
+        if (_additionalData != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -93,6 +92,4 @@ public class SaslOutcome
     {
         conn.receiveSaslOutcome(this);
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslResponse.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslResponse.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslResponse.java
index 848ff1b..9679168 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslResponse.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/SaslResponse.java
@@ -25,16 +25,15 @@ package org.apache.qpid.server.protocol.v1_0.type.security;
 
 
 import org.apache.qpid.server.protocol.v1_0.SASLEndpoint;
-
-
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class SaslResponse
-  implements SaslFrameBody
-  {
-
-
-    @CompositeTypeField(mandatory = true)
+import org.apache.qpid.server.protocol.v1_0.type.Binary;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.type.SaslFrameBody;
+
+@CompositeType( symbolicDescriptor = "amqp:sasl-response:list", numericDescriptor = 0x0000000000000043L)
+public class SaslResponse implements SaslFrameBody
+{
+    @CompositeTypeField(index = 0, mandatory = true)
     private Binary _response;
 
     public Binary getResponse()
@@ -53,9 +52,9 @@ public class SaslResponse
         StringBuilder builder = new StringBuilder("SaslResponse{");
         final int origLength = builder.length();
 
-        if(_response != null)
+        if (_response != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -71,6 +70,4 @@ public class SaslResponse
     {
         conn.receiveSaslResponse(this);
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslChallengeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslChallengeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslChallengeConstructor.java
deleted file mode 100644
index 3f1c93b..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslChallengeConstructor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.security.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.security.*;
-
-
-import java.util.List;
-
-public class SaslChallengeConstructor extends AbstractDescribedTypeConstructor<SaslChallenge>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:sasl-challenge:list"),UnsignedLong.valueOf(0x0000000000000042L),
-    };
-
-    private static final SaslChallengeConstructor INSTANCE = new SaslChallengeConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public SaslChallenge construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            SaslChallenge obj = new SaslChallenge();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setChallenge( (Binary) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslInitConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslInitConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslInitConstructor.java
deleted file mode 100644
index bb0a882..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslInitConstructor.java
+++ /dev/null
@@ -1,153 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.security.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.security.*;
-
-
-import java.util.List;
-
-public class SaslInitConstructor extends AbstractDescribedTypeConstructor<SaslInit>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:sasl-init:list"),UnsignedLong.valueOf(0x0000000000000041L),
-    };
-
-    private static final SaslInitConstructor INSTANCE = new SaslInitConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public SaslInit construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            SaslInit obj = new SaslInit();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setMechanism( (Symbol) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setInitialResponse( (Binary) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setHostname( (String) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslMechanismsConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslMechanismsConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslMechanismsConstructor.java
deleted file mode 100644
index 7af4d03..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslMechanismsConstructor.java
+++ /dev/null
@@ -1,106 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.security.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.security.*;
-
-
-import java.util.List;
-
-public class SaslMechanismsConstructor extends AbstractDescribedTypeConstructor<SaslMechanisms>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:sasl-mechanisms:list"),UnsignedLong.valueOf(0x0000000000000040L),
-    };
-
-    private static final SaslMechanismsConstructor INSTANCE = new SaslMechanismsConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public SaslMechanisms construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            SaslMechanisms obj = new SaslMechanisms();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-
-                    if (val instanceof Symbol[] )
-                    {
-                        obj.setSaslServerMechanisms( (Symbol[]) val );
-                    }
-                    else
-		            {
-                        try
-                        {
-                            obj.setSaslServerMechanisms( new Symbol[] { (Symbol) val } );
-                        }
-                        catch(ClassCastException e)
-                        {
-                            // TODO Error
-                        }
-                    }
-                    
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslOutcomeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslOutcomeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslOutcomeConstructor.java
deleted file mode 100644
index eb8b0fd..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslOutcomeConstructor.java
+++ /dev/null
@@ -1,126 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.security.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.security.*;
-
-
-import java.util.List;
-
-public class SaslOutcomeConstructor extends AbstractDescribedTypeConstructor<SaslOutcome>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:sasl-outcome:list"),UnsignedLong.valueOf(0x0000000000000044L),
-    };
-
-    private static final SaslOutcomeConstructor INSTANCE = new SaslOutcomeConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public SaslOutcome construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            SaslOutcome obj = new SaslOutcome();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setCode( SaslCode.valueOf( val ) );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setAdditionalData( (Binary) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslResponseConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslResponseConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslResponseConstructor.java
deleted file mode 100644
index 14ab4aa..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/security/codec/SaslResponseConstructor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-
-/*
-*
-* 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.server.protocol.v1_0.type.security.codec;
-
-import org.apache.qpid.server.protocol.v1_0.codec.AbstractDescribedTypeConstructor;
-import org.apache.qpid.server.protocol.v1_0.codec.DescribedTypeConstructorRegistry;
-import org.apache.qpid.server.protocol.v1_0.type.*;
-import org.apache.qpid.server.protocol.v1_0.type.security.*;
-
-
-import java.util.List;
-
-public class SaslResponseConstructor extends AbstractDescribedTypeConstructor<SaslResponse>
-{
-    private static final Object[] DESCRIPTORS =
-    {
-            Symbol.valueOf("amqp:sasl-response:list"),UnsignedLong.valueOf(0x0000000000000043L),
-    };
-
-    private static final SaslResponseConstructor INSTANCE = new SaslResponseConstructor();
-
-    public static void register(DescribedTypeConstructorRegistry registry)
-    {
-        for(Object descriptor : DESCRIPTORS)
-        {
-            registry.register(descriptor, INSTANCE);
-        }
-    }
-
-    @Override
-    public SaslResponse construct(Object underlying)
-    {
-        if(underlying instanceof List)
-        {
-            List list = (List) underlying;
-            SaslResponse obj = new SaslResponse();
-            int position = 0;
-            final int size = list.size();
-
-            if(position < size)
-            {
-                Object val = list.get(position);
-                position++;
-
-                if(val != null)
-                {
-
-                    try
-                    {
-                        obj.setResponse( (Binary) val );
-                    }
-                    catch(ClassCastException e)
-                    {
-
-                        // TODO Error
-                    }
-
-                }
-
-
-            }
-            else
-            {
-                return obj;
-            }
-
-
-            return obj;
-        }
-        else
-        {
-            // TODO - error
-            return null;
-        }
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Coordinator.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Coordinator.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Coordinator.java
index 09182d6..a0f33ab 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Coordinator.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Coordinator.java
@@ -24,17 +24,17 @@
 package org.apache.qpid.server.protocol.v1_0.type.transaction;
 
 
-
 import java.util.Arrays;
 
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.type.BaseTarget;
+import org.apache.qpid.server.protocol.v1_0.type.TxnCapability;
 
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class Coordinator
-        implements BaseTarget
-  {
-
-
+@CompositeType(symbolicDescriptor = "amqp:coordinator:list", numericDescriptor = 0x0000000000000030L)
+public class Coordinator implements BaseTarget
+{
+    @CompositeTypeField(index = 0, deserializationConverter = "org.apache.qpid.server.protocol.v1_0.DeserializationFactories.convertToTxnCapability")
     private TxnCapability[] _capabilities;
 
     public TxnCapability[] getCapabilities()
@@ -53,9 +53,9 @@ public class Coordinator
         StringBuilder builder = new StringBuilder("Coordinator{");
         final int origLength = builder.length();
 
-        if(_capabilities != null)
+        if (_capabilities != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -65,6 +65,4 @@ public class Coordinator
         builder.append('}');
         return builder.toString();
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declare.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declare.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declare.java
index 95b983a..42f5006 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declare.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declare.java
@@ -24,13 +24,14 @@
 package org.apache.qpid.server.protocol.v1_0.type.transaction;
 
 
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.type.GlobalTxId;
 
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
+@CompositeType( symbolicDescriptor = "amqp:declare:list", numericDescriptor = 0x0000000000000031L)
 public class Declare
-  {
-
-
+{
+    @CompositeTypeField(index = 0)
     private GlobalTxId _globalId;
 
     public GlobalTxId getGlobalId()
@@ -49,9 +50,9 @@ public class Declare
         StringBuilder builder = new StringBuilder("Declare{");
         final int origLength = builder.length();
 
-        if(_globalId != null)
+        if (_globalId != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -61,6 +62,4 @@ public class Declare
         builder.append('}');
         return builder.toString();
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declared.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declared.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declared.java
index a9b9343..2aac59d 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declared.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Declared.java
@@ -25,15 +25,17 @@ package org.apache.qpid.server.protocol.v1_0.type.transaction;
 
 
 import org.apache.qpid.server.protocol.v1_0.type.Binary;
-import org.apache.qpid.server.protocol.v1_0.type.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
 import org.apache.qpid.server.protocol.v1_0.type.Outcome;
 import org.apache.qpid.server.protocol.v1_0.type.Symbol;
 
+@CompositeType( symbolicDescriptor = "amqp:declared:list", numericDescriptor = 0x0000000000000033L)
 public class Declared implements Outcome
 {
     public static final Symbol DECLARED_SYMBOL = Symbol.valueOf("amqp:declared:list");
 
-    @CompositeTypeField(mandatory = true)
+    @CompositeTypeField(index = 0, mandatory = true)
     private Binary _txnId;
 
     public Binary getTxnId()

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Discharge.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Discharge.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Discharge.java
index 16a055e..f74c813 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Discharge.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/Discharge.java
@@ -24,17 +24,17 @@
 package org.apache.qpid.server.protocol.v1_0.type.transaction;
 
 
+import org.apache.qpid.server.protocol.v1_0.type.Binary;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
 
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
+@CompositeType( symbolicDescriptor = "amqp:discharge:list", numericDescriptor = 0x0000000000000032L)
 public class Discharge
-  {
-
-
-    @CompositeTypeField(mandatory = true)
+{
+    @CompositeTypeField(index = 0, mandatory = true)
     private Binary _txnId;
 
-    @CompositeTypeField
+    @CompositeTypeField(index = 1)
     private Boolean _fail;
 
     public Binary getTxnId()
@@ -63,18 +63,18 @@ public class Discharge
         StringBuilder builder = new StringBuilder("Discharge{");
         final int origLength = builder.length();
 
-        if(_txnId != null)
+        if (_txnId != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
             builder.append("txnId=").append(_txnId);
         }
 
-        if(_fail != null)
+        if (_fail != null)
         {
-            if(builder.length() != origLength)
+            if (builder.length() != origLength)
             {
                 builder.append(',');
             }
@@ -84,6 +84,4 @@ public class Discharge
         builder.append('}');
         return builder.toString();
     }
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionErrors.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionErrors.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionErrors.java
index b065585..5297f8f 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionErrors.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionErrors.java
@@ -1,4 +1,3 @@
-
 /*
 *
 * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,31 +18,25 @@
 * under the License.
 *
 */
-
-
 package org.apache.qpid.server.protocol.v1_0.type.transaction;
 
 
+import org.apache.qpid.server.protocol.v1_0.type.ErrorCondition;
+import org.apache.qpid.server.protocol.v1_0.type.RestrictedType;
+import org.apache.qpid.server.protocol.v1_0.type.Symbol;
 
-import org.apache.qpid.server.protocol.v1_0.type.*;
-
-public class TransactionErrors
-  implements ErrorCondition, RestrictedType<Symbol>
-  
-  {
-
-
-
+public class TransactionErrors implements ErrorCondition, RestrictedType<Symbol>
+{
     private final Symbol _val;
 
-    
-    public static final TransactionErrors UNKNOWN_ID = new TransactionErrors(Symbol.valueOf("amqp:transaction:unknown-id"));
-    
-    public static final TransactionErrors TRANSACTION_ROLLBACK = new TransactionErrors(Symbol.valueOf("amqp:transaction:rollback"));
-    
-    public static final TransactionErrors TRANSACTION_TIMEOUT = new TransactionErrors(Symbol.valueOf("amqp:transaction:timeout"));
-    
+    public static final TransactionErrors UNKNOWN_ID =
+            new TransactionErrors(Symbol.valueOf("amqp:transaction:unknown-id"));
 
+    public static final TransactionErrors TRANSACTION_ROLLBACK =
+            new TransactionErrors(Symbol.valueOf("amqp:transaction:rollback"));
+
+    public static final TransactionErrors TRANSACTION_TIMEOUT =
+            new TransactionErrors(Symbol.valueOf("amqp:transaction:timeout"));
 
     private TransactionErrors(Symbol val)
     {
@@ -59,22 +52,21 @@ public class TransactionErrors
     @Override
     public String toString()
     {
-        
-        if(this == UNKNOWN_ID)
+        if (this == UNKNOWN_ID)
         {
             return "unknown-id";
         }
-        
-        if(this == TRANSACTION_ROLLBACK)
+
+        if (this == TRANSACTION_ROLLBACK)
         {
             return "transaction-rollback";
         }
-        
-        if(this == TRANSACTION_TIMEOUT)
+
+        if (this == TRANSACTION_TIMEOUT)
         {
             return "transaction-timeout";
         }
-        
+
         else
         {
             return String.valueOf(_val);
@@ -85,25 +77,21 @@ public class TransactionErrors
     {
         Symbol val = (Symbol) obj;
 
-        if(UNKNOWN_ID._val.equals(val))
+        if (UNKNOWN_ID._val.equals(val))
         {
             return UNKNOWN_ID;
         }
-    
-        if(TRANSACTION_ROLLBACK._val.equals(val))
+
+        if (TRANSACTION_ROLLBACK._val.equals(val))
         {
             return TRANSACTION_ROLLBACK;
         }
-    
-        if(TRANSACTION_TIMEOUT._val.equals(val))
+
+        if (TRANSACTION_TIMEOUT._val.equals(val))
         {
             return TRANSACTION_TIMEOUT;
         }
-    
-        // TODO ERROR
+
         return null;
     }
-
-
-
-  }
+}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/6a267175/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionalState.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionalState.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionalState.java
index 20db2a1..226d265 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionalState.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/transaction/TransactionalState.java
@@ -25,16 +25,18 @@ package org.apache.qpid.server.protocol.v1_0.type.transaction;
 
 
 import org.apache.qpid.server.protocol.v1_0.type.Binary;
-import org.apache.qpid.server.protocol.v1_0.type.CompositeTypeField;
+import org.apache.qpid.server.protocol.v1_0.CompositeType;
+import org.apache.qpid.server.protocol.v1_0.CompositeTypeField;
 import org.apache.qpid.server.protocol.v1_0.type.DeliveryState;
 import org.apache.qpid.server.protocol.v1_0.type.Outcome;
 
+@CompositeType( symbolicDescriptor = "amqp:transactional-state:list", numericDescriptor = 0x0000000000000034L)
 public class TransactionalState implements DeliveryState
 {
-    @CompositeTypeField(mandatory = true)
+    @CompositeTypeField(index = 0, mandatory = true)
     private Binary _txnId;
 
-    @CompositeTypeField
+    @CompositeTypeField(index = 1)
     private Outcome _outcome;
 
     public Binary getTxnId()


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