From c0b3177eaa7dc9bc1dda567ba0553238e821dd3a Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 27 Nov 2013 16:22:32 +0100 Subject: [PATCH] Remove defunct OSGi activators Change-Id: I87c52e39ed763b093c959e20a85bcbbb127aa6cb Signed-off-by: Robert Varga --- pcep/spi/pom.xml | 7 - ...actOSGiPCEPExtensionConsumerActivator.java | 37 ------ ...actOSGiPCEPExtensionProviderActivator.java | 37 ------ .../OSGiPCEPExtensionConsumerContext.java | 70 ---------- .../OSGiPCEPExtensionProviderContext.java | 124 ------------------ 5 files changed, 275 deletions(-) delete mode 100644 pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionConsumerActivator.java delete mode 100644 pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionProviderActivator.java delete mode 100644 pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionConsumerContext.java delete mode 100644 pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionProviderContext.java diff --git a/pcep/spi/pom.xml b/pcep/spi/pom.xml index 1e9eda0e9d..a90f1fb069 100644 --- a/pcep/spi/pom.xml +++ b/pcep/spi/pom.xml @@ -34,12 +34,6 @@ slf4j-api - - - org.osgi - org.osgi.core - - junit @@ -63,7 +57,6 @@ ${project.groupId}.${project.artifactId} org.opendaylight.protocol.pcep.spi, - org.opendaylight.protocol.pcep.spi.osgi, org.opendaylight.protocol.pcep.spi.pojo, 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 index b1230c7561..0000000000 --- a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionConsumerActivator.java +++ /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 index f59071a1ed..0000000000 --- a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/AbstractOSGiPCEPExtensionProviderActivator.java +++ /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 index 80b2891266..0000000000 --- a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionConsumerContext.java +++ /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 index ea09c49672..0000000000 --- a/pcep/spi/src/main/java/org/opendaylight/protocol/pcep/spi/osgi/OSGiPCEPExtensionProviderContext.java +++ /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 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 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 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 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 subobjectClass, - final RROSubobjectSerializer serializer) { - // TODO Auto-generated method stub - return null; - } - - @Override - public AutoCloseable registerTlvSerializer(final Class 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 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; - } -} -- 2.36.6