use of org.apache.felix.dm.ResourceHandler in project felix by apache.
the class ResourceProvider method destroy.
public void destroy() {
Map<ResourceHandler, Filter> handlers = new HashMap<>();
synchronized (m_handlers) {
handlers.putAll(m_handlers);
}
for (Map.Entry<ResourceHandler, Filter> e : handlers.entrySet()) {
ResourceHandler handler = e.getKey();
Filter filter = e.getValue();
removeResources(handler, filter);
}
}
use of org.apache.felix.dm.ResourceHandler in project felix by apache.
the class ResourceProvider method change.
@SuppressWarnings("deprecation")
public void change(int resourceIndex) {
Map<ResourceHandler, Filter> handlers = new HashMap<>();
synchronized (m_handlers) {
handlers.putAll(m_handlers);
}
for (Map.Entry<ResourceHandler, Filter> e : handlers.entrySet()) {
ResourceHandler handler = e.getKey();
Filter filter = e.getValue();
if (filter == null || filter.match(ResourceUtil.createProperties(m_resources[resourceIndex]))) {
handler.changed(m_resources[resourceIndex]);
}
}
}
use of org.apache.felix.dm.ResourceHandler in project felix by apache.
the class ResourceProvider method destroy.
public void destroy() {
Map<ResourceHandler, Filter> handlers = new HashMap<>();
synchronized (m_handlers) {
handlers.putAll(m_handlers);
}
for (Map.Entry<ResourceHandler, Filter> e : handlers.entrySet()) {
ResourceHandler handler = e.getKey();
Filter filter = e.getValue();
removeResources(handler, filter);
}
}
use of org.apache.felix.dm.ResourceHandler in project felix by apache.
the class ResourceProvider method change.
@SuppressWarnings("deprecation")
public void change(int resourceIndex) {
Map<ResourceHandler, Filter> handlers = new HashMap<>();
synchronized (m_handlers) {
handlers.putAll(m_handlers);
}
for (Map.Entry<ResourceHandler, Filter> e : handlers.entrySet()) {
ResourceHandler handler = e.getKey();
Filter filter = e.getValue();
if (filter == null || filter.match(ResourceUtil.createProperties(m_resources[resourceIndex]))) {
handler.changed(m_resources[resourceIndex]);
}
}
}
use of org.apache.felix.dm.ResourceHandler in project felix by apache.
the class ResourceProvider method destroy.
public void destroy() {
Map<ResourceHandler, Filter> handlers = new HashMap<>();
synchronized (m_handlers) {
handlers.putAll(m_handlers);
}
for (Map.Entry<ResourceHandler, Filter> e : handlers.entrySet()) {
ResourceHandler handler = e.getKey();
Filter filter = e.getValue();
removeResources(handler, filter);
}
}
Aggregations