Bug 2756 - Action model update
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / factories / MultipartReplyMessageFactory.java
index f82ec53ea5917cd2af5bad11b8c17ac9e494e6eb..b6e24b45dd44683b32b82563fd042fedaf6bfe1d 100644 (file)
@@ -14,26 +14,29 @@ import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.opendaylight.openflowjava.protocol.impl.deserialization.OFDeserializer;
-import org.opendaylight.openflowjava.protocol.impl.util.ActionsDeserializer;
-import org.opendaylight.openflowjava.protocol.impl.util.ByteBufUtils;
-import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;
-import org.opendaylight.openflowjava.protocol.impl.util.InstructionsDeserializer;
-import org.opendaylight.openflowjava.protocol.impl.util.MatchDeserializer;
+import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
+import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistryInjector;
+import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
+import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.impl.util.CodeKeyMaker;
+import org.opendaylight.openflowjava.protocol.impl.util.CodeKeyMakerFactory;
+import org.opendaylight.openflowjava.protocol.impl.util.ListDeserializer;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.openflowjava.util.ExperimenterDeserializerKeyFactory;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ActionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.ExperimenterRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.InstructionRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.NextTableRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeatureProperty;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.OxmRelatedTableFeaturePropertyBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIds;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev131002.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.ActionsList;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.ActionRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.InstructionRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.NextTableRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeatureProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.OxmRelatedTableFeaturePropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIds;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.table.features.properties.container.table.feature.properties.NextTableIdsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ActionType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowModFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.GroupCapabilities;
@@ -52,78 +55,96 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev13
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortState;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.TableFeaturesPropType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.grouping.Match;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.BucketsList;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.BucketsListBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDscpRemarkBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.MultipartReplyBody;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregate;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyDesc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyDescBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyExperimenter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyExperimenterBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyFlow;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyFlowBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroup;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupDesc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupDescBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeter;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterConfig;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterConfigBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterFeatures;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterFeaturesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortDesc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortDescBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyQueue;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyQueueBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTable;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableFeatures;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableFeaturesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow.FlowStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow.FlowStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.GroupStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.GroupStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc.GroupDesc;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc.GroupDescBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.group.stats.BucketStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.group.stats.BucketStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.MeterStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.MeterStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config.MeterConfig;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config.MeterConfigBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config.meter.config.Bands;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config.meter.config.BandsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.meter.stats.MeterBandStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.meter.stats.MeterBandStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.desc.Ports;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.desc.PortsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.stats.PortStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.stats.PortStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.queue.QueueStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.queue.QueueStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.TableStats;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.TableStatsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.features.TableFeatures;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.features.TableFeaturesBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.TableFeatureProperties;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.TableFeaturePropertiesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.grouping.BucketsList;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.buckets.grouping.BucketsListBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDropCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandDscpRemarkCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.meter.band.drop._case.MeterBandDropBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.meter.band.dscp.remark._case.MeterBandDscpRemarkBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyDescCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyDescCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyExperimenterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyFlowCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyFlowCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupDescCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupDescCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyGroupFeaturesCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterConfigCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterConfigCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterFeaturesCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyMeterFeaturesCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortDescCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortDescCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortStatsCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyPortStatsCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyQueueCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyQueueCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableFeaturesCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyTableFeaturesCaseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.aggregate._case.MultipartReplyAggregateBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.desc._case.MultipartReplyDescBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow._case.MultipartReplyFlowBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow._case.multipart.reply.flow.FlowStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.flow._case.multipart.reply.flow.FlowStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.MultipartReplyGroupBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.GroupStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.group.stats.BucketStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group._case.multipart.reply.group.group.stats.BucketStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc._case.MultipartReplyGroupDescBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc._case.multipart.reply.group.desc.GroupDesc;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.desc._case.multipart.reply.group.desc.GroupDescBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.group.features._case.MultipartReplyGroupFeaturesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.MultipartReplyMeterBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.MeterStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.meter.stats.MeterBandStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter._case.multipart.reply.meter.meter.stats.MeterBandStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.MultipartReplyMeterConfigBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.multipart.reply.meter.config.MeterConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.multipart.reply.meter.config.MeterConfigBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.multipart.reply.meter.config.meter.config.Bands;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.config._case.multipart.reply.meter.config.meter.config.BandsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.meter.features._case.MultipartReplyMeterFeaturesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.desc._case.MultipartReplyPortDescBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.desc._case.multipart.reply.port.desc.Ports;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.desc._case.multipart.reply.port.desc.PortsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.stats._case.MultipartReplyPortStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.stats._case.multipart.reply.port.stats.PortStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.port.stats._case.multipart.reply.port.stats.PortStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.queue._case.MultipartReplyQueueBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.queue._case.multipart.reply.queue.QueueStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.queue._case.multipart.reply.queue.QueueStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table._case.MultipartReplyTableBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table._case.multipart.reply.table.TableStats;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table._case.multipart.reply.table.TableStatsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.features._case.MultipartReplyTableFeaturesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.features._case.multipart.reply.table.features.TableFeatures;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.multipart.reply.table.features._case.multipart.reply.table.features.TableFeaturesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeaturePropertiesBuilder;
 
 /**
  * Translates MultipartReply messages
  * @author timotej.kubas
  * @author michal.polkorab
  */
-public class MultipartReplyMessageFactory implements OFDeserializer<MultipartReplyMessage> {
+public class MultipartReplyMessageFactory implements OFDeserializer<MultipartReplyMessage>,
+        DeserializerRegistryInjector {
 
     private static final byte PADDING_IN_MULTIPART_REPLY_HEADER = 4;
     private static final int DESC_STR_LEN = 256;
@@ -150,79 +171,63 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
     private static final byte PADDING_IN_METER_BAND_DSCP_HEADER = 3;
     private static final byte PADDING_IN_PORT_DESC_HEADER_01 = 4;
     private static final byte PADDING_IN_PORT_DESC_HEADER_02 = 2;
-    private static final byte MAX_PORT_NAME_LEN = 16;
     private static final int GROUP_TYPES = 4;
     private static final byte PADDING_IN_GROUP_DESC_HEADER = 1;
     private static final byte PADDING_IN_BUCKETS_HEADER = 4;
     private static final byte GROUP_DESC_HEADER_LENGTH = 8;
     private static final byte BUCKETS_HEADER_LENGTH = 16;
-
-    
-    private static MultipartReplyMessageFactory instance;
-
-    private MultipartReplyMessageFactory() {
-        // singleton
-    }
-    
-    /**
-     * @return singleton factory
-     */
-    public static synchronized MultipartReplyMessageFactory getInstance() {
-        if (instance == null){
-            instance = new MultipartReplyMessageFactory();
-        }
-        return instance;
-    }
+    private DeserializerRegistry registry;
 
     @Override
-    public MultipartReplyMessage bufferToMessage(ByteBuf rawMessage, short version) {
+    public MultipartReplyMessage deserialize(ByteBuf rawMessage) {
         MultipartReplyMessageBuilder builder = new MultipartReplyMessageBuilder();
-        builder.setVersion(version);
+        builder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
         builder.setXid(rawMessage.readUnsignedInt());
         int type = rawMessage.readUnsignedShort();
         builder.setType(MultipartType.forValue(type));
         builder.setFlags(new MultipartRequestFlags((rawMessage.readUnsignedShort() & 0x01) != 0));
         rawMessage.skipBytes(PADDING_IN_MULTIPART_REPLY_HEADER);
 
-        switch (type) {
-        case 0:  builder.setMultipartReplyBody(setDesc(rawMessage));
+        switch (MultipartType.forValue(type)) {
+        case OFPMPDESC:  builder.setMultipartReplyBody(setDesc(rawMessage));
+                 break;
+        case OFPMPFLOW:  builder.setMultipartReplyBody(setFlow(rawMessage));
+                 break;
+        case OFPMPAGGREGATE:  builder.setMultipartReplyBody(setAggregate(rawMessage));
                  break;
-        case 1:  builder.setMultipartReplyBody(setFlow(rawMessage));
+        case OFPMPTABLE:  builder.setMultipartReplyBody(setTable(rawMessage));
                  break;
-        case 2:  builder.setMultipartReplyBody(setAggregate(rawMessage));
+        case OFPMPPORTSTATS:  builder.setMultipartReplyBody(setPortStats(rawMessage));
                  break;
-        case 3:  builder.setMultipartReplyBody(setTable(rawMessage));
-                 break;         
-        case 4:  builder.setMultipartReplyBody(setPortStats(rawMessage));
+        case OFPMPQUEUE:  builder.setMultipartReplyBody(setQueue(rawMessage));
                  break;
-        case 5:  builder.setMultipartReplyBody(setQueue(rawMessage));
-                 break;         
-        case 6:  builder.setMultipartReplyBody(setGroup(rawMessage));
+        case OFPMPGROUP:  builder.setMultipartReplyBody(setGroup(rawMessage));
                  break;
-        case 7:  builder.setMultipartReplyBody(setGroupDesc(rawMessage));
+        case OFPMPGROUPDESC:  builder.setMultipartReplyBody(setGroupDesc(rawMessage));
                  break;
-        case 8:  builder.setMultipartReplyBody(setGroupFeatures(rawMessage));
+        case OFPMPGROUPFEATURES:  builder.setMultipartReplyBody(setGroupFeatures(rawMessage));
                  break;
-        case 9:  builder.setMultipartReplyBody(setMeter(rawMessage));
+        case OFPMPMETER:  builder.setMultipartReplyBody(setMeter(rawMessage));
                  break;
-        case 10: builder.setMultipartReplyBody(setMeterConfig(rawMessage));
+        case OFPMPMETERCONFIG: builder.setMultipartReplyBody(setMeterConfig(rawMessage));
                  break;
-        case 11: builder.setMultipartReplyBody(setMeterFeatures(rawMessage));
+        case OFPMPMETERFEATURES: builder.setMultipartReplyBody(setMeterFeatures(rawMessage));
                  break;
-        case 12: builder.setMultipartReplyBody(setTableFeatures(rawMessage));
+        case OFPMPTABLEFEATURES: builder.setMultipartReplyBody(setTableFeatures(rawMessage));
                  break;
-        case 13: builder.setMultipartReplyBody(setPortDesc(rawMessage));
+        case OFPMPPORTDESC: builder.setMultipartReplyBody(setPortDesc(rawMessage));
                  break;
-        case 0xFFFF: builder.setMultipartReplyBody(setExperimenter(rawMessage));
+        case OFPMPEXPERIMENTER: builder.setMultipartReplyBody(setExperimenter(rawMessage));
                  break;
-        default: 
+        default:
                  break;
         }
-        
+
         return builder.build();
     }
-    
-    private static MultipartReplyDesc setDesc(ByteBuf input) {
+
+    private static MultipartReplyDescCase setDesc(ByteBuf input) {
+        MultipartReplyDescCaseBuilder caseBuilder = new MultipartReplyDescCaseBuilder();
         MultipartReplyDescBuilder descBuilder = new MultipartReplyDescBuilder();
         byte[] mfrDescBytes = new byte[DESC_STR_LEN];
         input.readBytes(mfrDescBytes);
@@ -244,64 +249,77 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         input.readBytes(dpDescBytes);
         String dpDesc = new String(dpDescBytes);
         descBuilder.setDpDesc(dpDesc.trim());
-        return descBuilder.build();
+        caseBuilder.setMultipartReplyDesc(descBuilder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyFlow setFlow(ByteBuf input) {
+
+    private MultipartReplyFlowCase setFlow(ByteBuf input) {
+        MultipartReplyFlowCaseBuilder caseBuilder = new MultipartReplyFlowCaseBuilder();
         MultipartReplyFlowBuilder flowBuilder = new MultipartReplyFlowBuilder();
         List<FlowStats> flowStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             FlowStatsBuilder flowStatsBuilder = new FlowStatsBuilder();
-            input.skipBytes(EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
-            flowStatsBuilder.setTableId(input.readUnsignedByte());
-            input.skipBytes(PADDING_IN_FLOW_STATS_HEADER_01);
-            flowStatsBuilder.setDurationSec(input.readUnsignedInt());
-            flowStatsBuilder.setDurationNsec(input.readUnsignedInt());
-            flowStatsBuilder.setPriority(input.readUnsignedShort());
-            flowStatsBuilder.setIdleTimeout(input.readUnsignedShort());
-            flowStatsBuilder.setHardTimeout(input.readUnsignedShort());
-            flowStatsBuilder.setFlags(createFlowModFlagsFromBitmap(input.readShort()));
-            input.skipBytes(PADDING_IN_FLOW_STATS_HEADER_02);
-            byte[] cookie = new byte[Long.SIZE/Byte.SIZE];
-            input.readBytes(cookie);
-            flowStatsBuilder.setCookie(new BigInteger(cookie));
-            byte[] packetCount = new byte[Long.SIZE/Byte.SIZE];
-            input.readBytes(packetCount);
-            flowStatsBuilder.setPacketCount(new BigInteger(packetCount));
-            byte[] byteCount = new byte[Long.SIZE/Byte.SIZE];
-            input.readBytes(byteCount);
-            flowStatsBuilder.setByteCount(new BigInteger(byteCount));
-            flowStatsBuilder.setMatch(MatchDeserializer.createMatch(input));
-            flowStatsBuilder.setInstructions(InstructionsDeserializer.createInstructions(input, input.readableBytes()));
+            int flowRecordLength = input.readUnsignedShort();
+            ByteBuf subInput = input.readSlice(flowRecordLength - EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+            flowStatsBuilder.setTableId(subInput.readUnsignedByte());
+            subInput.skipBytes(PADDING_IN_FLOW_STATS_HEADER_01);
+            flowStatsBuilder.setDurationSec(subInput.readUnsignedInt());
+            flowStatsBuilder.setDurationNsec(subInput.readUnsignedInt());
+            flowStatsBuilder.setPriority(subInput.readUnsignedShort());
+            flowStatsBuilder.setIdleTimeout(subInput.readUnsignedShort());
+            flowStatsBuilder.setHardTimeout(subInput.readUnsignedShort());
+            flowStatsBuilder.setFlags(createFlowModFlagsFromBitmap(subInput.readUnsignedShort()));
+            subInput.skipBytes(PADDING_IN_FLOW_STATS_HEADER_02);
+            byte[] cookie = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+            subInput.readBytes(cookie);
+            flowStatsBuilder.setCookie(new BigInteger(1, cookie));
+            byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+            subInput.readBytes(packetCount);
+            flowStatsBuilder.setPacketCount(new BigInteger(1, packetCount));
+            byte[] byteCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+            subInput.readBytes(byteCount);
+            flowStatsBuilder.setByteCount(new BigInteger(1, byteCount));
+            OFDeserializer<Match> matchDeserializer = registry.getDeserializer(new MessageCodeKey(
+                    EncodeConstants.OF13_VERSION_ID, EncodeConstants.EMPTY_VALUE, Match.class));
+            flowStatsBuilder.setMatch(matchDeserializer.deserialize(subInput));
+            CodeKeyMaker keyMaker = CodeKeyMakerFactory
+                    .createInstructionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
+            List<Instruction> instructions = ListDeserializer.deserializeList(
+                    EncodeConstants.OF13_VERSION_ID, subInput.readableBytes(), subInput, keyMaker, registry);
+            flowStatsBuilder.setInstruction(instructions);
             flowStatsList.add(flowStatsBuilder.build());
         }
         flowBuilder.setFlowStats(flowStatsList);
-        return flowBuilder.build();
+        caseBuilder.setMultipartReplyFlow(flowBuilder.build());
+        return caseBuilder.build();
     }
-    
-    private static FlowModFlags createFlowModFlagsFromBitmap(short input){
-        final Boolean _oFPFFSENDFLOWREM = (input & (1 << 0)) != 0;
-        final Boolean _oFPFFCHECKOVERLAP = (input & (1 << 1)) != 0;
-        final Boolean _oFPFFRESETCOUNTS = (input & (1 << 2)) != 0; 
-        final Boolean _oFPFFNOPKTCOUNTS = (input & (1 << 3)) != 0;
-        final Boolean _oFPFFNOBYTCOUNTS = (input & (1 << 4)) != 0;
-        return new FlowModFlags(_oFPFFCHECKOVERLAP, _oFPFFNOBYTCOUNTS, _oFPFFNOPKTCOUNTS, _oFPFFRESETCOUNTS, _oFPFFSENDFLOWREM);
+
+    private static FlowModFlags createFlowModFlagsFromBitmap(int input){
+        final Boolean fmfSENDFLOWREM = (input & (1 << 0)) != 0;
+        final Boolean fmfCHECKOVERLAP = (input & (1 << 1)) != 0;
+        final Boolean fmfRESETCOUNTS = (input & (1 << 2)) != 0;
+        final Boolean fmfNOPKTCOUNTS = (input & (1 << 3)) != 0;
+        final Boolean fmfNOBYTCOUNTS = (input & (1 << 4)) != 0;
+        return new FlowModFlags(fmfCHECKOVERLAP, fmfNOBYTCOUNTS, fmfNOPKTCOUNTS, fmfRESETCOUNTS, fmfSENDFLOWREM);
     }
-    
-    private static MultipartReplyAggregate setAggregate(ByteBuf input) {
+
+    private static MultipartReplyAggregateCase setAggregate(ByteBuf input) {
+        MultipartReplyAggregateCaseBuilder caseBuilder = new MultipartReplyAggregateCaseBuilder();
         MultipartReplyAggregateBuilder builder = new MultipartReplyAggregateBuilder();
-        byte[] packetCount = new byte[Long.SIZE/Byte.SIZE];
+        byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(packetCount);
-        builder.setPacketCount(new BigInteger(packetCount));
-        byte[] byteCount = new byte[Long.SIZE/Byte.SIZE];
+        builder.setPacketCount(new BigInteger(1, packetCount));
+        byte[] byteCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
         input.readBytes(byteCount);
-        builder.setByteCount(new BigInteger(byteCount));
+        builder.setByteCount(new BigInteger(1, byteCount));
         builder.setFlowCount(input.readUnsignedInt());
         input.skipBytes(PADDING_IN_AGGREGATE_HEADER);
-        return builder.build();
+        caseBuilder.setMultipartReplyAggregate(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyTable setTable(ByteBuf input) {
+
+    private static MultipartReplyTableCase setTable(ByteBuf input) {
+        MultipartReplyTableCaseBuilder caseBuilder = new MultipartReplyTableCaseBuilder();
         MultipartReplyTableBuilder builder = new MultipartReplyTableBuilder();
         List<TableStats> tableStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -309,19 +327,21 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             tableStatsBuilder.setTableId(input.readUnsignedByte());
             input.skipBytes(PADDING_IN_TABLE_HEADER);
             tableStatsBuilder.setActiveCount(input.readUnsignedInt());
-            byte[] lookupCount = new byte[Long.SIZE/Byte.SIZE];
+            byte[] lookupCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(lookupCount);
-            tableStatsBuilder.setLookupCount(new BigInteger(lookupCount));
-            byte[] matchedCount = new byte[Long.SIZE/Byte.SIZE];
+            tableStatsBuilder.setLookupCount(new BigInteger(1, lookupCount));
+            byte[] matchedCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(matchedCount);
-            tableStatsBuilder.setMatchedCount(new BigInteger(matchedCount));
+            tableStatsBuilder.setMatchedCount(new BigInteger(1, matchedCount));
             tableStatsList.add(tableStatsBuilder.build());
         }
         builder.setTableStats(tableStatsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyTable(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyTableFeatures setTableFeatures(ByteBuf input) {
+
+    private MultipartReplyTableFeaturesCase setTableFeatures(ByteBuf input) {
+        MultipartReplyTableFeaturesCaseBuilder caseBuilder = new MultipartReplyTableFeaturesCaseBuilder();
         MultipartReplyTableFeaturesBuilder builder = new MultipartReplyTableFeaturesBuilder();
         List<TableFeatures> features = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -329,7 +349,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             int length = input.readUnsignedShort();
             featuresBuilder.setTableId(input.readUnsignedByte());
             input.skipBytes(PADDING_IN_MULTIPART_REPLY_TABLE_FEATURES);
-            featuresBuilder.setName(input.readBytes(MAX_TABLE_NAME_LENGTH).toString());
+            featuresBuilder.setName(ByteBufUtils.decodeNullTerminatedString(input, MAX_TABLE_NAME_LENGTH));
             byte[] metadataMatch = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(metadataMatch);
             featuresBuilder.setMetadataMatch(metadataMatch);
@@ -338,32 +358,38 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             featuresBuilder.setMetadataWrite(metadataWrite);
             featuresBuilder.setConfig(createTableConfig(input.readUnsignedInt()));
             featuresBuilder.setMaxEntries(input.readUnsignedInt());
-            featuresBuilder.setTableFeatureProperties(createTableFeaturesProperties(input, 
+            featuresBuilder.setTableFeatureProperties(createTableFeaturesProperties(input,
                     length - MULTIPART_REPLY_TABLE_FEATURES_STRUCTURE_LENGTH));
             features.add(featuresBuilder.build());
         }
         builder.setTableFeatures(features);
-        return builder.build();
+        caseBuilder.setMultipartReplyTableFeatures(builder.build());
+        return caseBuilder.build();
     }
-    
+
     private static TableConfig createTableConfig(long input) {
         boolean deprecated = (input & 3) != 0;
         return new TableConfig(deprecated);
     }
-    
-    private static List<TableFeatureProperties> createTableFeaturesProperties(ByteBuf input, int length) {
+
+    private List<TableFeatureProperties> createTableFeaturesProperties(ByteBuf input, int length) {
         List<TableFeatureProperties> properties = new ArrayList<>();
         int tableFeaturesLength = length;
         while (tableFeaturesLength > 0) {
+            int propStartIndex = input.readerIndex();
             TableFeaturePropertiesBuilder builder = new TableFeaturePropertiesBuilder();
             TableFeaturesPropType type = TableFeaturesPropType.forValue(input.readUnsignedShort());
             builder.setType(type);
             int propertyLength = input.readUnsignedShort();
+            int paddingRemainder = propertyLength % EncodeConstants.PADDING;
             tableFeaturesLength -= propertyLength;
             if (type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONS)
                     || type.equals(TableFeaturesPropType.OFPTFPTINSTRUCTIONSMISS)) {
                 InstructionRelatedTableFeaturePropertyBuilder insBuilder = new InstructionRelatedTableFeaturePropertyBuilder();
-                insBuilder.setInstructions(InstructionsDeserializer.createInstructions(input, propertyLength - COMMON_PROPERTY_LENGTH));
+                CodeKeyMaker keyMaker = CodeKeyMakerFactory.createInstructionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
+                List<Instruction> instructions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
+                        propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
+                insBuilder.setInstruction(instructions);
                 builder.addAugmentation(InstructionRelatedTableFeatureProperty.class, insBuilder.build());
             } else if (type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLES)
                     || type.equals(TableFeaturesPropType.OFPTFPTNEXTTABLESMISS)) {
@@ -374,6 +400,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                     NextTableIdsBuilder nextTableIdsBuilder = new NextTableIdsBuilder();
                     nextTableIdsBuilder.setTableId(input.readUnsignedByte());
                     ids.add(nextTableIdsBuilder.build());
+                    propertyLength--;
                 }
                 tableBuilder.setNextTableIds(ids);
                 builder.addAugmentation(NextTableRelatedTableFeatureProperty.class, tableBuilder.build());
@@ -382,7 +409,10 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                     || type.equals(TableFeaturesPropType.OFPTFPTAPPLYACTIONS)
                     || type.equals(TableFeaturesPropType.OFPTFPTAPPLYACTIONSMISS)) {
                 ActionRelatedTableFeaturePropertyBuilder actionBuilder = new ActionRelatedTableFeaturePropertyBuilder();
-                actionBuilder.setActionsList(ActionsDeserializer.createActionsList(input, propertyLength - COMMON_PROPERTY_LENGTH));
+                CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
+                List<Action> actions = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
+                        propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
+                actionBuilder.setAction(actions);
                 builder.addAugmentation(ActionRelatedTableFeatureProperty.class, actionBuilder.build());
             } else if (type.equals(TableFeaturesPropType.OFPTFPTMATCH)
                     || type.equals(TableFeaturesPropType.OFPTFPTWILDCARDS)
@@ -391,100 +421,113 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                     || type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELD)
                     || type.equals(TableFeaturesPropType.OFPTFPTAPPLYSETFIELDMISS)) {
                 OxmRelatedTableFeaturePropertyBuilder oxmBuilder = new OxmRelatedTableFeaturePropertyBuilder();
-                oxmBuilder.setMatchEntries(MatchDeserializer.createMatchEntries(input, propertyLength - COMMON_PROPERTY_LENGTH));
+                CodeKeyMaker keyMaker = CodeKeyMakerFactory
+                        .createMatchEntriesKeyMaker(EncodeConstants.OF13_VERSION_ID);
+                List<MatchEntry> entries = ListDeserializer.deserializeHeaders(EncodeConstants.OF13_VERSION_ID,
+                        propertyLength - COMMON_PROPERTY_LENGTH, input, keyMaker, registry);
+                oxmBuilder.setMatchEntry(entries);
                 builder.addAugmentation(OxmRelatedTableFeatureProperty.class, oxmBuilder.build());
             } else if (type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTER)
                     || type.equals(TableFeaturesPropType.OFPTFPTEXPERIMENTERMISS)) {
-                final byte EXPERIMENTER_PROPERTY_LENGTH = 12;
-                ExperimenterRelatedTableFeaturePropertyBuilder expBuilder = new ExperimenterRelatedTableFeaturePropertyBuilder();
-                expBuilder.setExperimenter(input.readUnsignedInt());
-                expBuilder.setExpType(input.readUnsignedInt());
-                byte[] data = new byte[propertyLength - EXPERIMENTER_PROPERTY_LENGTH];
-                input.readBytes(data);
-                expBuilder.setData(data);
-                builder.addAugmentation(ExperimenterRelatedTableFeatureProperty.class, expBuilder.build());
+                long expId = input.readUnsignedInt();
+                input.readerIndex(propStartIndex);
+                OFDeserializer<TableFeatureProperties> propDeserializer = registry.getDeserializer(
+                        ExperimenterDeserializerKeyFactory.createMultipartReplyTFDeserializerKey(
+                                EncodeConstants.OF13_VERSION_ID, expId));
+                TableFeatureProperties expProp = propDeserializer.deserialize(input);
+                properties.add(expProp);
+                continue;
+            }
+            if (paddingRemainder != 0) {
+                input.skipBytes(EncodeConstants.PADDING - paddingRemainder);
+                tableFeaturesLength -= EncodeConstants.PADDING - paddingRemainder;
             }
             properties.add(builder.build());
         }
         return properties;
     }
-    
-    private static MultipartReplyPortStats setPortStats(ByteBuf input) {
+
+    private static MultipartReplyPortStatsCase setPortStats(ByteBuf input) {
+        MultipartReplyPortStatsCaseBuilder caseBuilder = new MultipartReplyPortStatsCaseBuilder();
         MultipartReplyPortStatsBuilder builder = new MultipartReplyPortStatsBuilder();
         List<PortStats> portStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             PortStatsBuilder portStatsBuilder = new PortStatsBuilder();
             portStatsBuilder.setPortNo(input.readUnsignedInt());
             input.skipBytes(PADDING_IN_PORT_STATS_HEADER);
-            byte[] rxPackets = new byte[Long.SIZE/Byte.SIZE];
+            byte[] rxPackets = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxPackets);
-            portStatsBuilder.setRxPackets(new BigInteger(rxPackets));
-            byte[] txPackets = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxPackets(new BigInteger(1, rxPackets));
+            byte[] txPackets = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txPackets);
-            portStatsBuilder.setTxPackets(new BigInteger(txPackets));
-            byte[] rxBytes = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setTxPackets(new BigInteger(1, txPackets));
+            byte[] rxBytes = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxBytes);
-            portStatsBuilder.setRxBytes(new BigInteger(rxBytes));
-            byte[] txBytes = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxBytes(new BigInteger(1, rxBytes));
+            byte[] txBytes = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txBytes);
-            portStatsBuilder.setTxBytes(new BigInteger(txBytes));
-            byte[] rxDropped = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setTxBytes(new BigInteger(1, txBytes));
+            byte[] rxDropped = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxDropped);
-            portStatsBuilder.setRxDropped(new BigInteger(rxDropped));
-            byte[] txDropped = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxDropped(new BigInteger(1, rxDropped));
+            byte[] txDropped = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txDropped);
-            portStatsBuilder.setTxDropped(new BigInteger(txDropped));
-            byte[] rxErrors = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setTxDropped(new BigInteger(1, txDropped));
+            byte[] rxErrors = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxErrors);
-            portStatsBuilder.setRxErrors(new BigInteger(rxErrors));
-            byte[] txErrors = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxErrors(new BigInteger(1, rxErrors));
+            byte[] txErrors = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txErrors);
-            portStatsBuilder.setTxErrors(new BigInteger(txErrors));
-            byte[] rxFrameErr = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setTxErrors(new BigInteger(1, txErrors));
+            byte[] rxFrameErr = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxFrameErr);
-            portStatsBuilder.setRxFrameErr(new BigInteger(rxFrameErr));
-            byte[] rxOverErr = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxFrameErr(new BigInteger(1, rxFrameErr));
+            byte[] rxOverErr = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxOverErr);
-            portStatsBuilder.setRxOverErr(new BigInteger(rxOverErr));
-            byte[] rxCrcErr = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxOverErr(new BigInteger(1, rxOverErr));
+            byte[] rxCrcErr = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(rxCrcErr);
-            portStatsBuilder.setRxCrcErr(new BigInteger(rxCrcErr));
-            byte[] collisions = new byte[Long.SIZE/Byte.SIZE];
+            portStatsBuilder.setRxCrcErr(new BigInteger(1, rxCrcErr));
+            byte[] collisions = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(collisions);
-            portStatsBuilder.setCollisions(new BigInteger(collisions));
+            portStatsBuilder.setCollisions(new BigInteger(1, collisions));
             portStatsBuilder.setDurationSec(input.readUnsignedInt());
             portStatsBuilder.setDurationNsec(input.readUnsignedInt());
             portStatsList.add(portStatsBuilder.build());
         }
         builder.setPortStats(portStatsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyPortStats(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyQueue setQueue(ByteBuf input) {
+
+    private static MultipartReplyQueueCase setQueue(ByteBuf input) {
+       MultipartReplyQueueCaseBuilder caseBuilder = new MultipartReplyQueueCaseBuilder();
         MultipartReplyQueueBuilder builder = new MultipartReplyQueueBuilder();
         List<QueueStats> queueStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
             QueueStatsBuilder queueStatsBuilder = new QueueStatsBuilder();
             queueStatsBuilder.setPortNo(input.readUnsignedInt());
             queueStatsBuilder.setQueueId(input.readUnsignedInt());
-            byte[] txBytes = new byte[Long.SIZE/Byte.SIZE];
+            byte[] txBytes = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txBytes);
-            queueStatsBuilder.setTxBytes(new BigInteger(txBytes));
-            byte[] txPackets = new byte[Long.SIZE/Byte.SIZE];
+            queueStatsBuilder.setTxBytes(new BigInteger(1, txBytes));
+            byte[] txPackets = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txPackets);
-            queueStatsBuilder.setTxPackets(new BigInteger(txPackets));
-            byte[] txErrors = new byte[Long.SIZE/Byte.SIZE];
+            queueStatsBuilder.setTxPackets(new BigInteger(1, txPackets));
+            byte[] txErrors = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(txErrors);
-            queueStatsBuilder.setTxErrors(new BigInteger(txErrors));
+            queueStatsBuilder.setTxErrors(new BigInteger(1, txErrors));
             queueStatsBuilder.setDurationSec(input.readUnsignedInt());
             queueStatsBuilder.setDurationNsec(input.readUnsignedInt());
             queueStatsList.add(queueStatsBuilder.build());
         }
         builder.setQueueStats(queueStatsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyQueue(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyGroup setGroup(ByteBuf input) {
+
+    private static MultipartReplyGroupCase setGroup(ByteBuf input) {
+        MultipartReplyGroupCaseBuilder caseBuilder = new MultipartReplyGroupCaseBuilder();
         MultipartReplyGroupBuilder builder = new MultipartReplyGroupBuilder();
         List<GroupStats> groupStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -494,35 +537,37 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             groupStatsBuilder.setGroupId(new GroupId(input.readUnsignedInt()));
             groupStatsBuilder.setRefCount(input.readUnsignedInt());
             input.skipBytes(PADDING_IN_GROUP_HEADER_02);
-            byte[] packetCount = new byte[Long.SIZE/Byte.SIZE];
+            byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(packetCount);
-            groupStatsBuilder.setPacketCount(new BigInteger(packetCount));
-            byte[] byteCount = new byte[Long.SIZE/Byte.SIZE];
+            groupStatsBuilder.setPacketCount(new BigInteger(1, packetCount));
+            byte[] byteCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(byteCount);
-            groupStatsBuilder.setByteCount(new BigInteger(byteCount));
+            groupStatsBuilder.setByteCount(new BigInteger(1, byteCount));
             groupStatsBuilder.setDurationSec(input.readUnsignedInt());
             groupStatsBuilder.setDurationNsec(input.readUnsignedInt());
             int actualLength = GROUP_BODY_LENGTH;
             List<BucketStats> bucketStatsList = new ArrayList<>();
             while (actualLength < bodyLength) {
                 BucketStatsBuilder bucketStatsBuilder = new BucketStatsBuilder();
-                byte[] packetCountBucket = new byte[Long.SIZE/Byte.SIZE];
+                byte[] packetCountBucket = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
                 input.readBytes(packetCountBucket);
-                bucketStatsBuilder.setPacketCount(new BigInteger(packetCountBucket));
-                byte[] byteCountBucket = new byte[Long.SIZE/Byte.SIZE];
+                bucketStatsBuilder.setPacketCount(new BigInteger(1, packetCountBucket));
+                byte[] byteCountBucket = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
                 input.readBytes(byteCountBucket);
-                bucketStatsBuilder.setByteCount(new BigInteger(byteCountBucket));
+                bucketStatsBuilder.setByteCount(new BigInteger(1, byteCountBucket));
                 bucketStatsList.add(bucketStatsBuilder.build());
                 actualLength += BUCKET_COUNTER_LENGTH;
-            } 
+            }
             groupStatsBuilder.setBucketStats(bucketStatsList);
             groupStatsList.add(groupStatsBuilder.build());
         }
         builder.setGroupStats(groupStatsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyGroup(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyMeterFeatures setMeterFeatures(ByteBuf input) {
+
+    private static MultipartReplyMeterFeaturesCase setMeterFeatures(ByteBuf input) {
+        MultipartReplyMeterFeaturesCaseBuilder caseBuilder = new MultipartReplyMeterFeaturesCaseBuilder();
         MultipartReplyMeterFeaturesBuilder builder = new MultipartReplyMeterFeaturesBuilder();
         builder.setMaxMeter(input.readUnsignedInt());
         builder.setBandTypes(createMeterBandsBitmap(input.readUnsignedInt()));
@@ -530,24 +575,26 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
         builder.setMaxBands(input.readUnsignedByte());
         builder.setMaxColor(input.readUnsignedByte());
         input.skipBytes(PADDING_IN_METER_FEATURES_HEADER);
-        return builder.build();
+        caseBuilder.setMultipartReplyMeterFeatures(builder.build());
+        return caseBuilder.build();
     }
-    
+
     private static MeterFlags createMeterFlags(long input){
-        final Boolean _oFPMFKBPS = (input & (1 << 0)) != 0;
-        final Boolean _oFPMFPKTPS = (input & (1 << 1)) != 0;
-        final Boolean _oFPMFBURST = (input & (1 << 2)) != 0;
-        final Boolean _oFPMFSTATS = (input & (1 << 3)) != 0;
-        return new MeterFlags(_oFPMFBURST, _oFPMFKBPS, _oFPMFPKTPS, _oFPMFSTATS);
+        final Boolean mfKBPS = (input & (1 << 0)) != 0;
+        final Boolean mfPKTPS = (input & (1 << 1)) != 0;
+        final Boolean mfBURST = (input & (1 << 2)) != 0;
+        final Boolean mfSTATS = (input & (1 << 3)) != 0;
+        return new MeterFlags(mfBURST, mfKBPS, mfPKTPS, mfSTATS);
     }
-    
+
     private static MeterBandTypeBitmap createMeterBandsBitmap(long input) {
-        final Boolean _oFPMBTDROP = (input & (1 << 0)) != 0;
-        final Boolean _oFPMBTDSCPREMARK = (input & (1 << 1)) != 0;
-        return new MeterBandTypeBitmap(_oFPMBTDROP, _oFPMBTDSCPREMARK);
+        final Boolean mbtDROP = (input & (1 << 1)) != 0;
+        final Boolean mbtDSCPREMARK = (input & (1 << 2)) != 0;
+        return new MeterBandTypeBitmap(mbtDROP, mbtDSCPREMARK);
     }
-    
-    private static MultipartReplyMeter setMeter(ByteBuf input) {
+
+    private static MultipartReplyMeterCase setMeter(ByteBuf input) {
+        MultipartReplyMeterCaseBuilder caseBuilder = new MultipartReplyMeterCaseBuilder();
         MultipartReplyMeterBuilder builder = new MultipartReplyMeterBuilder();
         List<MeterStats> meterStatsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -556,24 +603,24 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             int meterStatsBodyLength = input.readUnsignedShort();
             input.skipBytes(PADDING_IN_METER_STATS_HEADER);
             meterStatsBuilder.setFlowCount(input.readUnsignedInt());
-            byte[] packetInCount = new byte[Long.SIZE/Byte.SIZE];
+            byte[] packetInCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(packetInCount);
-            meterStatsBuilder.setPacketInCount(new BigInteger(packetInCount));
-            byte[] byteInCount = new byte[Long.SIZE/Byte.SIZE];
+            meterStatsBuilder.setPacketInCount(new BigInteger(1, packetInCount));
+            byte[] byteInCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
             input.readBytes(byteInCount);
-            meterStatsBuilder.setByteInCount(new BigInteger(byteInCount));
+            meterStatsBuilder.setByteInCount(new BigInteger(1, byteInCount));
             meterStatsBuilder.setDurationSec(input.readUnsignedInt());
             meterStatsBuilder.setDurationNsec(input.readUnsignedInt());
             int actualLength = METER_BODY_LENGTH;
             List<MeterBandStats> meterBandStatsList = new ArrayList<>();
             while (actualLength < meterStatsBodyLength) {
                 MeterBandStatsBuilder meterBandStatsBuilder = new MeterBandStatsBuilder();
-                byte[] packetBandCount = new byte[Long.SIZE/Byte.SIZE];
+                byte[] packetBandCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
                 input.readBytes(packetBandCount);
-                meterBandStatsBuilder.setPacketBandCount(new BigInteger(packetBandCount));
-                byte[] byteBandCount = new byte[Long.SIZE/Byte.SIZE];
+                meterBandStatsBuilder.setPacketBandCount(new BigInteger(1, packetBandCount));
+                byte[] byteBandCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
                 input.readBytes(byteBandCount);
-                meterBandStatsBuilder.setByteBandCount(new BigInteger(byteBandCount));
+                meterBandStatsBuilder.setByteBandCount(new BigInteger(1, byteBandCount));
                 meterBandStatsList.add(meterBandStatsBuilder.build());
                 actualLength += METER_BAND_STATS_LENGTH;
             }
@@ -581,10 +628,12 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             meterStatsList.add(meterStatsBuilder.build());
         }
         builder.setMeterStats(meterStatsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyMeter(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyMeterConfig setMeterConfig(ByteBuf input) {
+
+    private MultipartReplyMeterConfigCase setMeterConfig(ByteBuf input) {
+        MultipartReplyMeterConfigCaseBuilder caseBuilder = new MultipartReplyMeterConfigCaseBuilder();
         MultipartReplyMeterConfigBuilder builder = new MultipartReplyMeterConfigBuilder();
         List<MeterConfig> meterConfigList = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -595,19 +644,23 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             int actualLength = METER_CONFIG_LENGTH;
             List<Bands> bandsList = new ArrayList<>();
             while (actualLength < meterConfigBodyLength) {
+                int bandStartIndex = input.readerIndex();
                 BandsBuilder bandsBuilder = new BandsBuilder();
                 int bandType = input.readUnsignedShort();
                 switch (bandType) {
                     case 1:
+                       MeterBandDropCaseBuilder bandDropCaseBuilder = new MeterBandDropCaseBuilder();
                         MeterBandDropBuilder bandDropBuilder = new MeterBandDropBuilder();
                         bandDropBuilder.setType(MeterBandType.forValue(bandType));
                         actualLength += input.readUnsignedShort();
                         bandDropBuilder.setRate(input.readUnsignedInt());
                         bandDropBuilder.setBurstSize(input.readUnsignedInt());
                         input.skipBytes(PADDING_IN_METER_BAND_DROP_HEADER);
-                        bandsBuilder.setMeterBand(bandDropBuilder.build());
+                        bandDropCaseBuilder.setMeterBandDrop(bandDropBuilder.build());
+                        bandsBuilder.setMeterBand(bandDropCaseBuilder.build());
                         break;
                     case 2:
+                       MeterBandDscpRemarkCaseBuilder bandDscpRemarkCaseBuilder = new MeterBandDscpRemarkCaseBuilder();
                         MeterBandDscpRemarkBuilder bandDscpRemarkBuilder = new MeterBandDscpRemarkBuilder();
                         bandDscpRemarkBuilder.setType(MeterBandType.forValue(bandType));
                         actualLength += input.readUnsignedShort();
@@ -615,16 +668,17 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                         bandDscpRemarkBuilder.setBurstSize(input.readUnsignedInt());
                         bandDscpRemarkBuilder.setPrecLevel(input.readUnsignedByte());
                         input.skipBytes(PADDING_IN_METER_BAND_DSCP_HEADER);
-                        bandsBuilder.setMeterBand(bandDscpRemarkBuilder.build());
+                        bandDscpRemarkCaseBuilder.setMeterBandDscpRemark(bandDscpRemarkBuilder.build());
+                        bandsBuilder.setMeterBand(bandDscpRemarkCaseBuilder.build());
                         break;
                     case 0xFFFF:
-                        MeterBandExperimenterBuilder bandExperimenterBuilder = new MeterBandExperimenterBuilder();
-                        bandExperimenterBuilder.setType(MeterBandType.forValue(bandType));
                         actualLength += input.readUnsignedShort();
-                        bandExperimenterBuilder.setRate(input.readUnsignedInt());
-                        bandExperimenterBuilder.setBurstSize(input.readUnsignedInt());
-                        bandExperimenterBuilder.setExperimenter(input.readUnsignedInt());
-                        bandsBuilder.setMeterBand(bandExperimenterBuilder.build());
+                        long expId = input.getUnsignedInt(input.readerIndex() + 2 * EncodeConstants.SIZE_OF_INT_IN_BYTES);
+                        input.readerIndex(bandStartIndex);
+                        OFDeserializer<MeterBandExperimenterCase> deserializer = registry.getDeserializer(
+                                ExperimenterDeserializerKeyFactory.createMeterBandDeserializerKey(
+                                        EncodeConstants.OF13_VERSION_ID, expId));
+                        bandsBuilder.setMeterBand(deserializer.deserialize(input));
                         break;
                     default:
                         break;
@@ -635,20 +689,17 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             meterConfigList.add(meterConfigBuilder.build());
         }
         builder.setMeterConfig(meterConfigList);
-        return builder.build();
+        caseBuilder.setMultipartReplyMeterConfig(builder.build());
+        return caseBuilder.build();
     }
-    
-    private static MultipartReplyExperimenter setExperimenter(ByteBuf input) {
-        MultipartReplyExperimenterBuilder builder = new MultipartReplyExperimenterBuilder();
-        builder.setExperimenter(input.readUnsignedInt());
-        builder.setExpType(input.readUnsignedInt());
-        byte[] data = new byte[input.readableBytes()];
-        input.readBytes(data);
-        builder.setData(data);
-        return builder.build();
+
+    private MultipartReplyExperimenterCase setExperimenter(ByteBuf input) {
+        return registry.getDeserializer(ExperimenterDeserializerKeyFactory.createMultipartReplyMessageDeserializerKey(
+                EncodeConstants.OF13_VERSION_ID, input.readUnsignedInt()));
     }
-    
-    private static MultipartReplyPortDesc setPortDesc(ByteBuf input) {
+
+    private static MultipartReplyPortDescCase setPortDesc(ByteBuf input) {
+        MultipartReplyPortDescCaseBuilder caseBuilder = new MultipartReplyPortDescCaseBuilder();
         MultipartReplyPortDescBuilder builder = new MultipartReplyPortDescBuilder();
         List<Ports> portsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -659,10 +710,7 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             input.readBytes(hwAddress);
             portsBuilder.setHwAddr(new MacAddress(ByteBufUtils.macAddressToString(hwAddress)));
             input.skipBytes(PADDING_IN_PORT_DESC_HEADER_02);
-            byte[] portNameBytes = new byte[MAX_PORT_NAME_LEN];
-            input.readBytes(portNameBytes);
-            String portName = new String(portNameBytes);
-            portsBuilder.setName(portName.trim());
+            portsBuilder.setName(ByteBufUtils.decodeNullTerminatedString(input, EncodeConstants.MAX_PORT_NAME_LENGTH));
             portsBuilder.setConfig(createPortConfig(input.readUnsignedInt()));
             portsBuilder.setState(createPortState(input.readUnsignedInt()));
             portsBuilder.setCurrentFeatures(createPortFeatures(input.readUnsignedInt()));
@@ -674,46 +722,48 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             portsList.add(portsBuilder.build());
         }
         builder.setPorts(portsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyPortDesc(builder.build());
+        return caseBuilder.build();
     }
-    
+
     private static PortConfig createPortConfig(long input){
-        final Boolean _portDown   = ((input) & (1<<0)) != 0;
-        final Boolean _noRecv    = ((input) & (1<<2)) != 0;
-        final Boolean _noFwd       = ((input) & (1<<5)) != 0;
-        final Boolean _noPacketIn = ((input) & (1<<6)) != 0;
-        return new PortConfig(_noFwd, _noPacketIn, _noRecv, _portDown);
+        final Boolean pcPortDown   = ((input) & (1<<0)) != 0;
+        final Boolean pcNRecv    = ((input) & (1<<2)) != 0;
+        final Boolean pcNFwd       = ((input) & (1<<5)) != 0;
+        final Boolean pcNPacketIn = ((input) & (1<<6)) != 0;
+        return new PortConfig(pcNFwd, pcNPacketIn, pcNRecv, pcPortDown);
     }
-    
+
     private static PortState createPortState(long input){
-        final Boolean _linkDown = ((input) & (1<<0)) != 0;
-        final Boolean _blocked  = ((input) & (1<<1)) != 0;
-        final Boolean _live     = ((input) & (1<<2)) != 0;
-        return new PortState(_blocked, _linkDown, _live);
+        final Boolean psLinkDown = ((input) & (1<<0)) != 0;
+        final Boolean psBlocked  = ((input) & (1<<1)) != 0;
+        final Boolean psLive     = ((input) & (1<<2)) != 0;
+        return new PortState(psBlocked, psLinkDown, psLive);
     }
-    
+
     private static PortFeatures createPortFeatures(long input){
-        final Boolean _10mbHd = ((input) & (1<<0)) != 0;
-        final Boolean _10mbFd = ((input) & (1<<1)) != 0;
-        final Boolean _100mbHd = ((input) & (1<<2)) != 0;
-        final Boolean _100mbFd = ((input) & (1<<3)) != 0;
-        final Boolean _1gbHd = ((input) & (1<<4)) != 0;
-        final Boolean _1gbFd = ((input) & (1<<5)) != 0;
-        final Boolean _10gbFd = ((input) & (1<<6)) != 0;
-        final Boolean _40gbFd = ((input) & (1<<7)) != 0;
-        final Boolean _100gbFd = ((input) & (1<<8)) != 0;
-        final Boolean _1tbFd = ((input) & (1<<9)) != 0;
-        final Boolean _other = ((input) & (1<<10)) != 0;
-        final Boolean _copper = ((input) & (1<<11)) != 0;
-        final Boolean _fiber = ((input) & (1<<12)) != 0;
-        final Boolean _autoneg = ((input) & (1<<13)) != 0;
-        final Boolean _pause = ((input) & (1<<14)) != 0;
-        final Boolean _pauseAsym = ((input) & (1<<15)) != 0;
-        return new PortFeatures(_10mbHd, _10mbFd, _100mbHd, _100mbFd, _1gbHd, _1gbFd, _10gbFd,
-                _40gbFd, _100gbFd, _1tbFd, _other, _copper, _fiber, _autoneg, _pause, _pauseAsym);
+        final Boolean pf10mbHd = ((input) & (1<<0)) != 0;
+        final Boolean pf10mbFd = ((input) & (1<<1)) != 0;
+        final Boolean pf100mbHd = ((input) & (1<<2)) != 0;
+        final Boolean pf100mbFd = ((input) & (1<<3)) != 0;
+        final Boolean pf1gbHd = ((input) & (1<<4)) != 0;
+        final Boolean pf1gbFd = ((input) & (1<<5)) != 0;
+        final Boolean pf10gbFd = ((input) & (1<<6)) != 0;
+        final Boolean pf40gbFd = ((input) & (1<<7)) != 0;
+        final Boolean pf100gbFd = ((input) & (1<<8)) != 0;
+        final Boolean pf1tbFd = ((input) & (1<<9)) != 0;
+        final Boolean pfOther = ((input) & (1<<10)) != 0;
+        final Boolean pfCopper = ((input) & (1<<11)) != 0;
+        final Boolean pfFiber = ((input) & (1<<12)) != 0;
+        final Boolean pfAutoneg = ((input) & (1<<13)) != 0;
+        final Boolean pfPause = ((input) & (1<<14)) != 0;
+        final Boolean pfPauseAsym = ((input) & (1<<15)) != 0;
+        return new PortFeatures(pf100gbFd, pf100mbFd, pf100mbHd, pf10gbFd, pf10mbFd, pf10mbHd, pf1gbFd,
+                pf1gbHd, pf1tbFd, pf40gbFd, pfAutoneg, pfCopper, pfFiber, pfOther, pfPause, pfPauseAsym);
     }
-    
-    private static MultipartReplyBody setGroupFeatures(ByteBuf rawMessage) {
+
+    private static MultipartReplyGroupFeaturesCase setGroupFeatures(ByteBuf rawMessage) {
+        MultipartReplyGroupFeaturesCaseBuilder caseBuilder = new MultipartReplyGroupFeaturesCaseBuilder();
         MultipartReplyGroupFeaturesBuilder featuresBuilder = new MultipartReplyGroupFeaturesBuilder();
         featuresBuilder.setTypes(createGroupType(rawMessage.readUnsignedInt()));
         featuresBuilder.setCapabilities(createCapabilities(rawMessage.readUnsignedInt()));
@@ -727,50 +777,52 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             actionBitmaps.add(createActionBitmap(rawMessage.readUnsignedInt()));
         }
         featuresBuilder.setActionsBitmap(actionBitmaps);
-        return featuresBuilder.build();
+        caseBuilder.setMultipartReplyGroupFeatures(featuresBuilder.build());
+        return caseBuilder.build();
     }
-    
+
     private static ActionType createActionBitmap(long input) {
-        final Boolean OFPAT_OUTPUT = ((input) & (1<<0)) != 0;
-        final Boolean OFPAT_COPY_TTL_OUT = ((input) & (1<<1)) != 0;
-        final Boolean OFPAT_COPY_TTL_IN = ((input) & (1<<2)) != 0;
-        final Boolean OFPAT_SET_MPLS_TTL = ((input) & (1<<3)) != 0;
-        final Boolean OFPAT_DEC_MPLS_TTL = ((input) & (1<<4)) != 0;
-        final Boolean OFPAT_PUSH_VLAN = ((input) & (1<<5)) != 0;
-        final Boolean OFPAT_POP_VLAN = ((input) & (1<<6)) != 0;
-        final Boolean OFPAT_PUSH_MPLS = ((input) & (1<<7)) != 0;
-        final Boolean OFPAT_POP_MPLS = ((input) & (1<<8)) != 0;
-        final Boolean OFPAT_SET_QUEUE = ((input) & (1<<9)) != 0;
-        final Boolean OFPAT_GROUP = ((input) & (1<<10)) != 0;
-        final Boolean OFPAT_SET_NW_TTL = ((input) & (1<<11)) != 0;
-        final Boolean OFPAT_DEC_NW_TTL = ((input) & (1<<12)) != 0;
-        final Boolean OFPAT_SET_FIELD = ((input) & (1<<13)) != 0;
-        final Boolean OFPAT_PUSH_PBB = ((input) & (1<<14)) != 0;
-        final Boolean OFPAT_POP_PBB = ((input) & (1<<15)) != 0;
-        final Boolean OFPAT_EXPERIMENTER = ((input) & (1<<16)) != 0;
-        return new ActionType(OFPAT_COPY_TTL_IN, OFPAT_COPY_TTL_OUT, OFPAT_DEC_MPLS_TTL,
-                OFPAT_DEC_NW_TTL, OFPAT_EXPERIMENTER, OFPAT_GROUP, OFPAT_OUTPUT, OFPAT_POP_MPLS,
-                OFPAT_POP_PBB, OFPAT_POP_VLAN, OFPAT_PUSH_MPLS, OFPAT_PUSH_PBB, OFPAT_PUSH_VLAN,
-                OFPAT_SET_FIELD, OFPAT_SET_MPLS_TTL, OFPAT_SET_NW_TTL, OFPAT_SET_QUEUE);
+        final Boolean atOutput = ((input) & (1<<0)) != 0;
+        final Boolean atCopyTTLout = ((input) & (1<<11)) != 0;
+        final Boolean atCopyTTLin = ((input) & (1<<12)) != 0;
+        final Boolean atSetMplsTTL = ((input) & (1<<15)) != 0;
+        final Boolean atDecMplsTTL = ((input) & (1<<16)) != 0;
+        final Boolean atPushVLAN = ((input) & (1<<17)) != 0;
+        final Boolean atPopVLAN = ((input) & (1<<18)) != 0;
+        final Boolean atPushMPLS = ((input) & (1<<19)) != 0;
+        final Boolean atPopMPLS = ((input) & (1<<20)) != 0;
+        final Boolean atSetQueue = ((input) & (1<<21)) != 0;
+        final Boolean atGroup = ((input) & (1<<22)) != 0;
+        final Boolean atSetNWTTL = ((input) & (1<<23)) != 0;
+        final Boolean atDecNWTTL = ((input) & (1<<24)) != 0;
+        final Boolean atSetField = ((input) & (1<<25)) != 0;
+        final Boolean atPushPBB = ((input) & (1<<26)) != 0;
+        final Boolean atPopPBB = ((input) & (1<<27)) != 0;
+        final Boolean atExperimenter = false;
+        return new ActionType(atCopyTTLin, atCopyTTLout, atDecMplsTTL,
+                atDecNWTTL, atExperimenter, atGroup, atOutput, atPopMPLS,
+                atPopPBB, atPopVLAN, atPushMPLS, atPushPBB, atPushVLAN,
+                atSetField, atSetMplsTTL, atSetNWTTL, atSetQueue);
     }
 
     private static GroupCapabilities createCapabilities(long input) {
-        final Boolean OFOFPGFC_SELECT_WEIGHT = ((input) & (1<<0)) != 0;
-        final Boolean OFPGFC_SELECT_LIVENESS = ((input) & (1<<1)) != 0;
-        final Boolean OFPGFC_CHAINING = ((input) & (1<<2)) != 0;
-        final Boolean OFPGFC_CHAINING_CHECKS = ((input) & (1<<3)) != 0;
-        return new GroupCapabilities(OFPGFC_CHAINING, OFPGFC_CHAINING_CHECKS, OFPGFC_SELECT_LIVENESS, OFOFPGFC_SELECT_WEIGHT);
+        final Boolean gcSelectWeight = ((input) & (1<<0)) != 0;
+        final Boolean gcSelectLiveness = ((input) & (1<<1)) != 0;
+        final Boolean gcChaining = ((input) & (1<<2)) != 0;
+        final Boolean gcChainingChecks = ((input) & (1<<3)) != 0;
+        return new GroupCapabilities(gcChaining, gcChainingChecks, gcSelectLiveness, gcSelectWeight);
     }
 
     private static GroupTypes createGroupType(long input) {
-        final Boolean OFPGT_ALL = ((input) & (1<<0)) != 0;
-        final Boolean OFPGT_SELECT = ((input) & (1<<1)) != 0;
-        final Boolean OFPGT_INDIRECT = ((input) & (1<<2)) != 0;
-        final Boolean OFPGT_FF = ((input) & (1<<3)) != 0;
-        return new GroupTypes(OFPGT_ALL, OFPGT_FF, OFPGT_INDIRECT, OFPGT_SELECT);
+        final Boolean gtAll = ((input) & (1<<0)) != 0;
+        final Boolean gtSelect = ((input) & (1<<1)) != 0;
+        final Boolean gtIndirect = ((input) & (1<<2)) != 0;
+        final Boolean gtFF = ((input) & (1<<3)) != 0;
+        return new GroupTypes(gtAll, gtFF, gtIndirect, gtSelect);
     }
-    
-    private static MultipartReplyGroupDesc setGroupDesc(ByteBuf input) {
+
+    private MultipartReplyGroupDescCase setGroupDesc(ByteBuf input) {
+        MultipartReplyGroupDescCaseBuilder caseBuilder = new MultipartReplyGroupDescCaseBuilder();
         MultipartReplyGroupDescBuilder builder = new MultipartReplyGroupDescBuilder();
         List<GroupDesc> groupDescsList = new ArrayList<>();
         while (input.readableBytes() > 0) {
@@ -788,9 +840,10 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
                 bucketsBuilder.setWatchPort(new PortNumber(input.readUnsignedInt()));
                 bucketsBuilder.setWatchGroup(input.readUnsignedInt());
                 input.skipBytes(PADDING_IN_BUCKETS_HEADER);
-                List<ActionsList> actionsList = ActionsDeserializer
-                        .createActionsList(input, bucketsLength - BUCKETS_HEADER_LENGTH);
-                bucketsBuilder.setActionsList(actionsList);
+                CodeKeyMaker keyMaker = CodeKeyMakerFactory.createActionsKeyMaker(EncodeConstants.OF13_VERSION_ID);
+                List<Action> actions = ListDeserializer.deserializeList(EncodeConstants.OF13_VERSION_ID,
+                        bucketsLength - BUCKETS_HEADER_LENGTH, input, keyMaker, registry);
+                bucketsBuilder.setAction(actions);
                 bucketsList.add(bucketsBuilder.build());
                 actualLength += bucketsLength;
             }
@@ -798,7 +851,13 @@ public class MultipartReplyMessageFactory implements OFDeserializer<MultipartRep
             groupDescsList.add(groupDescBuilder.build());
         }
         builder.setGroupDesc(groupDescsList);
-        return builder.build();
+        caseBuilder.setMultipartReplyGroupDesc(builder.build());
+        return caseBuilder.build();
+    }
+
+    @Override
+    public void injectDeserializerRegistry(
+            DeserializerRegistry deserializerRegistry) {
+        registry = deserializerRegistry;
     }
-    
 }