@ThreadSafe public class DynamicWritableWrapper extends AbstractDynamicWrapper
Module
instance in a
DynamicMBean
interface. Inspects dependency attributes, identified by
ObjectName getter/setter and RequireInterface
annotation. Used to
simplify client calls - to set a dependency, only instance name is needed.
This class creates new writable String attribute for each dependency with
'Name' suffix backed by the actual ObjectName attribute.
Thread safety - setting attributes is synchronized on 'this'. Synchronization
of Module.validate()
and
Module.getInstance()
is also
guaranteed by
org.opendaylight.controller.config.manager.impl.ConfigTransactionControllerInternal
so the actual Module
needs not
to be thread safe.
attributeHolderMap, internalServer, module, moduleIdentifier, objectNameInternal
Constructor and Description |
---|
DynamicWritableWrapper(Module module,
ModuleIdentifier moduleIdentifier,
String transactionIdentifier,
ReadOnlyAtomicBoolean configBeanModificationDisabled,
MBeanServer internalServer,
MBeanServer configMBeanServer) |
Modifier and Type | Method and Description |
---|---|
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
void |
validate() |
equals, fixObjectName, getAttribute, getAttributes, getEmptyOperations, getMBeanInfo, hashCode
public DynamicWritableWrapper(Module module, ModuleIdentifier moduleIdentifier, String transactionIdentifier, ReadOnlyAtomicBoolean configBeanModificationDisabled, MBeanServer internalServer, MBeanServer configMBeanServer)
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
public AttributeList setAttributes(AttributeList attributes)
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
invoke
in class AbstractDynamicWrapper
MBeanException
ReflectionException
public void validate()
Copyright © 2019 OpenDaylight. All rights reserved.