2 * Copyright (c) 2014 Cisco Systems, Inc. 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.protocol.pcep.impl;
10 import java.util.ArrayList;
11 import java.util.List;
12 import org.opendaylight.protocol.pcep.impl.TestVendorInformationTlvParser.TestEnterpriseSpecificInformation;
13 import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
14 import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
15 import org.opendaylight.yangtools.concepts.Registration;
17 public class TestVendorInformationActivator extends AbstractPCEPExtensionProviderActivator {
19 protected List<Registration> startImpl(PCEPExtensionProviderContext context) {
20 final List<Registration> regs = new ArrayList<>();
21 final TestVendorInformationTlvParser parser = new TestVendorInformationTlvParser();
22 regs.add(context.registerVendorInformationTlvParser(parser.getEnterpriseNumber(), parser));
23 regs.add(context.registerVendorInformationTlvSerializer(TestEnterpriseSpecificInformation.class, parser));
25 // Vendor-information object registration
26 final TestVendorInformationObjectParser objParser = new TestVendorInformationObjectParser();
27 regs.add(context.registerVendorInformationObjectParser(parser.getEnterpriseNumber(), objParser));
28 regs.add(context.registerVendorInformationObjectSerializer(TestEnterpriseSpecificInformation.class, objParser));