BUG:6997 supporting OXM_OF_MPLS_LABEL in nicira extensiona
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / main / java / org / opendaylight / openflowjava / nx / NiciraExtensionsRegistrator.java
1 /*
2  * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowjava.nx;
10
11 import org.opendaylight.openflowjava.nx.api.NiciraExtensionCodecRegistrator;
12 import org.opendaylight.openflowjava.nx.codec.action.ConntrackCodec;
13 import org.opendaylight.openflowjava.nx.codec.action.LearnCodec;
14 import org.opendaylight.openflowjava.nx.codec.action.MultipathCodec;
15 import org.opendaylight.openflowjava.nx.codec.action.NiciraActionCodecs;
16 import org.opendaylight.openflowjava.nx.codec.action.OutputRegCodec;
17 import org.opendaylight.openflowjava.nx.codec.action.RegLoadCodec;
18 import org.opendaylight.openflowjava.nx.codec.action.RegMoveCodec;
19 import org.opendaylight.openflowjava.nx.codec.action.ResubmitCodec;
20 import org.opendaylight.openflowjava.nx.codec.action.PushNshCodec;
21 import org.opendaylight.openflowjava.nx.codec.action.PopNshCodec;
22 import org.opendaylight.openflowjava.nx.codec.match.ArpOpCodec;
23 import org.opendaylight.openflowjava.nx.codec.match.ArpShaCodec;
24 import org.opendaylight.openflowjava.nx.codec.match.ArpSpaCodec;
25 import org.opendaylight.openflowjava.nx.codec.match.ArpThaCodec;
26 import org.opendaylight.openflowjava.nx.codec.match.ArpTpaCodec;
27 import org.opendaylight.openflowjava.nx.codec.match.CtStateCodec;
28 import org.opendaylight.openflowjava.nx.codec.match.CtZoneCodec;
29 import org.opendaylight.openflowjava.nx.codec.match.EthDstCodec;
30 import org.opendaylight.openflowjava.nx.codec.match.EthSrcCodec;
31 import org.opendaylight.openflowjava.nx.codec.match.EthTypeCodec;
32 import org.opendaylight.openflowjava.nx.codec.match.Nshc1Codec;
33 import org.opendaylight.openflowjava.nx.codec.match.Nshc2Codec;
34 import org.opendaylight.openflowjava.nx.codec.match.Nshc3Codec;
35 import org.opendaylight.openflowjava.nx.codec.match.Nshc4Codec;
36 import org.opendaylight.openflowjava.nx.codec.match.NsiCodec;
37 import org.opendaylight.openflowjava.nx.codec.match.NspCodec;
38 import org.opendaylight.openflowjava.nx.codec.match.EncapEthTypeCodec;
39 import org.opendaylight.openflowjava.nx.codec.match.EncapEthSrcCodec;
40 import org.opendaylight.openflowjava.nx.codec.match.EncapEthDstCodec;
41 import org.opendaylight.openflowjava.nx.codec.match.NshMdtypeCodec;
42 import org.opendaylight.openflowjava.nx.codec.match.NshNpCodec;
43 import org.opendaylight.openflowjava.nx.codec.match.TunGpeNpCodec;
44 import org.opendaylight.openflowjava.nx.codec.match.Reg0Codec;
45 import org.opendaylight.openflowjava.nx.codec.match.Reg1Codec;
46 import org.opendaylight.openflowjava.nx.codec.match.Reg2Codec;
47 import org.opendaylight.openflowjava.nx.codec.match.Reg3Codec;
48 import org.opendaylight.openflowjava.nx.codec.match.Reg4Codec;
49 import org.opendaylight.openflowjava.nx.codec.match.Reg5Codec;
50 import org.opendaylight.openflowjava.nx.codec.match.Reg6Codec;
51 import org.opendaylight.openflowjava.nx.codec.match.Reg7Codec;
52 import org.opendaylight.openflowjava.nx.codec.match.TcpDstCodec;
53 import org.opendaylight.openflowjava.nx.codec.match.TcpSrcCodec;
54 import org.opendaylight.openflowjava.nx.codec.match.TunIdCodec;
55 import org.opendaylight.openflowjava.nx.codec.match.TunIpv4DstCodec;
56 import org.opendaylight.openflowjava.nx.codec.match.TunIpv4SrcCodec;
57 import org.opendaylight.openflowjava.nx.codec.match.UdpDstCodec;
58 import org.opendaylight.openflowjava.nx.codec.match.UdpSrcCodec;
59 import org.opendaylight.openflowjava.nx.codec.match.InPortCodec;
60 import org.opendaylight.openflowjava.nx.codec.match.MplsLabelCodec;
61
62 import com.google.common.base.Preconditions;
63
64 public class NiciraExtensionsRegistrator implements AutoCloseable {
65
66     private final NiciraExtensionCodecRegistrator registrator;
67
68     /**
69      * @param registrator cannot be null
70      */
71     public NiciraExtensionsRegistrator(NiciraExtensionCodecRegistrator registrator) {
72         this.registrator = Preconditions.checkNotNull(registrator);
73     }
74
75     public void registerNiciraExtensions() {
76         registrator.registerActionDeserializer(RegLoadCodec.DESERIALIZER_KEY, NiciraActionCodecs.REG_LOAD_CODEC);
77         registrator.registerActionSerializer(RegLoadCodec.SERIALIZER_KEY, NiciraActionCodecs.REG_LOAD_CODEC);
78         registrator.registerActionDeserializer(RegMoveCodec.DESERIALIZER_KEY, NiciraActionCodecs.REG_MOVE_CODEC);
79         registrator.registerActionSerializer(RegMoveCodec.SERIALIZER_KEY, NiciraActionCodecs.REG_MOVE_CODEC);
80         registrator.registerActionDeserializer(OutputRegCodec.DESERIALIZER_KEY, NiciraActionCodecs.OUTPUT_REG_CODEC);
81         registrator.registerActionSerializer(OutputRegCodec.SERIALIZER_KEY, NiciraActionCodecs.OUTPUT_REG_CODEC);
82         registrator.registerActionSerializer(ResubmitCodec.SERIALIZER_KEY, NiciraActionCodecs.RESUBMIT_CODEC);
83         registrator.registerActionDeserializer(ResubmitCodec.DESERIALIZER_KEY, NiciraActionCodecs.RESUBMIT_CODEC);
84         registrator.registerActionDeserializer(ResubmitCodec.TABLE_DESERIALIZER_KEY, NiciraActionCodecs.RESUBMIT_CODEC);
85         registrator.registerActionSerializer(MultipathCodec.SERIALIZER_KEY, NiciraActionCodecs.MULTIPATH_CODEC);
86         registrator.registerActionDeserializer(MultipathCodec.DESERIALIZER_KEY, NiciraActionCodecs.MULTIPATH_CODEC);
87         registrator.registerActionDeserializer(PushNshCodec.DESERIALIZER_KEY, NiciraActionCodecs.PUSH_NSH_CODEC);
88         registrator.registerActionSerializer(PushNshCodec.SERIALIZER_KEY, NiciraActionCodecs.PUSH_NSH_CODEC);
89         registrator.registerActionDeserializer(PopNshCodec.DESERIALIZER_KEY, NiciraActionCodecs.POP_NSH_CODEC);
90         registrator.registerActionSerializer(PopNshCodec.SERIALIZER_KEY, NiciraActionCodecs.POP_NSH_CODEC);
91
92         registrator.registerActionSerializer(ConntrackCodec.SERIALIZER_KEY, NiciraActionCodecs.CONNTRACK_CODEC);
93         registrator.registerActionDeserializer(ConntrackCodec.DESERIALIZER_KEY, NiciraActionCodecs.CONNTRACK_CODEC);
94         registrator.registerActionSerializer(LearnCodec.SERIALIZER_KEY, NiciraActionCodecs.LEARN_CODEC);
95         registrator.registerActionDeserializer(LearnCodec.DESERIALIZER_KEY, NiciraActionCodecs.LEARN_CODEC);
96         //Continue
97
98
99         registrator.registerMatchEntrySerializer(Reg0Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG0_CODEC);
100         registrator.registerMatchEntryDeserializer(Reg0Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG0_CODEC);
101         registrator.registerMatchEntrySerializer(Reg1Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG1_CODEC);
102         registrator.registerMatchEntryDeserializer(Reg1Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG1_CODEC);
103         registrator.registerMatchEntrySerializer(Reg2Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG2_CODEC);
104         registrator.registerMatchEntryDeserializer(Reg2Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG2_CODEC);
105         registrator.registerMatchEntrySerializer(Reg3Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG3_CODEC);
106         registrator.registerMatchEntryDeserializer(Reg3Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG3_CODEC);
107         registrator.registerMatchEntrySerializer(Reg4Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG4_CODEC);
108         registrator.registerMatchEntryDeserializer(Reg4Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG4_CODEC);
109         registrator.registerMatchEntrySerializer(Reg5Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG5_CODEC);
110         registrator.registerMatchEntryDeserializer(Reg5Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG5_CODEC);
111         registrator.registerMatchEntrySerializer(Reg6Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG6_CODEC);
112         registrator.registerMatchEntryDeserializer(Reg6Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG6_CODEC);
113         registrator.registerMatchEntrySerializer(Reg7Codec.SERIALIZER_KEY, NiciraMatchCodecs.REG7_CODEC);
114         registrator.registerMatchEntryDeserializer(Reg7Codec.DESERIALIZER_KEY, NiciraMatchCodecs.REG7_CODEC);
115         registrator.registerMatchEntrySerializer(TunIdCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_ID_CODEC);
116         registrator.registerMatchEntryDeserializer(TunIdCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_ID_CODEC);
117         registrator.registerMatchEntrySerializer(ArpOpCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_OP_CODEC);
118         registrator.registerMatchEntryDeserializer(ArpOpCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_OP_CODEC);
119         registrator.registerMatchEntrySerializer(ArpShaCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_SHA_CODEC);
120         registrator.registerMatchEntryDeserializer(ArpShaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_SHA_CODEC);
121         registrator.registerMatchEntrySerializer(ArpSpaCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_SPA_CODEC);
122         registrator.registerMatchEntryDeserializer(ArpSpaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_SPA_CODEC);
123         registrator.registerMatchEntrySerializer(ArpThaCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_THA_CODEC);
124         registrator.registerMatchEntryDeserializer(ArpThaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_THA_CODEC);
125         registrator.registerMatchEntrySerializer(ArpTpaCodec.SERIALIZER_KEY, NiciraMatchCodecs.ARP_TPA_CODEC);
126         registrator.registerMatchEntryDeserializer(ArpTpaCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ARP_TPA_CODEC);
127         registrator.registerMatchEntrySerializer(InPortCodec.SERIALIZER_KEY, NiciraMatchCodecs.NXM_OF_IN_PORT_CODEC);
128         registrator.registerMatchEntryDeserializer(InPortCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NXM_OF_IN_PORT_CODEC);
129         registrator.registerMatchEntrySerializer(MplsLabelCodec.SERIALIZER_KEY, NiciraMatchCodecs.OXM_OF_MPLS_LABEL);
130         registrator.registerMatchEntryDeserializer(MplsLabelCodec.DESERIALIZER_KEY, NiciraMatchCodecs.OXM_OF_MPLS_LABEL);
131         registrator.registerMatchEntrySerializer(EthDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_DST_CODEC);
132         registrator.registerMatchEntryDeserializer(EthDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ETH_DST_CODEC);
133         registrator.registerMatchEntrySerializer(EthSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_SRC_CODEC);
134         registrator.registerMatchEntryDeserializer(EthSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ETH_SRC_CODEC);
135         registrator.registerMatchEntrySerializer(EthTypeCodec.SERIALIZER_KEY, NiciraMatchCodecs.ETH_TYPE_CODEC);
136         registrator.registerMatchEntryDeserializer(EthTypeCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ETH_TYPE_CODEC);
137         registrator.registerMatchEntrySerializer(NspCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSP_CODEC);
138         registrator.registerMatchEntryDeserializer(NspCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSP_CODEC);
139         registrator.registerMatchEntrySerializer(Nshc1Codec.SERIALIZER_KEY, NiciraMatchCodecs.NSC1_CODEC);
140         registrator.registerMatchEntryDeserializer(Nshc1Codec.DESERIALIZER_KEY, NiciraMatchCodecs.NSC1_CODEC);
141         registrator.registerMatchEntrySerializer(Nshc2Codec.SERIALIZER_KEY, NiciraMatchCodecs.NSC2_CODEC);
142         registrator.registerMatchEntryDeserializer(Nshc2Codec.DESERIALIZER_KEY, NiciraMatchCodecs.NSC2_CODEC);
143         registrator.registerMatchEntrySerializer(Nshc3Codec.SERIALIZER_KEY, NiciraMatchCodecs.NSC3_CODEC);
144         registrator.registerMatchEntryDeserializer(Nshc3Codec.DESERIALIZER_KEY, NiciraMatchCodecs.NSC3_CODEC);
145         registrator.registerMatchEntrySerializer(Nshc4Codec.SERIALIZER_KEY, NiciraMatchCodecs.NSC4_CODEC);
146         registrator.registerMatchEntryDeserializer(Nshc4Codec.DESERIALIZER_KEY, NiciraMatchCodecs.NSC4_CODEC);
147         registrator.registerMatchEntrySerializer(NsiCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSI_CODEC);
148         registrator.registerMatchEntryDeserializer(NsiCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSI_CODEC);
149         registrator.registerMatchEntrySerializer(TunIpv4DstCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_DST_CODEC);
150         registrator.registerMatchEntryDeserializer(TunIpv4DstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_DST_CODEC);
151         registrator.registerMatchEntrySerializer(TunIpv4SrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_SRC_CODEC);
152         registrator.registerMatchEntryDeserializer(TunIpv4SrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_IPV4_SRC_CODEC);
153         registrator.registerMatchEntrySerializer(EncapEthTypeCodec.SERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_TYPE_CODEC);
154         registrator.registerMatchEntryDeserializer(EncapEthTypeCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_TYPE_CODEC);
155         registrator.registerMatchEntrySerializer(EncapEthSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_SRC_CODEC);
156         registrator.registerMatchEntryDeserializer(EncapEthSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_SRC_CODEC);
157         registrator.registerMatchEntrySerializer(EncapEthDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_DST_CODEC);
158         registrator.registerMatchEntryDeserializer(EncapEthDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.ENCAP_ETH_DST_CODEC);
159         registrator.registerMatchEntrySerializer(NshMdtypeCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSH_MDTYPE_CODEC);
160         registrator.registerMatchEntryDeserializer(NshMdtypeCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSH_MDTYPE_CODEC);
161         registrator.registerMatchEntrySerializer(NshNpCodec.SERIALIZER_KEY, NiciraMatchCodecs.NSH_NP_CODEC);
162         registrator.registerMatchEntryDeserializer(NshNpCodec.DESERIALIZER_KEY, NiciraMatchCodecs.NSH_NP_CODEC);
163         registrator.registerMatchEntrySerializer(TunGpeNpCodec.SERIALIZER_KEY, NiciraMatchCodecs.TUN_GPE_NP_CODEC);
164         registrator.registerMatchEntryDeserializer(TunGpeNpCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TUN_GPE_NP_CODEC);
165         registrator.registerMatchEntrySerializer(TcpSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.TCP_SRC_CODEC);
166         registrator.registerMatchEntryDeserializer(TcpSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TCP_SRC_CODEC);
167         registrator.registerMatchEntrySerializer(TcpDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.TCP_DST_CODEC);
168         registrator.registerMatchEntryDeserializer(TcpDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.TCP_DST_CODEC);
169         registrator.registerMatchEntrySerializer(UdpSrcCodec.SERIALIZER_KEY, NiciraMatchCodecs.UDP_SRC_CODEC);
170         registrator.registerMatchEntryDeserializer(UdpSrcCodec.DESERIALIZER_KEY, NiciraMatchCodecs.UDP_SRC_CODEC);
171         registrator.registerMatchEntrySerializer(UdpDstCodec.SERIALIZER_KEY, NiciraMatchCodecs.UDP_DST_CODEC);
172         registrator.registerMatchEntryDeserializer(UdpDstCodec.DESERIALIZER_KEY, NiciraMatchCodecs.UDP_DST_CODEC);
173         registrator.registerMatchEntrySerializer(CtStateCodec.SERIALIZER_KEY, NiciraMatchCodecs.CT_ST_CODEC);
174         registrator.registerMatchEntryDeserializer(CtStateCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_ST_CODEC);
175         registrator.registerMatchEntrySerializer(CtZoneCodec.SERIALIZER_KEY, NiciraMatchCodecs.CT_ZONE_CODEC);
176         registrator.registerMatchEntryDeserializer(CtZoneCodec.DESERIALIZER_KEY, NiciraMatchCodecs.CT_ZONE_CODEC);
177     }
178
179     public void unregisterExtensions() {
180         registrator.unregisterActionDeserializer(RegLoadCodec.DESERIALIZER_KEY);
181         registrator.unregisterActionSerializer(RegLoadCodec.SERIALIZER_KEY);
182         registrator.unregisterActionDeserializer(RegMoveCodec.DESERIALIZER_KEY);
183         registrator.unregisterActionSerializer(RegMoveCodec.SERIALIZER_KEY);
184         registrator.unregisterActionDeserializer(OutputRegCodec.DESERIALIZER_KEY);
185         registrator.unregisterActionSerializer(OutputRegCodec.SERIALIZER_KEY);
186         registrator.unregisterActionSerializer(ResubmitCodec.SERIALIZER_KEY);
187         registrator.unregisterActionDeserializer(ResubmitCodec.TABLE_DESERIALIZER_KEY);
188         registrator.unregisterActionDeserializer(ResubmitCodec.DESERIALIZER_KEY);
189         registrator.unregisterActionSerializer(MultipathCodec.SERIALIZER_KEY);
190         registrator.unregisterActionDeserializer(MultipathCodec.DESERIALIZER_KEY);
191         registrator.unregisterActionDeserializer(PushNshCodec.DESERIALIZER_KEY);
192         registrator.unregisterActionSerializer(PushNshCodec.SERIALIZER_KEY);
193         registrator.unregisterActionDeserializer(PopNshCodec.DESERIALIZER_KEY);
194         registrator.unregisterActionSerializer(PopNshCodec.SERIALIZER_KEY);
195         registrator.unregisterActionSerializer(ConntrackCodec.SERIALIZER_KEY);
196         registrator.unregisterActionDeserializer(ConntrackCodec.DESERIALIZER_KEY);
197         registrator.unregisterActionSerializer(LearnCodec.SERIALIZER_KEY);
198         registrator.unregisterActionDeserializer(LearnCodec.DESERIALIZER_KEY);
199         //CONTINUE
200         registrator.unregisterMatchEntrySerializer(Reg0Codec.SERIALIZER_KEY);
201         registrator.unregisterMatchEntryDeserializer(Reg0Codec.DESERIALIZER_KEY);
202         registrator.unregisterMatchEntrySerializer(Reg1Codec.SERIALIZER_KEY);
203         registrator.unregisterMatchEntryDeserializer(Reg1Codec.DESERIALIZER_KEY);
204         registrator.unregisterMatchEntrySerializer(Reg2Codec.SERIALIZER_KEY);
205         registrator.unregisterMatchEntryDeserializer(Reg2Codec.DESERIALIZER_KEY);
206         registrator.unregisterMatchEntrySerializer(Reg3Codec.SERIALIZER_KEY);
207         registrator.unregisterMatchEntryDeserializer(Reg3Codec.DESERIALIZER_KEY);
208         registrator.unregisterMatchEntrySerializer(Reg4Codec.SERIALIZER_KEY);
209         registrator.unregisterMatchEntryDeserializer(Reg4Codec.DESERIALIZER_KEY);
210         registrator.unregisterMatchEntrySerializer(Reg5Codec.SERIALIZER_KEY);
211         registrator.unregisterMatchEntryDeserializer(Reg5Codec.DESERIALIZER_KEY);
212         registrator.unregisterMatchEntrySerializer(Reg6Codec.SERIALIZER_KEY);
213         registrator.unregisterMatchEntryDeserializer(Reg6Codec.DESERIALIZER_KEY);
214         registrator.unregisterMatchEntrySerializer(Reg7Codec.SERIALIZER_KEY);
215         registrator.unregisterMatchEntryDeserializer(Reg7Codec.DESERIALIZER_KEY);
216         registrator.unregisterMatchEntrySerializer(TunIdCodec.SERIALIZER_KEY);
217         registrator.unregisterMatchEntryDeserializer(TunIdCodec.DESERIALIZER_KEY);
218         registrator.unregisterMatchEntrySerializer(ArpOpCodec.SERIALIZER_KEY);
219         registrator.unregisterMatchEntryDeserializer(ArpOpCodec.DESERIALIZER_KEY);
220         registrator.unregisterMatchEntrySerializer(ArpShaCodec.SERIALIZER_KEY);
221         registrator.unregisterMatchEntryDeserializer(ArpShaCodec.DESERIALIZER_KEY);
222         registrator.unregisterMatchEntrySerializer(ArpSpaCodec.SERIALIZER_KEY);
223         registrator.unregisterMatchEntryDeserializer(ArpSpaCodec.DESERIALIZER_KEY);
224         registrator.unregisterMatchEntrySerializer(ArpThaCodec.SERIALIZER_KEY);
225         registrator.unregisterMatchEntryDeserializer(ArpThaCodec.DESERIALIZER_KEY);
226         registrator.unregisterMatchEntrySerializer(ArpTpaCodec.SERIALIZER_KEY);
227         registrator.unregisterMatchEntryDeserializer(ArpTpaCodec.DESERIALIZER_KEY);
228         registrator.unregisterMatchEntrySerializer(InPortCodec.SERIALIZER_KEY);
229         registrator.unregisterMatchEntryDeserializer(InPortCodec.DESERIALIZER_KEY);
230         registrator.unregisterMatchEntrySerializer(MplsLabelCodec.SERIALIZER_KEY);
231         registrator.unregisterMatchEntryDeserializer(MplsLabelCodec.DESERIALIZER_KEY);
232         registrator.unregisterMatchEntrySerializer(EthDstCodec.SERIALIZER_KEY);
233         registrator.unregisterMatchEntryDeserializer(EthDstCodec.DESERIALIZER_KEY);
234         registrator.unregisterMatchEntrySerializer(EthSrcCodec.SERIALIZER_KEY);
235         registrator.unregisterMatchEntryDeserializer(EthSrcCodec.DESERIALIZER_KEY);
236         registrator.unregisterMatchEntrySerializer(EthTypeCodec.SERIALIZER_KEY);
237         registrator.unregisterMatchEntryDeserializer(EthTypeCodec.DESERIALIZER_KEY);
238         registrator.unregisterMatchEntrySerializer(NspCodec.SERIALIZER_KEY);
239         registrator.unregisterMatchEntryDeserializer(NspCodec.DESERIALIZER_KEY);
240         registrator.unregisterMatchEntrySerializer(NsiCodec.SERIALIZER_KEY);
241         registrator.unregisterMatchEntryDeserializer(NsiCodec.DESERIALIZER_KEY);
242         registrator.unregisterMatchEntrySerializer(Nshc1Codec.SERIALIZER_KEY);
243         registrator.unregisterMatchEntryDeserializer(Nshc1Codec.DESERIALIZER_KEY);
244         registrator.unregisterMatchEntrySerializer(Nshc2Codec.SERIALIZER_KEY);
245         registrator.unregisterMatchEntryDeserializer(Nshc2Codec.DESERIALIZER_KEY);
246         registrator.unregisterMatchEntrySerializer(Nshc3Codec.SERIALIZER_KEY);
247         registrator.unregisterMatchEntryDeserializer(Nshc3Codec.DESERIALIZER_KEY);
248         registrator.unregisterMatchEntrySerializer(Nshc4Codec.SERIALIZER_KEY);
249         registrator.unregisterMatchEntryDeserializer(Nshc4Codec.DESERIALIZER_KEY);
250         registrator.unregisterMatchEntrySerializer(TunIpv4DstCodec.SERIALIZER_KEY);
251         registrator.unregisterMatchEntryDeserializer(TunIpv4DstCodec.DESERIALIZER_KEY);
252         registrator.unregisterMatchEntrySerializer(TunIpv4SrcCodec.SERIALIZER_KEY);
253         registrator.unregisterMatchEntryDeserializer(TunIpv4SrcCodec.DESERIALIZER_KEY);
254         registrator.unregisterMatchEntrySerializer(EncapEthTypeCodec.SERIALIZER_KEY);
255         registrator.unregisterMatchEntryDeserializer(EncapEthTypeCodec.DESERIALIZER_KEY);
256         registrator.unregisterMatchEntrySerializer(EncapEthSrcCodec.SERIALIZER_KEY);
257         registrator.unregisterMatchEntryDeserializer(EncapEthSrcCodec.DESERIALIZER_KEY);
258         registrator.unregisterMatchEntrySerializer(EncapEthDstCodec.SERIALIZER_KEY);
259         registrator.unregisterMatchEntryDeserializer(EncapEthDstCodec.DESERIALIZER_KEY);
260         registrator.unregisterMatchEntrySerializer(NshMdtypeCodec.SERIALIZER_KEY);
261         registrator.unregisterMatchEntryDeserializer(NshMdtypeCodec.DESERIALIZER_KEY);
262         registrator.unregisterMatchEntrySerializer(NshNpCodec.SERIALIZER_KEY);
263         registrator.unregisterMatchEntryDeserializer(NshNpCodec.DESERIALIZER_KEY);
264         registrator.unregisterMatchEntrySerializer(TunGpeNpCodec.SERIALIZER_KEY);
265         registrator.unregisterMatchEntryDeserializer(TunGpeNpCodec.DESERIALIZER_KEY);
266         registrator.unregisterMatchEntrySerializer(TcpSrcCodec.SERIALIZER_KEY);
267         registrator.unregisterMatchEntryDeserializer(TcpSrcCodec.DESERIALIZER_KEY);
268         registrator.unregisterMatchEntrySerializer(TcpDstCodec.SERIALIZER_KEY);
269         registrator.unregisterMatchEntryDeserializer(TcpDstCodec.DESERIALIZER_KEY);
270         registrator.unregisterMatchEntrySerializer(UdpSrcCodec.SERIALIZER_KEY);
271         registrator.unregisterMatchEntryDeserializer(UdpSrcCodec.DESERIALIZER_KEY);
272         registrator.unregisterMatchEntrySerializer(UdpDstCodec.SERIALIZER_KEY);
273         registrator.unregisterMatchEntryDeserializer(UdpDstCodec.DESERIALIZER_KEY);
274         registrator.unregisterMatchEntrySerializer(CtStateCodec.SERIALIZER_KEY);
275         registrator.unregisterMatchEntryDeserializer(CtStateCodec.DESERIALIZER_KEY);
276         registrator.unregisterMatchEntrySerializer(CtZoneCodec.SERIALIZER_KEY);
277         registrator.unregisterMatchEntryDeserializer(CtZoneCodec.DESERIALIZER_KEY);
278     }
279
280     @Override
281     public void close() throws Exception {
282         unregisterExtensions();
283     }
284
285 }