import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class ReadService implements IReadService, CommandProvider, IPluginOutReadService {
protected static final Logger logger = LoggerFactory.getLogger(ReadService.class);
- private ConcurrentHashMap<String, IPluginInReadService> pluginReader;
- private Set<IReadServiceListener> readerListeners;
+ private ConcurrentHashMap<String, IPluginInReadService> pluginReader =
+ new ConcurrentHashMap<String, IPluginInReadService>();
+ private Set<IReadServiceListener> readerListeners =
+ new CopyOnWriteArraySet<IReadServiceListener>();
/**
* Function called by the dependency manager when all the required
*
*/
void init() {
- pluginReader = new ConcurrentHashMap<String, IPluginInReadService>();
- readerListeners = new CopyOnWriteArraySet<IReadServiceListener>();
}
/**
// In case of plugin disactivating make sure we clear the
// dependencies
this.pluginReader.clear();
+ this.readerListeners.clear();
}
/**
}
}
logger.warn("Plugin {} unavailable", node.getType());
- return null;
+ return Collections.emptyList();
}
@Override
}
}
logger.warn("Plugin {} unavailable", node.getType());
- return null;
+ return Collections.emptyList();
}
@Override
}
}
logger.warn("Plugin {} unavailable", node.getType());
- return null;
+ return Collections.emptyList();
}
@Override
}
}
logger.warn("Plugin {} unavailable", node.getType());
- return null;
+ return Collections.emptyList();
}
}
}
logger.warn("Plugin {} unavailable", node.getType());
- return null;
+ return Collections.emptyList();
}
@Override