<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>
<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>
+++ /dev/null
-/*
- * 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;
- }
- }
-}
+++ /dev/null
-/*
- * 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;
- }
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}