X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Fdeserialization%2FInstructionDeserializerInitializer.java;h=40cae2c4bb79a9e5a815f7a088b38b8b4ea13f2f;hb=519a86d1ddcfb8f0fe264174e62e5424e1efba1f;hp=9a83ec49bc987044cb267f4384c5caeb18fafd7f;hpb=26aeaa7e2754b2cf4f6ad63055ab3ce34f68c961;p=openflowjava.git diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/InstructionDeserializerInitializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/InstructionDeserializerInitializer.java index 9a83ec49..40cae2c4 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/InstructionDeserializerInitializer.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/InstructionDeserializerInitializer.java @@ -1,43 +1,46 @@ -/* - * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.openflowjava.protocol.impl.deserialization; - -import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry; -import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.ApplyActionsInstructionDeserializer; -import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.ClearActionsInstructionDeserializer; -import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.GoToTableInstructionDeserializer; -import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.MeterInstructionDeserializer; -import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.WriteActionsInstructionDeserializer; -import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.WriteMetadataInstructionDeserializer; -import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; -import org.opendaylight.openflowjava.protocol.impl.util.SimpleDeserializerRegistryHelper; -import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction; - -/** - * @author michal.polkorab - * - */ -public class InstructionDeserializerInitializer { - - /** - * Registers instruction deserializers - * @param registry registry to be filled with deserializers - */ - public static void registerDeserializers(DeserializerRegistry registry) { - // register OF v1.3 instruction deserializers - SimpleDeserializerRegistryHelper helper = - new SimpleDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID, registry); - helper.registerDeserializer(1, Instruction.class, new GoToTableInstructionDeserializer()); - helper.registerDeserializer(2, Instruction.class, new WriteMetadataInstructionDeserializer()); - helper.registerDeserializer(3, Instruction.class, new WriteActionsInstructionDeserializer()); - helper.registerDeserializer(4, Instruction.class, new ApplyActionsInstructionDeserializer()); - helper.registerDeserializer(5, Instruction.class, new ClearActionsInstructionDeserializer()); - helper.registerDeserializer(6, Instruction.class, new MeterInstructionDeserializer()); - } -} +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.impl.deserialization; + +import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry; +import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; +import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.ApplyActionsInstructionDeserializer; +import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.ClearActionsInstructionDeserializer; +import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.GoToTableInstructionDeserializer; +import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.MeterInstructionDeserializer; +import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.WriteActionsInstructionDeserializer; +import org.opendaylight.openflowjava.protocol.impl.deserialization.instruction.WriteMetadataInstructionDeserializer; +import org.opendaylight.openflowjava.protocol.impl.util.InstructionDeserializerRegistryHelper; + +/** + * @author michal.polkorab + * + */ +public final class InstructionDeserializerInitializer { + + private InstructionDeserializerInitializer() { + throw new UnsupportedOperationException("Utility class shouldn't be instantiated"); + } + + /** + * Registers instruction deserializers + * @param registry registry to be filled with deserializers + */ + public static void registerDeserializers(DeserializerRegistry registry) { + // register OF v1.3 instruction deserializers + InstructionDeserializerRegistryHelper helper = + new InstructionDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID, registry); + helper.registerDeserializer(1, new GoToTableInstructionDeserializer()); + helper.registerDeserializer(2, new WriteMetadataInstructionDeserializer()); + helper.registerDeserializer(3, new WriteActionsInstructionDeserializer()); + helper.registerDeserializer(4, new ApplyActionsInstructionDeserializer()); + helper.registerDeserializer(5, new ClearActionsInstructionDeserializer()); + helper.registerDeserializer(6, new MeterInstructionDeserializer()); + } +} \ No newline at end of file