2 * Copyright (c) 2019 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
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
8 package org.opendaylight.openflowjava.eric;
10 import static java.util.Objects.requireNonNull;
12 import org.opendaylight.openflowjava.eric.api.EricExtensionCodecRegistrator;
13 import org.opendaylight.openflowjava.eric.codec.match.Icmpv6NDOptionsTypeCodec;
14 import org.opendaylight.openflowjava.eric.codec.match.Icmpv6NDReservedCodec;
16 public class EricExtensionsRegistrator implements AutoCloseable {
17 private final EricExtensionCodecRegistrator registrator;
19 public EricExtensionsRegistrator(final EricExtensionCodecRegistrator registrator) {
20 this.registrator = requireNonNull(registrator);
21 registrator.registerMatchEntrySerializer(Icmpv6NDReservedCodec.SERIALIZER_KEY,
22 Icmpv6NDReservedCodec.INSTANCE);
23 registrator.registerMatchEntrySerializer(Icmpv6NDOptionsTypeCodec.SERIALIZER_KEY,
24 Icmpv6NDOptionsTypeCodec.INSTANCE);
25 registrator.registerMatchEntryDeserializer(Icmpv6NDReservedCodec.DESERIALIZER_KEY,
26 Icmpv6NDReservedCodec.INSTANCE);
27 registrator.registerMatchEntryDeserializer(Icmpv6NDOptionsTypeCodec.DESERIALIZER_KEY,
28 Icmpv6NDOptionsTypeCodec.INSTANCE);
33 registrator.unregisterMatchEntrySerializer(Icmpv6NDReservedCodec.SERIALIZER_KEY);
34 registrator.unregisterMatchEntrySerializer(Icmpv6NDOptionsTypeCodec.SERIALIZER_KEY);
35 registrator.unregisterMatchEntryDeserializer(Icmpv6NDReservedCodec.DESERIALIZER_KEY);
36 registrator.unregisterMatchEntryDeserializer(Icmpv6NDOptionsTypeCodec.DESERIALIZER_KEY);