|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.cm.impl.ConfigurationAdapter
public class ConfigurationAdapter
The ConfigurationAdapter
is just an adapter to the internal
configuration object. Instances of this class are returned as Configuration
objects to the client, where each caller gets a fresh instance of this
class while internal Configuration objects are shared.
Method Summary | |
---|---|
void |
delete()
Delete this Configuration object. |
boolean |
equals(Object obj)
Equality is defined to have equal PIDs Two Configuration objects are equal when their PIDs are equal. |
String |
getBundleLocation()
Get the bundle location. |
String |
getFactoryPid()
For a factory configuration return the PID of the corresponding Managed Service Factory, else return null . |
String |
getPid()
Get the PID for this Configuration object. |
Dictionary |
getProperties()
Return the properties of this Configuration object. |
int |
hashCode()
Hash code is based on PID. |
void |
setBundleLocation(String bundleLocation)
Bind this Configuration object to the specified bundle
location. |
String |
toString()
|
void |
update()
Update the Configuration object with the current
properties. |
void |
update(Dictionary properties)
Update the properties of this Configuration object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public String getPid()
Configuration
Configuration
object.
getPid
in interface Configuration
Configuration
object.ConfigurationImpl.getPid()
public String getFactoryPid()
Configuration
null
.
getFactoryPid
in interface Configuration
null
ConfigurationImpl.getFactoryPid()
public String getBundleLocation()
Configuration
null
if it is not yet bound to a bundle location.
getBundleLocation
in interface Configuration
null
.ConfigurationBase.getBundleLocation()
public void setBundleLocation(String bundleLocation)
Configuration
Configuration
object to the specified bundle
location.
If the bundleLocation parameter is null
then the
Configuration
object will not be bound to a location. It
will be set to the bundle's location before the first time a Managed
Service/Managed Service Factory receives this Configuration
object via the updated method and before any plugins are called. The
bundle location will be set persistently.
setBundleLocation
in interface Configuration
bundleLocation
- org.apache.felix.cm.impl.ConfigurationImpl#setBundleLocation(java.lang.String)
public void update() throws IOException
Configuration
Configuration
object with the current
properties.
Initiate the updated
callback to the Managed Service or
Managed Service Factory with the current properties asynchronously.
This is the only way for a bundle that uses a Configuration Plugin
service to initiate a callback. For example, when that bundle detects a
change that requires an update of the Managed Service or Managed Service
Factory via its ConfigurationPlugin
object.
update
in interface Configuration
IOException
ConfigurationImpl.update()
public void update(Dictionary properties) throws IOException
Configuration
Configuration
object.
Stores the properties in persistent storage after adding or overwriting
the following properties:
String
.
If the corresponding Managed Service/Managed Service Factory is registered, its updated method must be called asynchronously. Else, this callback is delayed until aforementioned registration occurs.
Also initiates an asynchronous call to all
ConfigurationListener
s with a
ConfigurationEvent.CM_UPDATED
event.
update
in interface Configuration
properties
-
IOException
ConfigurationImpl.update(java.util.Dictionary)
public Dictionary getProperties()
Configuration
Configuration
object.
The Dictionary
object returned is a private copy for the
caller and may be changed without influencing the stored configuration.
The keys in the returned dictionary are case insensitive and are always
of type String
.
If called just after the configuration is created and before update has
been called, this method returns null
.
getProperties
in interface Configuration
null
. These properties must not contain the
"service.bundleLocation" property. The value of this property may
be obtained from the getBundleLocation
method.org.apache.felix.cm.impl.ConfigurationImpl#getProperties()
public void delete() throws IOException
Configuration
Configuration
object.
Removes this configuration object from the persistent store. Notify
asynchronously the corresponding Managed Service or Managed Service
Factory. A ManagedService
object is notified by a call to
its updated
method with a null
properties
argument. A ManagedServiceFactory
object is notified by a
call to its deleted
method.
Also initiates an asynchronous call to all
ConfigurationListener
s with a
ConfigurationEvent.CM_DELETED
event.
delete
in interface Configuration
IOException
ConfigurationImpl.delete()
public int hashCode()
Configuration
hashCode
in interface Configuration
hashCode
in class Object
ConfigurationImpl.hashCode()
public boolean equals(Object obj)
Configuration
equals
in interface Configuration
equals
in class Object
obj
-
true
if equal, false
if not a
Configuration
object or one with a different PID.ConfigurationImpl.equals(java.lang.Object)
public String toString()
toString
in class Object
ConfigurationImpl.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |