e66de46520a11741e42c4cf72049ff6d18d2b0df
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / annotations / ServiceInterfaceAnnotation.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.config.api.annotations;
9
10 import java.lang.annotation.ElementType;
11 import java.lang.annotation.Retention;
12 import java.lang.annotation.RetentionPolicy;
13 import java.lang.annotation.Target;
14
15 /**
16  * Marks an interface implemented by
17  * {@link org.opendaylight.controller.config.spi.Module} as a Service Interface.
18  * Each service interface is identified by globally unique and human readable
19  * name. By convention the name is all lower case without spaces.
20  */
21 @Retention(RetentionPolicy.RUNTIME)
22 @Target(ElementType.TYPE)
23 public @interface ServiceInterfaceAnnotation {
24
25     /**
26      * Fully qualified name of a service that must be globally unique.
27      * When generating service interfaces from yang, this will be QName of
28      * identity extending service-type.
29      */
30     String value();
31
32     /**
33      * Mandatory class which will be used as key for OSGi service registration
34      * once {@link org.opendaylight.controller.config.spi.Module#getInstance()}
35      * is called.
36      */
37     Class<?> osgiRegistrationType();
38
39     /**
40      * Get namespace of {@link #value()}
41      */
42     String namespace();
43
44     /**
45      * Get revision of {@link #value()}
46      */
47     String revision();
48
49     /**
50      * Get local name of {@link #value()}
51      */
52     String localName();
53 }