org.apache.felix.cm.impl
Class ConfigurationImpl

java.lang.Object
  extended by org.apache.felix.cm.impl.ConfigurationImpl

public class ConfigurationImpl
extends java.lang.Object

The ConfigurationImpl is the backend implementation of the Configuration Admin Service Specification Configuration object (section 104.4). Instances of this class are shared by multiple instances of the ConfigurationAdapter class, whose instances are actually returned to clients.


Method Summary
 void delete()
           
 boolean equals(java.lang.Object obj)
           
 TargetedPID getFactoryPid()
           
 java.lang.String getFactoryPidString()
           
 TargetedPID getPid()
           
 java.lang.String getPidString()
           
 java.util.Dictionary getProperties(boolean deepCopy)
          Returns an optionally deep copy of the properties of this configuration instance.
 long getRevision()
          Returns the revision of this configuration object.
 int hashCode()
           
protected static void replaceProperty(java.util.Dictionary properties, java.lang.String key, java.lang.String value)
           
 java.lang.String toString()
           
 void update()
           
 void update(java.util.Dictionary properties)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

delete

public void delete()
            throws java.io.IOException
Throws:
java.io.IOException

getPidString

public java.lang.String getPidString()

getPid

public TargetedPID getPid()

getFactoryPidString

public java.lang.String getFactoryPidString()

getFactoryPid

public TargetedPID getFactoryPid()

getProperties

public java.util.Dictionary getProperties(boolean deepCopy)
Returns an optionally deep copy of the properties of this configuration instance.

This method returns a copy of the internal dictionary. If the deepCopy parameter is true array and collection values are copied into new arrays or collections. Otherwise just a new dictionary referring to the same objects is returned.

Parameters:
deepCopy - true if a deep copy is to be returned.
Returns:

update

public void update()
            throws java.io.IOException
Throws:
java.io.IOException

update

public void update(java.util.Dictionary properties)
            throws java.io.IOException
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRevision

public long getRevision()
Returns the revision of this configuration object.

When getting both the configuration properties and this revision counter, the two calls should be synchronized on this instance to ensure configuration values and revision counter match.


replaceProperty

protected static void replaceProperty(java.util.Dictionary properties,
                                      java.lang.String key,
                                      java.lang.String value)


Copyright © 2012 FuseSource, Corp.. All Rights Reserved.