class FileSystemCallbackHandlerDao implements CallbackHandlerDao {

	@Override
	public List<PersistentFileHandler> findAll() {
		try (final Stream<Path> pathStream = Files.list(Paths.get(configuration.getHandlerDirectory()))) {
			return pathStream.map(this::toPersistentFileHandler)
					.filter(Optional::isPresent)
					.map(Optional::get)
					.collect(toList());
		} catch (IOException e) {
			log.error("Can not restore handlers due to: {}", e.getMessage(), e);
		}
		return Collections.emptyList();
	}

}