Mass replace CRLF->LF
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / MatchEntryDeserializerInitializer.java
index fe15b917411739602a6f17940f9d65726a7e1a12..46273e89de4aa483a345fd008296f68732941380 100644 (file)
-/*\r
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.openflowjava.protocol.impl.deserialization;\r
-\r
-import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTcpFlagDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTunnelIpv4DstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTunnelIpv4SrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpOpDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpShaDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpSpaDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpThaDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpTpaDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthDstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthSrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthTypeDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4CodeDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4TypeDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6CodeDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6TypeDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPhyPortDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPortDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpDscpDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpEcnDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpProtoDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4DstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4SrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6DstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6ExtHdrDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6FlabelDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdSllDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTargetDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTllDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6SrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMetadataDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsBosDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsLabelDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsTcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmPbbIsidDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpDstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpSrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpDstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpSrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTunnelIdDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpDstDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpSrcDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanPcpDeserializer;\r
-import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanVidDeserializer;\r
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;\r
-import org.opendaylight.openflowjava.protocol.impl.util.MatchEntryDeserializerRegistryHelper;\r
-import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-public class MatchEntryDeserializerInitializer {\r
-\r
-    /**\r
-     * Registers match entry deserializers\r
-     * @param registry registry to be filled with deserializers\r
-     */\r
-    public static void registerMatchEntryDeserializers(DeserializerRegistry registry) {\r
-        // register OpenflowBasicClass match entry deserializers\r
-        MatchEntryDeserializerRegistryHelper helper =\r
-                new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,\r
-                        OxmMatchConstants.OPENFLOW_BASIC_CLASS, registry);\r
-        helper.register(OxmMatchConstants.IN_PORT, new OxmInPortDeserializer());\r
-        helper.register(OxmMatchConstants.IN_PHY_PORT, new OxmInPhyPortDeserializer());\r
-        helper.register(OxmMatchConstants.METADATA, new OxmMetadataDeserializer());\r
-        helper.register(OxmMatchConstants.ETH_DST, new OxmEthDstDeserializer());\r
-        helper.register(OxmMatchConstants.ETH_SRC, new OxmEthSrcDeserializer());\r
-        helper.register(OxmMatchConstants.ETH_TYPE, new OxmEthTypeDeserializer());\r
-        helper.register(OxmMatchConstants.VLAN_VID, new OxmVlanVidDeserializer());\r
-        helper.register(OxmMatchConstants.VLAN_PCP, new OxmVlanPcpDeserializer());\r
-        helper.register(OxmMatchConstants.IP_DSCP, new OxmIpDscpDeserializer());\r
-        helper.register(OxmMatchConstants.IP_ECN, new OxmIpEcnDeserializer());\r
-        helper.register(OxmMatchConstants.IP_PROTO, new OxmIpProtoDeserializer());\r
-        helper.register(OxmMatchConstants.IPV4_SRC, new OxmIpv4SrcDeserializer());\r
-        helper.register(OxmMatchConstants.IPV4_DST, new OxmIpv4DstDeserializer());\r
-        helper.register(OxmMatchConstants.TCP_SRC, new OxmTcpSrcDeserializer());\r
-        helper.register(OxmMatchConstants.TCP_DST, new OxmTcpDstDeserializer());\r
-        helper.register(OxmMatchConstants.UDP_SRC, new OxmUdpSrcDeserializer());\r
-        helper.register(OxmMatchConstants.UDP_DST, new OxmUdpDstDeserializer());\r
-        helper.register(OxmMatchConstants.SCTP_SRC, new OxmSctpSrcDeserializer());\r
-        helper.register(OxmMatchConstants.SCTP_DST, new OxmSctpDstDeserializer());\r
-        helper.register(OxmMatchConstants.ICMPV4_TYPE, new OxmIcmpv4TypeDeserializer());\r
-        helper.register(OxmMatchConstants.ICMPV4_CODE, new OxmIcmpv4CodeDeserializer());\r
-        helper.register(OxmMatchConstants.ARP_OP, new OxmArpOpDeserializer());\r
-        helper.register(OxmMatchConstants.ARP_SPA, new OxmArpSpaDeserializer());\r
-        helper.register(OxmMatchConstants.ARP_TPA, new OxmArpTpaDeserializer());\r
-        helper.register(OxmMatchConstants.ARP_SHA, new OxmArpShaDeserializer());\r
-        helper.register(OxmMatchConstants.ARP_THA, new OxmArpThaDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_SRC, new OxmIpv6SrcDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_DST, new OxmIpv6DstDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_FLABEL, new OxmIpv6FlabelDeserializer());\r
-        helper.register(OxmMatchConstants.ICMPV6_TYPE, new OxmIcmpv6TypeDeserializer());\r
-        helper.register(OxmMatchConstants.ICMPV6_CODE, new OxmIcmpv6CodeDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_ND_TARGET, new OxmIpv6NdTargetDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_ND_SLL, new OxmIpv6NdSllDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_ND_TLL, new OxmIpv6NdTllDeserializer());\r
-        helper.register(OxmMatchConstants.MPLS_LABEL, new OxmMplsLabelDeserializer());\r
-        helper.register(OxmMatchConstants.MPLS_TC, new OxmMplsTcDeserializer());\r
-        helper.register(OxmMatchConstants.MPLS_BOS, new OxmMplsBosDeserializer());\r
-        helper.register(OxmMatchConstants.PBB_ISID, new OxmPbbIsidDeserializer());\r
-        helper.register(OxmMatchConstants.TUNNEL_ID, new OxmTunnelIdDeserializer());\r
-        helper.register(OxmMatchConstants.IPV6_EXTHDR, new OxmIpv6ExtHdrDeserializer());\r
-\r
-        // Register NXM1Class match entry deserializers\r
-        MatchEntryDeserializerRegistryHelper nxm1helper =\r
-                new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,\r
-                        OxmMatchConstants.NXM_1_CLASS, registry);\r
-        nxm1helper.register(OxmMatchConstants.NXM_NX_TUN_IPV4_SRC, new NxmTunnelIpv4SrcDeserializer());\r
-        nxm1helper.register(OxmMatchConstants.NXM_NX_TUN_IPV4_DST, new NxmTunnelIpv4DstDeserializer());\r
-        nxm1helper.register(OxmMatchConstants.NXM_NX_TCP_FLAG, new NxmTcpFlagDeserializer());\r
-\r
-    }\r
-}\r
+/*
+ * 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.match.NxmTcpFlagDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTunnelIpv4DstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTunnelIpv4SrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpOpDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpShaDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpSpaDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpThaDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpTpaDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthDstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthSrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthTypeDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4CodeDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4TypeDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6CodeDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6TypeDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPhyPortDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPortDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpDscpDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpEcnDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpProtoDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4DstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4SrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6DstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6ExtHdrDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6FlabelDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdSllDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTargetDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTllDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6SrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMetadataDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsBosDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsLabelDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsTcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmPbbIsidDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpDstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpSrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpDstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpSrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTunnelIdDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpDstDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpSrcDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanPcpDeserializer;
+import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanVidDeserializer;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.protocol.impl.util.MatchEntryDeserializerRegistryHelper;
+import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public final class MatchEntryDeserializerInitializer {
+
+    private MatchEntryDeserializerInitializer() {
+        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+    }
+
+    /**
+     * Registers match entry deserializers
+     * @param registry registry to be filled with deserializers
+     */
+    public static void registerMatchEntryDeserializers(DeserializerRegistry registry) {
+        // register OpenflowBasicClass match entry deserializers
+        MatchEntryDeserializerRegistryHelper helper =
+                new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,
+                        OxmMatchConstants.OPENFLOW_BASIC_CLASS, registry);
+        helper.register(OxmMatchConstants.IN_PORT, new OxmInPortDeserializer());
+        helper.register(OxmMatchConstants.IN_PHY_PORT, new OxmInPhyPortDeserializer());
+        helper.register(OxmMatchConstants.METADATA, new OxmMetadataDeserializer());
+        helper.register(OxmMatchConstants.ETH_DST, new OxmEthDstDeserializer());
+        helper.register(OxmMatchConstants.ETH_SRC, new OxmEthSrcDeserializer());
+        helper.register(OxmMatchConstants.ETH_TYPE, new OxmEthTypeDeserializer());
+        helper.register(OxmMatchConstants.VLAN_VID, new OxmVlanVidDeserializer());
+        helper.register(OxmMatchConstants.VLAN_PCP, new OxmVlanPcpDeserializer());
+        helper.register(OxmMatchConstants.IP_DSCP, new OxmIpDscpDeserializer());
+        helper.register(OxmMatchConstants.IP_ECN, new OxmIpEcnDeserializer());
+        helper.register(OxmMatchConstants.IP_PROTO, new OxmIpProtoDeserializer());
+        helper.register(OxmMatchConstants.IPV4_SRC, new OxmIpv4SrcDeserializer());
+        helper.register(OxmMatchConstants.IPV4_DST, new OxmIpv4DstDeserializer());
+        helper.register(OxmMatchConstants.TCP_SRC, new OxmTcpSrcDeserializer());
+        helper.register(OxmMatchConstants.TCP_DST, new OxmTcpDstDeserializer());
+        helper.register(OxmMatchConstants.UDP_SRC, new OxmUdpSrcDeserializer());
+        helper.register(OxmMatchConstants.UDP_DST, new OxmUdpDstDeserializer());
+        helper.register(OxmMatchConstants.SCTP_SRC, new OxmSctpSrcDeserializer());
+        helper.register(OxmMatchConstants.SCTP_DST, new OxmSctpDstDeserializer());
+        helper.register(OxmMatchConstants.ICMPV4_TYPE, new OxmIcmpv4TypeDeserializer());
+        helper.register(OxmMatchConstants.ICMPV4_CODE, new OxmIcmpv4CodeDeserializer());
+        helper.register(OxmMatchConstants.ARP_OP, new OxmArpOpDeserializer());
+        helper.register(OxmMatchConstants.ARP_SPA, new OxmArpSpaDeserializer());
+        helper.register(OxmMatchConstants.ARP_TPA, new OxmArpTpaDeserializer());
+        helper.register(OxmMatchConstants.ARP_SHA, new OxmArpShaDeserializer());
+        helper.register(OxmMatchConstants.ARP_THA, new OxmArpThaDeserializer());
+        helper.register(OxmMatchConstants.IPV6_SRC, new OxmIpv6SrcDeserializer());
+        helper.register(OxmMatchConstants.IPV6_DST, new OxmIpv6DstDeserializer());
+        helper.register(OxmMatchConstants.IPV6_FLABEL, new OxmIpv6FlabelDeserializer());
+        helper.register(OxmMatchConstants.ICMPV6_TYPE, new OxmIcmpv6TypeDeserializer());
+        helper.register(OxmMatchConstants.ICMPV6_CODE, new OxmIcmpv6CodeDeserializer());
+        helper.register(OxmMatchConstants.IPV6_ND_TARGET, new OxmIpv6NdTargetDeserializer());
+        helper.register(OxmMatchConstants.IPV6_ND_SLL, new OxmIpv6NdSllDeserializer());
+        helper.register(OxmMatchConstants.IPV6_ND_TLL, new OxmIpv6NdTllDeserializer());
+        helper.register(OxmMatchConstants.MPLS_LABEL, new OxmMplsLabelDeserializer());
+        helper.register(OxmMatchConstants.MPLS_TC, new OxmMplsTcDeserializer());
+        helper.register(OxmMatchConstants.MPLS_BOS, new OxmMplsBosDeserializer());
+        helper.register(OxmMatchConstants.PBB_ISID, new OxmPbbIsidDeserializer());
+        helper.register(OxmMatchConstants.TUNNEL_ID, new OxmTunnelIdDeserializer());
+        helper.register(OxmMatchConstants.IPV6_EXTHDR, new OxmIpv6ExtHdrDeserializer());
+
+        // Register NXM1Class match entry deserializers
+        MatchEntryDeserializerRegistryHelper nxm1helper =
+                new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,
+                        OxmMatchConstants.NXM_1_CLASS, registry);
+        nxm1helper.register(OxmMatchConstants.NXM_NX_TUN_IPV4_SRC, new NxmTunnelIpv4SrcDeserializer());
+        nxm1helper.register(OxmMatchConstants.NXM_NX_TUN_IPV4_DST, new NxmTunnelIpv4DstDeserializer());
+        nxm1helper.register(OxmMatchConstants.NXM_NX_TCP_FLAG, new NxmTcpFlagDeserializer());
+
+    }
+}