public class SourceManager extends java.lang.Object implements ContextListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SOURCE_NAME
Source Name service property.
|
Constructor and Description |
---|
SourceManager(java.lang.String sources,
java.lang.String depfilter,
DependencyModel dependency,
CompositeManager manager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
getProperties(java.lang.String str)
Compute the properties (${name}) from the given filter.
|
int |
getState()
Get the state of this source manager.
|
void |
start()
Start the context management.
|
void |
stop()
Stop the context management.
|
static java.lang.String |
substitute(java.lang.String str,
java.util.Dictionary values)
This method substitute ${var} substring by values stored in a map.
|
void |
update(ContextSource source,
java.lang.String property,
java.lang.Object value)
A context source has modified a monitored property.
|
public static final java.lang.String SOURCE_NAME
public SourceManager(java.lang.String sources, java.lang.String depfilter, DependencyModel dependency, CompositeManager manager) throws ConfigurationException
sources
- : context-source attribute from the dependency metadatadepfilter
- : original dependency filterdependency
- : dependency objectmanager
- : composite managerConfigurationException
- : the sources are incorrect.public void start()
public void stop()
public int getState()
public static java.lang.String substitute(java.lang.String str, java.util.Dictionary values)
str
- : string with variablesvalues
- : dictionary containing the variable name and the value.public static java.lang.String[] getProperties(java.lang.String str)
str
- : string form of the filter.public void update(ContextSource source, java.lang.String property, java.lang.Object value)
update
in interface ContextListener
source
- : sourceproperty
- : modified propertyvalue
- : new value.ContextListener.update(org.apache.felix.ipojo.ContextSource, java.lang.String, java.lang.Object)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.