--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bgp-bmp-spi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2015 Cisco Systems, Inc. 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
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+ <parent>
+ <groupId>org.opendaylight.bgpcep</groupId>
+ <artifactId>bgp-parent</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>bgp-bmp-spi</artifactId>
+ <description>BMP SPI</description>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+ <prerequisites>
+ <maven>3.0.4</maven>
+ </prerequisites>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>bgp-bmp-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>bgp-parser-spi</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.parser;
+
+
+public class BmpDeserializationException extends Exception {
+
+ private static final long serialVersionUID = -7486453568941661756L;
+
+ /**
+ * Creates new BmpDeserializationException with specific error message.
+ * @param message message bound with this exception
+ */
+ public BmpDeserializationException(final String message) {
+ super(message, null);
+ }
+ /**
+ * @param message message bound with this exception
+ * @param cause cause for the error
+ */
+ public BmpDeserializationException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.parser;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.yangtools.yang.binding.Notification;
+
+public interface BmpMessageParser {
+
+ Notification parseMessage(final ByteBuf bytes) throws BmpDeserializationException;
+
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.parser;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.yangtools.yang.binding.Notification;
+
+public interface BmpMessageSerializer {
+
+ void serializeMessage(final Notification message, final ByteBuf buffer);
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.parser;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev150512.Tlv;
+
+public interface BmpTlvParser {
+
+ Tlv parseTlv(ByteBuf buffer) throws BmpDeserializationException ;
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.parser;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev150512.Tlv;
+
+public interface BmpTlvSerializer {
+
+ void serializeTlv(Tlv tlv, ByteBuf output);
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+public interface BmpExtensionConsumerContext {
+
+ BmpMessageRegistry getBmpMessageRegistry();
+
+ BmpTlvRegistry getBmpStatisticsTlvRegistry();
+
+ BmpTlvRegistry getBmpInitiationTlvRegistry();
+
+ BmpTlvRegistry getBmpTerminationTlvRegistry();
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+public interface BmpExtensionProviderActivator {
+
+ void start(BmpExtensionProviderContext context);
+
+ void stop();
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+import org.opendaylight.protocol.bmp.spi.parser.BmpTlvParser;
+import org.opendaylight.protocol.bmp.spi.parser.BmpTlvSerializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev150512.Tlv;
+
+public interface BmpExtensionProviderContext extends BmpMessageRegistrator, BmpExtensionConsumerContext {
+
+ AutoCloseable registerBmpStatisticsTlvParser(int tlvType, BmpTlvParser parser);
+
+ AutoCloseable registerBmpStatisticsTlvSerializer(Class<? extends Tlv> tlvClass, BmpTlvSerializer serializer);
+
+ AutoCloseable registerBmpInitiationTlvParser(int tlvType, BmpTlvParser parser);
+
+ AutoCloseable registerBmpInitiationTlvSerializer(Class<? extends Tlv> tlvClass, BmpTlvSerializer serializer);
+
+ AutoCloseable registerBmpTerminationTlvParser(int tlvType, BmpTlvParser parser);
+
+ AutoCloseable registerBmpTerminationTlvSerializer(Class<? extends Tlv> tlvClass, BmpTlvSerializer serializer);
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+import org.opendaylight.protocol.bmp.spi.parser.BmpMessageParser;
+import org.opendaylight.protocol.bmp.spi.parser.BmpMessageSerializer;
+import org.opendaylight.yangtools.yang.binding.Notification;
+
+public interface BmpMessageRegistrator {
+
+ AutoCloseable registerBmpMessageParser(int messageType, BmpMessageParser parser);
+
+ AutoCloseable registerBmpMessageSerializer(Class<? extends Notification> messageClass, BmpMessageSerializer serializer);
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+import org.opendaylight.protocol.bmp.spi.parser.BmpMessageParser;
+import org.opendaylight.protocol.bmp.spi.parser.BmpMessageSerializer;
+
+public interface BmpMessageRegistry extends BmpMessageSerializer, BmpMessageParser, BmpMessageRegistrator {
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+import org.opendaylight.protocol.bmp.spi.parser.BmpTlvParser;
+import org.opendaylight.protocol.bmp.spi.parser.BmpTlvSerializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev150512.Tlv;
+
+public interface BmpTlvRegistrator {
+
+ AutoCloseable registerBmpTlvParser(int tlvType, BmpTlvParser parser);
+
+ AutoCloseable registerBmpTlvSerializer(Class<? extends Tlv> tlvClass, BmpTlvSerializer serializer);
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. 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.protocol.bmp.spi.registry;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.protocol.bmp.spi.parser.BmpDeserializationException;
+import org.opendaylight.protocol.bmp.spi.parser.BmpTlvSerializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev150512.Tlv;
+
+public interface BmpTlvRegistry extends BmpTlvSerializer, BmpTlvRegistrator {
+
+ Tlv parseTlv(int tlvType, ByteBuf buffer) throws BmpDeserializationException ;
+
+}
<module>topology-provider</module>
<module>util</module>
<module>bmp-api</module>
+ <module>bmp-spi</module>
<module>controller-config</module>
-
</modules>
</project>