public interface DependencyResolver extends org.opendaylight.yangtools.concepts.Identifiable<ModuleIdentifier>
Module can receive
resolver from ModuleFactory
for looking up dependencies during validation and second phase commit.Module| Modifier and Type | Method and Description |
|---|---|
boolean |
canReuseDependency(ObjectName objectName,
JmxAttribute jmxAttribute)
Check whether a dependency will be reused or (re)created.
|
Object |
getAttribute(ObjectName name,
String attribute)
Can be used during validation or commit phase to get attribute value of dependent module.
|
<T> T |
newMXBeanProxy(ObjectName objectName,
Class<T> interfaceClass)
Helper method around
JMX.newMXBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, Class) }. |
<T extends BaseIdentity> |
resolveIdentity(IdentityAttributeRef identityRef,
Class<T> expectedBaseClass)
To be used during commit phase to resolve identity-ref config attributes.
|
<T> T |
resolveInstance(Class<T> expectedType,
ObjectName objectName,
JmxAttribute jmxAttribute)
To be used during commit phase to wire actual dependencies.
|
void |
validateDependency(Class<? extends AbstractServiceInterface> expectedServiceInterface,
ObjectName objectName,
JmxAttribute jmxAttribute)
To be used during validation phase to validate serice interface of
dependent module.
|
<T extends BaseIdentity> |
validateIdentity(IdentityAttributeRef identityRef,
Class<T> expectedBaseClass,
JmxAttribute jmxAttribute)
Validate identity-ref config attribute.
|
void validateDependency(Class<? extends AbstractServiceInterface> expectedServiceInterface, ObjectName objectName, JmxAttribute jmxAttribute)
expectedServiceInterface - MBean/MXBean interface which will back the proxy object.objectName - ObjectName of dependent module without transaction name
(platformON).jmxAttribute - for reportingIllegalArgumentException - when module is not foundIllegalStateException - if module does not export this
service interface.<T> T resolveInstance(Class<T> expectedType, ObjectName objectName, JmxAttribute jmxAttribute)
Module.getInstance()IllegalArgumentException - when module is not found<T extends BaseIdentity> Class<? extends T> resolveIdentity(IdentityAttributeRef identityRef, Class<T> expectedBaseClass)
<T extends BaseIdentity> void validateIdentity(IdentityAttributeRef identityRef, Class<T> expectedBaseClass, JmxAttribute jmxAttribute)
Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
name - either direct ObjectName of a Module (type=Module) or service reference (type=ServiceReference) of dependent Moduleattribute - String identifying attribute name in JMX. Note that attributes start with upper case. See JmxAttribute.getAttributeName()MBeanExceptionAttributeNotFoundExceptionInstanceNotFoundExceptionReflectionException<T> T newMXBeanProxy(ObjectName objectName, Class<T> interfaceClass)
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.T - type of proxy for type safe return valueobjectName - either direct ObjectName of a Module (type=Module) or service reference (type=ServiceReference) of dependent ModuleinterfaceClass - MXBean interface to be used as a proxyboolean canReuseDependency(ObjectName objectName, JmxAttribute jmxAttribute)
objectName - ObjectName ID of a dependencyjmxAttribute - JMXAttribute ID of a dependencyCopyright © 2017 OpenDaylight. All rights reserved.