@Override
	public List<ModuleDefinition> findDefinitions(ModuleType type) {
		List<ModuleDefinition> results = new ArrayList<>();
		String path = Paths.build(Paths.MODULES, type.toString());
		try {
			List<String> children = zooKeeperConnection.getClient().getChildren().forPath(path);
			for (String child : children) {
				byte[] data = zooKeeperConnection.getClient().getData().forPath(
						Paths.build(Paths.MODULES, type.toString(), child));
				// Check for data (only composed modules have definitions)
				if (data != null && data.length > 0) {
					ModuleDefinition composed = this.findDefinition(child, type);
					if (composed != null) {
						results.add(composed);
					}
					else {
						throw new NoSuchModuleException(child, type);
					}
				}
			}
		}
		catch (Exception e) {
			ZooKeeperUtils.wrapAndThrowIgnoring(e, KeeperException.NoNodeException.class);
		}
		return results;
	}
A reference to the main module registry (which also typically contains this registry as a delegate),
used to re-hydrate {@link org.springframework.xd.module.SimpleModuleDefinition}s with locations that
make sense on this runtime(admin or container).
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/store/ZooKeeperComposedModuleDefinitionRegistry.java