org.osgi.jmx.compendium
Interface ConfigAdminManagerMBean


public interface ConfigAdminManagerMBean

Author:
Hal Hildebrand Date: Dec 2, 2008 Time: 2:41:26 PM This MBean provides the management interface to the OSGi Configuration Administration Service.

Method Summary
 void addProperty(java.lang.String pid, java.lang.String name, java.lang.String value, java.lang.String type)
          Add or update the property for the configuration identified by the supplied pid
 void addProperty(java.lang.String pid, java.lang.String location, java.lang.String name, java.lang.String value, java.lang.String type)
          Add or update the property for the configuration identified by the supplied pid and location
 void addPropertyToConfigurations(java.lang.String filter, java.lang.String name, java.lang.String value, java.lang.String type)
          Add or update the property on all configurations matching the supplied filter
 java.lang.String createFactoryConfiguration(java.lang.String factoryPid)
          Create a new configuration instance for the supplied persistent id of the factory, answering the pid of the created configuration
 java.lang.String createFactoryConfiguration(java.lang.String factoryPid, java.lang.String location)
          Creae a factory configuration for the supplied persistent id of the factory and the bundle location bound to bind the created configuration to, answering the pid of the created configuration
 void delete(java.lang.String pid)
          Delete the configuration
 void delete(java.lang.String pid, java.lang.String location)
          Delete the configuration
 void deleteConfigurations(java.lang.String filter)
          Delete the configurations matching the filter spec
 void deleteProperty(java.lang.String pid, java.lang.String key)
          Delete the property from the configuration
 void deleteProperty(java.lang.String pid, java.lang.String location, java.lang.String key)
          Delete the property from the configuration
 void deletePropertyFromConfigurations(java.lang.String filter, java.lang.String key)
          Remove the property from all configurations matching the supplied filter
 java.lang.String getBundleLocation(java.lang.String pid)
          Answer the bundle location the configuration is bound to
 java.lang.String getFactoryPid(java.lang.String pid)
          Answer the factory pid if the configuration is a factory configuration, null otherwise.
 java.lang.String getFactoryPid(java.lang.String pid, java.lang.String location)
          Answer the factory pid if the configuration is a factory configuration, null otherwise.
 javax.management.openmbean.TabularData getProperties(java.lang.String pid)
          Answer the credentials of the configuration
 javax.management.openmbean.TabularData getProperties(java.lang.String pid, java.lang.String location)
          Answer the credentials of the configuration
 java.lang.String[][] listConfigurations(java.lang.String filter)
          Answer the list of PID/Location pairs of the configurations managed by this service
 void setBundleLocation(java.lang.String pid, java.lang.String location)
          Set the bundle location the configuration is bound to
 void update(java.lang.String pid, java.lang.String location, javax.management.openmbean.TabularData properties)
          Update the configuration with the supplied properties For each propery entry, the following row is supplied
 void update(java.lang.String pid, javax.management.openmbean.TabularData properties)
          Update the configuration with the supplied properties For each propery entry, the following row is supplied
 

Method Detail

addProperty

void addProperty(java.lang.String pid,
                 java.lang.String name,
                 java.lang.String value,
                 java.lang.String type)
                 throws java.io.IOException
Add or update the property for the configuration identified by the supplied pid

Parameters:
pid - the persistent id of the configuration
name - - the property key to add or update
value - - the string encoded property value to add or update
type - - the type of the property
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the filter is invalid

addProperty

void addProperty(java.lang.String pid,
                 java.lang.String location,
                 java.lang.String name,
                 java.lang.String value,
                 java.lang.String type)
                 throws java.io.IOException
Add or update the property for the configuration identified by the supplied pid and location

Parameters:
pid - the persistent id of the configuration
location - - the bundle location
name - - the property key to add or update
value - - the string encoded property value to add or update
type - - the type of the property
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the filter is invalid

addPropertyToConfigurations

void addPropertyToConfigurations(java.lang.String filter,
                                 java.lang.String name,
                                 java.lang.String value,
                                 java.lang.String type)
                                 throws java.io.IOException
Add or update the property on all configurations matching the supplied filter

Parameters:
filter - the string representation of the org.osgi.framework.Filter
name - - the property key to add or update
value - - the string encoded property value to add or update
type - - the type of the property
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the filter is invalid

createFactoryConfiguration

java.lang.String createFactoryConfiguration(java.lang.String factoryPid)
                                            throws java.io.IOException
Create a new configuration instance for the supplied persistent id of the factory, answering the pid of the created configuration

Parameters:
factoryPid - - the persistent id of the factory
Returns:
the pid of the created configuation
Throws:
java.io.IOException - if the operation failed

createFactoryConfiguration

java.lang.String createFactoryConfiguration(java.lang.String factoryPid,
                                            java.lang.String location)
                                            throws java.io.IOException
Creae a factory configuration for the supplied persistent id of the factory and the bundle location bound to bind the created configuration to, answering the pid of the created configuration

Parameters:
factoryPid - - the persistent id of the factory
location - - the bundle location
Returns:
the pid of the created configuation
Throws:
java.io.IOException - if the operation failed

delete

void delete(java.lang.String pid)
            throws java.io.IOException
Delete the configuration

Parameters:
pid - - the persistent identifier of the configuration
Throws:
java.io.IOException - if the operation fails

delete

void delete(java.lang.String pid,
            java.lang.String location)
            throws java.io.IOException
Delete the configuration

Parameters:
pid - - the persistent identifier of the configuration
location - - the bundle location
Throws:
java.io.IOException - if the operation fails

deleteConfigurations

void deleteConfigurations(java.lang.String filter)
                          throws java.io.IOException
Delete the configurations matching the filter spec

Parameters:
filter - the string representation of the org.osgi.framework.Filter
Throws:
java.io.IOException - if the operation failed
java.lang.IllegalArgumentException - if the filter is invalid

deleteProperty

void deleteProperty(java.lang.String pid,
                    java.lang.String key)
                    throws java.io.IOException
Delete the property from the configuration

Parameters:
pid - - the persistent identifier of the configuration
key - the property
Throws:
java.io.IOException - if the operation fails

deleteProperty

void deleteProperty(java.lang.String pid,
                    java.lang.String location,
                    java.lang.String key)
                    throws java.io.IOException
Delete the property from the configuration

Parameters:
pid - - the persistent identifier of the configuration
location - - the bundle location
key - the property
Throws:
java.io.IOException - if the operation fails

deletePropertyFromConfigurations

void deletePropertyFromConfigurations(java.lang.String filter,
                                      java.lang.String key)
                                      throws java.io.IOException
Remove the property from all configurations matching the supplied filter

Parameters:
filter - the string representation of the org.osgi.framework.Filter
key - the property key to be removed
Throws:
java.io.IOException - if the operation fails
java.lang.IllegalArgumentException - if the filter is invalid

getBundleLocation

java.lang.String getBundleLocation(java.lang.String pid)
                                   throws java.io.IOException
Answer the bundle location the configuration is bound to

Parameters:
pid - - the persistent identifier of the configuration
Returns:
the bundle location
Throws:
java.io.IOException - if the operation fails

getFactoryPid

java.lang.String getFactoryPid(java.lang.String pid)
                               throws java.io.IOException
Answer the factory pid if the configuration is a factory configuration, null otherwise.

Parameters:
pid - - the persistent identifier of the configuration
Returns:
the factory pid
Throws:
java.io.IOException - if the operation fails

getFactoryPid

java.lang.String getFactoryPid(java.lang.String pid,
                               java.lang.String location)
                               throws java.io.IOException
Answer the factory pid if the configuration is a factory configuration, null otherwise.

Parameters:
pid - - the persistent identifier of the configuration
location - - the bundle location
Returns:
the factory pid
Throws:
java.io.IOException - if the operation fails

getProperties

javax.management.openmbean.TabularData getProperties(java.lang.String pid)
                                                     throws java.io.IOException
Answer the credentials of the configuration

Parameters:
pid - - the persistent identifier of the configuration
Returns:
the table of credentials
Throws:
java.io.IOException - if the operation fails
See Also:
for the details of the TabularType

For each propery entry, the following row is returned

  • Property Key - the string key
  • Property Value - the stringified version of the property value
  • Property Value Type - the type of the property value

getProperties

javax.management.openmbean.TabularData getProperties(java.lang.String pid,
                                                     java.lang.String location)
                                                     throws java.io.IOException
Answer the credentials of the configuration

Parameters:
pid - - the persistent identifier of the configuration
location - - the bundle location
Returns:
the table of credentials
Throws:
java.io.IOException - if the operation fails
See Also:
for the details of the TabularType

For each propery entry, the following row is returned

  • Property Key - the string key
  • Property Value - the stringified version of the property value
  • Property Value Type - the type of the property value

listConfigurations

java.lang.String[][] listConfigurations(java.lang.String filter)
                                        throws java.io.IOException
Answer the list of PID/Location pairs of the configurations managed by this service

Parameters:
filter - the string representation of the org.osgi.framework.Filter
Returns:
the list of configuration PID/Location pairs
Throws:
java.io.IOException - if the operation failed
java.lang.IllegalArgumentException - if the filter is invalid

setBundleLocation

void setBundleLocation(java.lang.String pid,
                       java.lang.String location)
                       throws java.io.IOException
Set the bundle location the configuration is bound to

Parameters:
pid - - the persistent identifier of the configuration
location - - the bundle location
Throws:
java.io.IOException - if the operation fails

update

void update(java.lang.String pid,
            javax.management.openmbean.TabularData properties)
            throws java.io.IOException
Update the configuration with the supplied properties For each propery entry, the following row is supplied

Parameters:
pid - - the persistent identifier of the configuration
properties - - the table of properties
Throws:
java.io.IOException - if the operation fails
See Also:
for the details of the TabularType

  • Property Key - the string key
  • Property Value - the stringified version of the property value
  • Property Value Type - the type of the property value

update

void update(java.lang.String pid,
            java.lang.String location,
            javax.management.openmbean.TabularData properties)
            throws java.io.IOException
Update the configuration with the supplied properties For each propery entry, the following row is supplied

Parameters:
pid - - the persistent identifier of the configuration
location - - the bundle location
properties - - the table of properties
Throws:
java.io.IOException - if the operation fails
See Also:
for the details of the TabularType

  • Property Key - the string key
  • Property Value - the stringified version of the property value
  • Property Value Type - the type of the property value


Copyright © 2009. All Rights Reserved.