f7b56fe4c2240c4b7ac80a54f7c372db6205b448
[controller.git] / opendaylight / config / config-api / src / main / java / org / opendaylight / controller / config / api / ServiceReferenceWritableRegistry.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;
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 service interface name.
16      * @return created or updated object name containing service name and reference name
17      * @throws IllegalArgumentException if there is a mismatch between serviceInterfaceName and objectName
18      * @throws InstanceNotFoundException if search did not find exactly one instance
19      */
20     ObjectName saveServiceReference(String serviceInterfaceName, String refName, ObjectName moduleON) throws InstanceNotFoundException;
21
22     /**
23      * Remove service reference.
24      * @throws IllegalArgumentException if service interface name is not advertised by any module
25      */
26     void removeServiceReference(String serviceInterfaceName, String refName) throws InstanceNotFoundException;
27
28     /**
29      * Remove all service references.
30      */
31     void removeAllServiceReferences();
32
33     /**
34      * Remove all service references attached to given module.
35      * @return true iif at least one reference was removed
36      */
37     boolean removeServiceReferences(ObjectName objectName) throws InstanceNotFoundException;
38 }

©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.