Initial code drop of yang model driven configuration system
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / annotations / RequireInterface.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 import javax.management.ObjectName;
16
17 /**
18  * Indicates what service interface is expected to be obtained as a dependency
19  * of a module. This annotation must be present for each dependency setter in
20  * {@link org.opendaylight.controller.config.spi.Module} M(X)Bean interface.
21  * Together with name of dependent bean the {@link #value()} will be used to get
22  * {@link ObjectName} of dependency.
23  *
24  * <p>
25  * Example:<br>
26  *
27  * <code>
28  *
29  * @RequireInterface(value = ThreadPoolServiceInterface.class, optional =
30  *                         false)<br/> void setThreadPool(ObjectName on);
31  *                         </code>
32  */
33 @Retention(RetentionPolicy.RUNTIME)
34 @Target(ElementType.METHOD)
35 public @interface RequireInterface {
36
37     /**
38      * Declares dependency on service interface.
39      */
40     Class<? extends AbstractServiceInterface> value();
41
42 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.