X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fapi%2FDependencyResolver.java;h=e9b63e6f051b8564a948c7efaafd632d2a9e74b9;hp=466f1ed60cafdb1b40b1e4595e4aae57d76f42af;hb=f43b01b81319959b1907e3e04537f5169e7f33d8;hpb=d840c921a370f0704ba2d68faf4cfffda08c4440 diff --git a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java index 466f1ed60c..e9b63e6f05 100644 --- a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java +++ b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/DependencyResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 2017 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, @@ -26,72 +26,90 @@ import org.opendaylight.yangtools.yang.binding.BaseIdentity; public interface DependencyResolver extends Identifiable { /** - * To be used during validation phase to validate serice interface of - * dependent module. + * To be used during validation phase to validate service interface of dependent + * module. * - * @param expectedServiceInterface MBean/MXBean interface which will back the proxy object. - * @param objectName ObjectName of dependent module without transaction name - * (platformON). - * @param jmxAttribute for reporting - * @throws IllegalArgumentException when module is not found - * @throws IllegalStateException if module does not export this - * service interface. + * @param expectedServiceInterface + * MBean/MXBean interface which will back the proxy object. + * @param objectName + * ObjectName of dependent module without transaction name + * (platformON). + * @param jmxAttribute + * for reporting + * @throws IllegalArgumentException + * when module is not found + * @throws IllegalStateException + * if module does not export this service interface. */ - void validateDependency( - Class expectedServiceInterface, - ObjectName objectName, JmxAttribute jmxAttribute); + void validateDependency(Class expectedServiceInterface, ObjectName objectName, + JmxAttribute jmxAttribute); /** * To be used during commit phase to wire actual dependencies. * * @return dependency instance using - * {@link org.opendaylight.controller.config.spi.Module#getInstance()} - * @throws IllegalArgumentException when module is not found + * {@link org.opendaylight.controller.config.spi.Module#getInstance()} + * @throws IllegalArgumentException + * when module is not found */ - T resolveInstance(Class expectedType, ObjectName objectName, - JmxAttribute jmxAttribute); - + T resolveInstance(Class expectedType, ObjectName objectName, JmxAttribute jmxAttribute); /** * To be used during commit phase to resolve identity-ref config attributes. * * @return actual class object generated from identity */ - Class resolveIdentity(IdentityAttributeRef identityRef, Class expectedBaseClass); - + Class resolveIdentity(IdentityAttributeRef identityRef, + Class expectedBaseClass); /** * Validate identity-ref config attribute. */ - void validateIdentity(IdentityAttributeRef identityRef, Class expectedBaseClass, JmxAttribute jmxAttribute); + void validateIdentity(IdentityAttributeRef identityRef, Class expectedBaseClass, + JmxAttribute jmxAttribute); /** - * Can be used during validation or commit phase to get attribute value of dependent module. + * Can be used during validation or commit phase to get attribute value of + * dependent module. * - * @param name either direct ObjectName of a Module (type=Module) or service reference (type=ServiceReference) of dependent Module - * @param attribute String identifying attribute name in JMX. Note that attributes start with upper case. See {@link org.opendaylight.controller.config.api.JmxAttribute#getAttributeName()} + * @param name + * either direct ObjectName of a Module (type=Module) or service + * reference (type=ServiceReference) of dependent Module + * @param attribute + * String identifying attribute name in JMX. Note that attributes + * start with upper case. See + * {@link org.opendaylight.controller.config.api.JmxAttribute#getAttributeName()} */ Object getAttribute(ObjectName name, String attribute) - throws MBeanException, AttributeNotFoundException, - InstanceNotFoundException, ReflectionException; - + throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException; /** - * Helper method around {@link javax.management.JMX#newMXBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, Class)} }. - * Returns MXBean proxy for dependent module. Can be used during validation or commit phase to inspect dependent module's attributes. + * Helper method around. + * {@link javax.management + * .JMX#newMXBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, Class)}}. + * + * Returns MXBean proxy for dependent module. Can be used during validation or + * commit phase to inspect dependent module's attributes. * - * @param objectName either direct ObjectName of a Module (type=Module) or service reference (type=ServiceReference) of dependent Module - * @param interfaceClass MXBean interface to be used as a proxy - * @param type of proxy for type safe return value + * @param objectName + * either direct ObjectName of a Module (type=Module) or service + * reference (type=ServiceReference) of dependent Module + * @param interfaceClass + * MXBean interface to be used as a proxy + * @param + * type of proxy for type safe return value * @return instance of MXBean proxy */ T newMXBeanProxy(ObjectName objectName, Class interfaceClass); /** - * Check whether a dependency will be reused or (re)created. Useful when deciding if current module could be also reused. + * Check whether a dependency will be reused or (re)created. Useful when + * deciding if current module could be also reused. * - * @param objectName ObjectName ID of a dependency - * @param jmxAttribute JMXAttribute ID of a dependency + * @param objectName + * ObjectName ID of a dependency + * @param jmxAttribute + * JMXAttribute ID of a dependency * @return true if the dependency will be reused false otherwise */ boolean canReuseDependency(ObjectName objectName, JmxAttribute jmxAttribute);