Package net.aifusion.providers
Interface Provider
- All Superinterfaces:
CimEventGenerator
,Repository
- All Known Implementing Classes:
BasicProvider
,CimClient
Interface to define a CIM Provider. A Provider implements methods to get and set properties, invoke methods and
execute queries on objects held within it.
- Author:
- Sharad Singhal
-
Method Summary
Modifier and TypeMethodDescriptionexecuteQuery
(String query) Execute a query against this provider, and return the result setgetMethodNames
(ObjectPath path) Get the method names defined in a given CIM classgetMethodParameters
(ObjectPath path, String methodName) Get the parameter list associated with a methodgetMethodReturnType
(ObjectPath path, String methodName) Get the return type associated with a methodgetPropertyNames
(ObjectPath path) Get the property names for a given named element.getPropertyType
(ObjectPath path, String propertyName) Get the data type corresponding to a particular property (or enumeration key)getPropertyValue
(ObjectPath path, String propertyName) Get a property value from this provider, or one of its children.Get the underlying repository for this providergetURL()
Get the URL for this providerinvokeMethod
(ObjectPath path, String methodName, List<CimParameter> methodParameters) Invoke an extrinsic method on a class or instance within this provider, or one of its childrenvoid
registerChildProvider
(Provider child) Register a child provider with this provider.void
setPropertyValue
(ObjectPath path, String propertyName, DataValue propertyValue) Set a property value within this provider, or one of its childrenvoid
unregisterChildProvider
(Provider child) Unregister a child provider.Methods inherited from interface net.aifusion.metamodel.CimEventGenerator
addListener, hasListener, removeListener
Methods inherited from interface net.aifusion.metamodel.Repository
contains, delete, filter, get, getElements, getNameSpaces, put, shutdown
-
Method Details
-
registerChildProvider
Register a child provider with this provider. This enables this provider to dispatch queries to the child provider and and delegate selected queries to the child provider.- Parameters:
child
- - child provider to be registered with this provider
-
unregisterChildProvider
Unregister a child provider. This disconnects the child from this provider- Parameters:
child
- - child provider to be unregistered
-
getPropertyNames
Get the property names for a given named element. In case the objectPath is an enumeration, the key names are returned- Parameters:
path
- - object path for the CIM element from which property names are desired- Returns:
- - list containing names of the properties. Empty if none defined
-
getPropertyType
Get the data type corresponding to a particular property (or enumeration key)- Parameters:
path
- - object path of the CIM element from which the property is selectedpropertyName
- - name of the property or key- Returns:
- - DataType of the corresponding property or key
-
getPropertyValue
Get a property value from this provider, or one of its children.- Parameters:
path
- - object path of the CIM Element from which the property is being readpropertyName
- - case insensitive name of the property being read- Returns:
- - data value containing the property or key value
-
setPropertyValue
Set a property value within this provider, or one of its children- Parameters:
path
- - object path of the CIM Element in which the property is being set. Note that only Classes and Instances have settable propertiespropertyName
- - case insensitive name of the property being setpropertyValue
- - value of the property being set
-
getMethodNames
Get the method names defined in a given CIM class- Parameters:
path
- - object path for the CIM class from which method names are desired- Returns:
- - list containing method names. Empty if no methods are defined.
-
getMethodReturnType
Get the return type associated with a method- Parameters:
path
- - object path for the CIM class from which the method is selectedmethodName
- - name of the method- Returns:
- - data type associated with the method. Null if no such method exists
-
getMethodParameters
Get the parameter list associated with a method- Parameters:
path
- - object path of the CIM class from which the method is desiredmethodName
- - name of the method desired- Returns:
- - list of parameters. Empty if the method does not take parameters.
-
invokeMethod
Invoke an extrinsic method on a class or instance within this provider, or one of its children- Parameters:
path
- - object path of the CIM element on which the method is being invokedmethodName
- - case insensitive name of the method being invokedmethodParameters
- - list of parameters to be passed to the method- Returns:
- - value returned from the method invocation
-
executeQuery
Execute a query against this provider, and return the result set- Parameters:
query
- - query to be executed- Returns:
- - set of results
-
getRepository
Repository getRepository()Get the underlying repository for this provider- Returns:
- - reference to the underlying repository
-
getURL
URL getURL()Get the URL for this provider- Returns:
- - URL where this provider can be reached. Null if the provider is not network accessible
-