Merge "Remove defunct OSGi activators"
authorDana Kutenicsova <dkutenic@cisco.com>
Wed, 27 Nov 2013 16:12:41 +0000 (16:12 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 27 Nov 2013 16:12:41 +0000 (16:12 +0000)
pcep/spi/pom.xml
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionConsumerActivator.java [deleted file]
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionProviderActivator.java [deleted file]
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionConsumerContext.java [deleted file]
pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionProviderContext.java [deleted file]

index 1e9eda0e9da6760bc62d3ecc36c9aa475b24ee13..a90f1fb06948349022463d841a2df718ede3c057 100644 (file)
                        <artifactId>slf4j-api</artifactId>
         </dependency>
 
-        <!-- FIXME: move into pcep-spi-osgi -->
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.core</artifactId>
-        </dependency>
-
         <!-- Testing dependencies -->
         <dependency>
             <groupId>junit</groupId>
@@ -63,7 +57,6 @@
                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            org.opendaylight.protocol.pcep.spi,
-                           org.opendaylight.protocol.pcep.spi.osgi,
                            org.opendaylight.protocol.pcep.spi.pojo,
                        </Export-Package>
                    </instructions>
diff --git a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionConsumerActivator.java b/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionConsumerActivator.java
deleted file mode 100644 (file)
index b1230c7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2013 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.pcep.spi.osgi;
-
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionConsumerActivator;
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionConsumerContext;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-import com.google.common.base.Preconditions;
-
-public abstract class AbstractOSGiPCEPExtensionConsumerActivator implements BundleActivator, PCEPExtensionConsumerActivator {
-       private PCEPExtensionConsumerContext consumerContext;
-
-       @Override
-       public final void start(final BundleContext context) throws Exception {
-               Preconditions.checkState(consumerContext == null);
-               final PCEPExtensionConsumerContext consumerContext = new OSGiPCEPExtensionConsumerContext(context);
-               start(consumerContext);
-               this.consumerContext = consumerContext;
-       }
-
-       @Override
-       public final void stop(final BundleContext context) throws Exception {
-               Preconditions.checkState(consumerContext != null);
-               try {
-                       stop();
-               } finally {
-                       consumerContext = null;
-               }
-       }
-}
diff --git a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionProviderActivator.java b/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionProviderActivator.java
deleted file mode 100644 (file)
index f59071a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2013 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.pcep.spi.osgi;
-
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator;
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-import com.google.common.base.Preconditions;
-
-public abstract class AbstractOSGiPCEPExtensionProviderActivator implements BundleActivator, PCEPExtensionProviderActivator {
-       private PCEPExtensionProviderContext providerContext;
-
-       @Override
-       public final void start(final BundleContext context) throws Exception {
-               Preconditions.checkState(providerContext == null);
-               final PCEPExtensionProviderContext providerContext = new OSGiPCEPExtensionProviderContext(context);
-               start(providerContext);
-               this.providerContext = providerContext;
-       }
-
-       @Override
-       public final void stop(final BundleContext context) throws Exception {
-               Preconditions.checkState(providerContext != null);
-               try {
-                       stop();
-               } finally {
-                       providerContext = null;
-               }
-       }
-}
diff --git a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionConsumerContext.java b/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionConsumerContext.java
deleted file mode 100644 (file)
index 80b2891..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2013 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.pcep.spi.osgi;
-
-import org.opendaylight.protocol.pcep.spi.EROSubobjectHandlerRegistry;
-import org.opendaylight.protocol.pcep.spi.LabelHandlerRegistry;
-import org.opendaylight.protocol.pcep.spi.MessageHandlerRegistry;
-import org.opendaylight.protocol.pcep.spi.ObjectHandlerRegistry;
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionConsumerContext;
-import org.opendaylight.protocol.pcep.spi.RROSubobjectHandlerRegistry;
-import org.opendaylight.protocol.pcep.spi.TlvHandlerRegistry;
-import org.opendaylight.protocol.pcep.spi.XROSubobjectHandlerRegistry;
-import org.osgi.framework.BundleContext;
-
-import com.google.common.base.Preconditions;
-
-class OSGiPCEPExtensionConsumerContext implements PCEPExtensionConsumerContext {
-       protected final BundleContext bundleContext;
-
-       public OSGiPCEPExtensionConsumerContext(final BundleContext context) {
-               this.bundleContext = Preconditions.checkNotNull(context);
-       }
-
-       @Override
-       public LabelHandlerRegistry getLabelHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public MessageHandlerRegistry getMessageHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public ObjectHandlerRegistry getObjectHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public EROSubobjectHandlerRegistry getEROSubobjectHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public RROSubobjectHandlerRegistry getRROSubobjectHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public XROSubobjectHandlerRegistry getXROSubobjectHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public TlvHandlerRegistry getTlvHandlerRegistry() {
-               // TODO Auto-generated method stub
-               return null;
-       }
-}
diff --git a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionProviderContext.java b/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionProviderContext.java
deleted file mode 100644 (file)
index ea09c49..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2013 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.pcep.spi.osgi;
-
-import org.opendaylight.protocol.pcep.spi.EROSubobjectParser;
-import org.opendaylight.protocol.pcep.spi.EROSubobjectSerializer;
-import org.opendaylight.protocol.pcep.spi.LabelParser;
-import org.opendaylight.protocol.pcep.spi.LabelSerializer;
-import org.opendaylight.protocol.pcep.spi.MessageParser;
-import org.opendaylight.protocol.pcep.spi.MessageSerializer;
-import org.opendaylight.protocol.pcep.spi.ObjectParser;
-import org.opendaylight.protocol.pcep.spi.ObjectSerializer;
-import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
-import org.opendaylight.protocol.pcep.spi.RROSubobjectParser;
-import org.opendaylight.protocol.pcep.spi.RROSubobjectSerializer;
-import org.opendaylight.protocol.pcep.spi.TlvParser;
-import org.opendaylight.protocol.pcep.spi.TlvSerializer;
-import org.opendaylight.protocol.pcep.spi.XROSubobjectParser;
-import org.opendaylight.protocol.pcep.spi.XROSubobjectSerializer;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.SubobjectType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.label.subobject.LabelType;
-import org.osgi.framework.BundleContext;
-
-class OSGiPCEPExtensionProviderContext extends OSGiPCEPExtensionConsumerContext implements PCEPExtensionProviderContext {
-       OSGiPCEPExtensionProviderContext(final BundleContext context) {
-               super(context);
-       }
-
-       @Override
-       public AutoCloseable registerLabelSerializer(final Class<? extends LabelType> labelClass, final LabelSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerLabelParser(final int cType, final LabelParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerEROSubobjectParser(final int subobjectType, final EROSubobjectParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerEROSubobjectSerializer(final Class<? extends SubobjectType> subobjectClass,
-                       final EROSubobjectSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerMessageParser(final int messageType, final MessageParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerMessageSerializer(final Class<? extends Message> msgClass, final MessageSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerObjectParser(final int objectClass, final int objectType, final ObjectParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerObjectSerializer(final Class<? extends Object> objClass, final ObjectSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerRROSubobjectParser(final int subobjectType, final RROSubobjectParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerRROSubobjectSerializer(
-                       final Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.SubobjectType> subobjectClass,
-                       final RROSubobjectSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerTlvSerializer(final Class<? extends Tlv> tlvClass, final TlvSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerTlvParser(final int tlvType, final TlvParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerXROSubobjectSerializer(final Class<? extends SubobjectType> subobjectClass,
-                       final XROSubobjectSerializer serializer) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-
-       @Override
-       public AutoCloseable registerXROSubobjectParser(final int subobjectType, final XROSubobjectParser parser) {
-               // TODO Auto-generated method stub
-               return null;
-       }
-}