Extensibility support (deserialization part)
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / MatchEntryDeserializerInitializer.java
1 /*\r
2  * Copyright (c) 2013 Pantheon Technologies s.r.o. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.openflowjava.protocol.impl.deserialization;\r
9 \r
10 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;\r
11 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpOpDeserializer;\r
12 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpShaDeserializer;\r
13 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpSpaDeserializer;\r
14 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpThaDeserializer;\r
15 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpTpaDeserializer;\r
16 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthDstDeserializer;\r
17 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthSrcDeserializer;\r
18 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthTypeDeserializer;\r
19 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4CodeDeserializer;\r
20 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4TypeDeserializer;\r
21 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6CodeDeserializer;\r
22 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6TypeDeserializer;\r
23 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPhyPortDeserializer;\r
24 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPortDeserializer;\r
25 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpDscpDeserializer;\r
26 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpEcnDeserializer;\r
27 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpProtoDeserializer;\r
28 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4DstDeserializer;\r
29 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4SrcDeserializer;\r
30 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6DstDeserializer;\r
31 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6ExtHdrDeserializer;\r
32 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6FlabelDeserializer;\r
33 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdSllDeserializer;\r
34 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTargetDeserializer;\r
35 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTllDeserializer;\r
36 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6SrcDeserializer;\r
37 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMetadataDeserializer;\r
38 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsBosDeserializer;\r
39 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsLabelDeserializer;\r
40 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsTcDeserializer;\r
41 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmPbbIsidDeserializer;\r
42 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpDstDeserializer;\r
43 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpSrcDeserializer;\r
44 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpDstDeserializer;\r
45 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpSrcDeserializer;\r
46 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTunnelIdDeserializer;\r
47 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpDstDeserializer;\r
48 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpSrcDeserializer;\r
49 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanPcpDeserializer;\r
50 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanVidDeserializer;\r
51 import org.opendaylight.openflowjava.protocol.impl.util.EncodeConstants;\r
52 import org.opendaylight.openflowjava.protocol.impl.util.MatchEntryDeserializerRegistryHelper;\r
53 import org.opendaylight.openflowjava.protocol.impl.util.OxmMatchConstants;\r
54 \r
55 /**\r
56  * @author michal.polkorab\r
57  *\r
58  */\r
59 public class MatchEntryDeserializerInitializer {\r
60 \r
61     /**\r
62      * Registers match entry deserializers\r
63      * @param registry registry to be filled with deserializers\r
64      */\r
65     public static void registerMatchEntryDeserializers(DeserializerRegistry registry) {\r
66         // register OpenflowBasicClass match entry deserializers\r
67         MatchEntryDeserializerRegistryHelper helper =\r
68                 new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,\r
69                         OxmMatchConstants.OPENFLOW_BASIC_CLASS, registry);\r
70         helper.register(OxmMatchConstants.IN_PORT, new OxmInPortDeserializer());\r
71         helper.register(OxmMatchConstants.IN_PHY_PORT, new OxmInPhyPortDeserializer());\r
72         helper.register(OxmMatchConstants.METADATA, new OxmMetadataDeserializer());\r
73         helper.register(OxmMatchConstants.ETH_DST, new OxmEthDstDeserializer());\r
74         helper.register(OxmMatchConstants.ETH_SRC, new OxmEthSrcDeserializer());\r
75         helper.register(OxmMatchConstants.ETH_TYPE, new OxmEthTypeDeserializer());\r
76         helper.register(OxmMatchConstants.VLAN_VID, new OxmVlanVidDeserializer());\r
77         helper.register(OxmMatchConstants.VLAN_PCP, new OxmVlanPcpDeserializer());\r
78         helper.register(OxmMatchConstants.IP_DSCP, new OxmIpDscpDeserializer());\r
79         helper.register(OxmMatchConstants.IP_ECN, new OxmIpEcnDeserializer());\r
80         helper.register(OxmMatchConstants.IP_PROTO, new OxmIpProtoDeserializer());\r
81         helper.register(OxmMatchConstants.IPV4_SRC, new OxmIpv4SrcDeserializer());\r
82         helper.register(OxmMatchConstants.IPV4_DST, new OxmIpv4DstDeserializer());\r
83         helper.register(OxmMatchConstants.TCP_SRC, new OxmTcpSrcDeserializer());\r
84         helper.register(OxmMatchConstants.TCP_DST, new OxmTcpDstDeserializer());\r
85         helper.register(OxmMatchConstants.UDP_SRC, new OxmUdpSrcDeserializer());\r
86         helper.register(OxmMatchConstants.UDP_DST, new OxmUdpDstDeserializer());\r
87         helper.register(OxmMatchConstants.SCTP_SRC, new OxmSctpSrcDeserializer());\r
88         helper.register(OxmMatchConstants.SCTP_DST, new OxmSctpDstDeserializer());\r
89         helper.register(OxmMatchConstants.ICMPV4_TYPE, new OxmIcmpv4TypeDeserializer());\r
90         helper.register(OxmMatchConstants.ICMPV4_CODE, new OxmIcmpv4CodeDeserializer());\r
91         helper.register(OxmMatchConstants.ARP_OP, new OxmArpOpDeserializer());\r
92         helper.register(OxmMatchConstants.ARP_SPA, new OxmArpSpaDeserializer());\r
93         helper.register(OxmMatchConstants.ARP_TPA, new OxmArpTpaDeserializer());\r
94         helper.register(OxmMatchConstants.ARP_SHA, new OxmArpShaDeserializer());\r
95         helper.register(OxmMatchConstants.ARP_THA, new OxmArpThaDeserializer());\r
96         helper.register(OxmMatchConstants.IPV6_SRC, new OxmIpv6SrcDeserializer());\r
97         helper.register(OxmMatchConstants.IPV6_DST, new OxmIpv6DstDeserializer());\r
98         helper.register(OxmMatchConstants.IPV6_FLABEL, new OxmIpv6FlabelDeserializer());\r
99         helper.register(OxmMatchConstants.ICMPV6_TYPE, new OxmIcmpv6TypeDeserializer());\r
100         helper.register(OxmMatchConstants.ICMPV6_CODE, new OxmIcmpv6CodeDeserializer());\r
101         helper.register(OxmMatchConstants.IPV6_ND_TARGET, new OxmIpv6NdTargetDeserializer());\r
102         helper.register(OxmMatchConstants.IPV6_ND_SLL, new OxmIpv6NdSllDeserializer());\r
103         helper.register(OxmMatchConstants.IPV6_ND_TLL, new OxmIpv6NdTllDeserializer());\r
104         helper.register(OxmMatchConstants.MPLS_LABEL, new OxmMplsLabelDeserializer());\r
105         helper.register(OxmMatchConstants.MPLS_TC, new OxmMplsTcDeserializer());\r
106         helper.register(OxmMatchConstants.MPLS_BOS, new OxmMplsBosDeserializer());\r
107         helper.register(OxmMatchConstants.PBB_ISID, new OxmPbbIsidDeserializer());\r
108         helper.register(OxmMatchConstants.TUNNEL_ID, new OxmTunnelIdDeserializer());\r
109         helper.register(OxmMatchConstants.IPV6_EXTHDR, new OxmIpv6ExtHdrDeserializer());\r
110     }\r
111 }\r