public class ConfigRegistryJMXClient extends Object implements ConfigRegistryClient
OBJECT_NAME, OBJECT_NAME_NO_NOTIFICATIONS
Constructor and Description |
---|
ConfigRegistryJMXClient(MBeanServer configMBeanServer) |
Modifier and Type | Method and Description |
---|---|
ObjectName |
beginConfig()
Opens new configuration transaction.
|
void |
checkConfigBeanExists(ObjectName objectName)
Check that object name corresponds with existing module.
|
void |
checkServiceReferenceExists(ObjectName objectName) |
CommitStatus |
commitConfig(ObjectName transactionControllerON)
Verifies and commits transaction.
|
ConfigTransactionJMXClient |
createTransaction() |
static ConfigRegistryJMXClient |
createWithoutNotifications(MBeanServer configMBeanServer) |
Object |
getAttributeCurrentValue(ObjectName on,
String attributeName) |
Set<String> |
getAvailableModuleFactoryQNames()
Get the qNames of all ModuleFactory instances in the system.
|
Set<String> |
getAvailableModuleNames()
Get the module names available in the system.
|
ConfigTransactionJMXClient |
getConfigTransactionClient(ObjectName objectName) |
ConfigTransactionJMXClient |
getConfigTransactionClient(String transactionName) |
List<ObjectName> |
getOpenConfigs()
List of open configuration transactions.
|
String |
getServiceInterfaceName(String namespace,
String localName)
Get the name of the service interface.
|
Map<String,Map<String,ObjectName>> |
getServiceMapping()
Get mapping of services to reference names and module object names.
|
ObjectName |
getServiceReference(String serviceInterfaceQName,
String refName)
Get the reference to that service.
|
long |
getVersion() |
Object |
invokeMethod(ObjectName on,
String name,
Object[] params,
String[] signature) |
boolean |
isHealthy()
Will return true unless there was a transaction that succeeded during
validation but failed in second phase of commit.
|
ObjectName |
lookupConfigBean(String moduleName,
String instanceName)
Find read module.
|
ObjectName |
lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName,
String refName)
Lookup object name by fully qualified service interface name and service
reference name.
|
Set<ObjectName> |
lookupConfigBeans()
Find all modules.
|
Set<ObjectName> |
lookupConfigBeans(String moduleName)
Find modules with given module name.
|
Set<ObjectName> |
lookupConfigBeans(String moduleName,
String instanceName)
Find read modules.
|
Set<ObjectName> |
lookupRuntimeBeans()
Find all runtime beans.
|
Set<ObjectName> |
lookupRuntimeBeans(String ifcName,
String instanceName)
Find all runtime of specified module.
|
Set<String> |
lookupServiceInterfaceNames(ObjectName objectName)
Find all available service interface names of a module.
|
Map<String,ObjectName> |
lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName)
Get current mapping between reference names and module object names for given
service interface name.
|
<T> T |
newMBeanProxy(ObjectName on,
Class<T> clazz)
Deprecated.
|
<T> T |
newMXBeanProxy(ObjectName on,
Class<T> clazz) |
public ConfigRegistryJMXClient(MBeanServer configMBeanServer)
public static ConfigRegistryJMXClient createWithoutNotifications(MBeanServer configMBeanServer)
public ConfigTransactionJMXClient createTransaction()
createTransaction
in interface ConfigRegistryClient
public ConfigTransactionJMXClient getConfigTransactionClient(String transactionName)
getConfigTransactionClient
in interface ConfigRegistryClient
public ConfigTransactionJMXClient getConfigTransactionClient(ObjectName objectName)
getConfigTransactionClient
in interface ConfigRegistryClient
@Deprecated public <T> T newMBeanProxy(ObjectName on, Class<T> clazz)
newMXBeanProxy(javax.management.ObjectName, Class)
or JMX.newMBeanProxy(javax.management.MBeanServerConnection, javax.management.ObjectName, Class)
This method will be removed soon.public <T> T newMXBeanProxy(ObjectName on, Class<T> clazz)
public ObjectName beginConfig()
ConfigRegistry
beginConfig
in interface ConfigRegistry
ObjectName
of
ConfigTransactionControllerMXBean
public CommitStatus commitConfig(ObjectName transactionControllerON) throws ConflictingVersionException, ValidationException
ConfigRegistry
commitConfig
in interface ConfigRegistry
transactionControllerON
- ObjectName
of
ConfigTransactionControllerMXBean
that was received in ConfigRegistry.beginConfig()
method call.ConflictingVersionException
- if configuration state was changedValidationException
- if validation failspublic List<ObjectName> getOpenConfigs()
ConfigRegistry
getOpenConfigs
in interface ConfigRegistry
public long getVersion()
getVersion
in interface ConfigRegistryClient
public Set<String> getAvailableModuleNames()
ConfigRegistry
getAvailableModuleNames
in interface ConfigRegistry
public boolean isHealthy()
ConfigRegistry
isHealthy
in interface ConfigRegistry
public Set<ObjectName> lookupConfigBeans()
LookupRegistry
lookupConfigBeans
in interface LookupRegistry
public Set<ObjectName> lookupConfigBeans(String moduleName)
LookupRegistry
lookupConfigBeans
in interface LookupRegistry
moduleName
- name of modulepublic Set<ObjectName> lookupConfigBeans(String moduleName, String instanceName)
LookupRegistry
lookupConfigBeans
in interface LookupRegistry
moduleName
- exact match for searched module name, can contain '*' to match all
values.instanceName
- exact match for searched instance name, can contain '*' to match
all values.public ObjectName lookupConfigBean(String moduleName, String instanceName) throws InstanceNotFoundException
LookupRegistry
lookupConfigBean
in interface LookupRegistry
moduleName
- exact match for searched module name, can contain '*' to match all
values.instanceName
- exact match for searched instance name, can contain '*' to match
all values.InstanceNotFoundException
- if search did not find exactly one instancepublic Set<ObjectName> lookupRuntimeBeans()
LookupRegistry
lookupRuntimeBeans
in interface LookupRegistry
public Set<ObjectName> lookupRuntimeBeans(String ifcName, String instanceName)
LookupRegistry
lookupRuntimeBeans
in interface LookupRegistry
ifcName
- of beaninstanceName
- of beanpublic void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException
LookupRegistry
checkConfigBeanExists
in interface LookupRegistry
InstanceNotFoundException
- if search did not find exactly one instancepublic ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName)
ServiceReferenceReadableRegistry
lookupConfigBeanByServiceInterfaceName
in interface ServiceReferenceReadableRegistry
serviceInterfaceQName
- service interface namerefName
- service reference name supplied in
.api .ConfigTransactionController#saveServiceReference(String, String, javax.management.ObjectName)
public Map<String,Map<String,ObjectName>> getServiceMapping()
ServiceReferenceReadableRegistry
getServiceMapping
in interface ServiceReferenceReadableRegistry
public Map<String,ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName)
ServiceReferenceReadableRegistry
lookupServiceReferencesByServiceInterfaceName
in interface ServiceReferenceReadableRegistry
serviceInterfaceQName
- service interface namepublic Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException
ServiceReferenceReadableRegistry
lookupServiceInterfaceNames
in interface ServiceReferenceReadableRegistry
objectName
- module object nameInstanceNotFoundException
- if search did not find exactly one instancepublic String getServiceInterfaceName(String namespace, String localName)
ServiceReferenceReadableRegistry
getServiceInterfaceName
in interface ServiceReferenceReadableRegistry
namespace
- service interface namespacelocalName
- service interface local namepublic Object invokeMethod(ObjectName on, String name, Object[] params, String[] signature)
invokeMethod
in interface ConfigRegistryClient
public Object getAttributeCurrentValue(ObjectName on, String attributeName)
getAttributeCurrentValue
in interface BeanReader
public Set<String> getAvailableModuleFactoryQNames()
LookupRegistry
getAvailableModuleFactoryQNames
in interface LookupRegistry
public ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException
ServiceReferenceReadableRegistry
getServiceReference
in interface ServiceReferenceReadableRegistry
.config .api.ServiceReferenceWritableRegistry#saveServiceReference(String,
String, javax.management.ObjectName)
InstanceNotFoundException
public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException
checkServiceReferenceExists
in interface ServiceReferenceReadableRegistry
InstanceNotFoundException
Copyright © 2019 OpenDaylight. All rights reserved.