Remove yang-test
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / ServiceReferenceWritableRegistry.java
1 /*
2  * Copyright (c) 2013, 2017 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;
9
10 import javax.management.InstanceNotFoundException;
11 import javax.management.ObjectName;
12
13 public interface ServiceReferenceWritableRegistry extends ServiceReferenceReadableRegistry {
14     /**
15      * Create or update reference name to objectName. Reference name is unique per
16      * service interface name.
17      *
18      * @return created or updated object name containing service name and reference
19      *         name
20      * @throws IllegalArgumentException
21      *             if there is a mismatch between serviceInterfaceName and
22      *             objectName
23      * @throws InstanceNotFoundException
24      *             if search did not find exactly one instance
25      */
26     ObjectName saveServiceReference(String serviceInterfaceName, String refName, ObjectName moduleON)
27             throws InstanceNotFoundException;
28
29     /**
30      * Remove service reference.
31      *
32      * @throws IllegalArgumentException
33      *             if service interface name is not advertised by any module
34      */
35     void removeServiceReference(String serviceInterfaceName, String refName) throws InstanceNotFoundException;
36
37     /**
38      * Remove all service references.
39      */
40     void removeAllServiceReferences();
41
42     /**
43      * Remove all service references attached to given module.
44      *
45      * @return true iif at least one reference was removed
46      */
47     boolean removeServiceReferences(ObjectName objectName) throws InstanceNotFoundException;
48 }