@Override
	public Stream findOne(String id) {
		CuratorFramework client = zkConnection.getClient();
		String path = Paths.build(Paths.STREAMS, id);
		try {
			Stat definitionStat = client.checkExists().forPath(path);
			if (definitionStat != null) {
				byte[] data = client.getData().forPath(path);
				Map<String, String> map = ZooKeeperUtils.bytesToMap(data);
				Stream stream = new Stream(new StreamDefinition(id, map.get("definition")));

				Stat deployStat = client.checkExists().forPath(Paths.build(Paths.STREAM_DEPLOYMENTS, id));
				if (deployStat != null) {
					stream.setStartedAt(new Date(deployStat.getCtime()));
					stream.setStatus(getDeploymentStatus(id));
					return stream;
				}
			}
		}
		catch (Exception e) {
			throw ZooKeeperUtils.wrapThrowable(e);
		}
		return null;
	}
Stream instance repository. It should only return values for Streams that are deployed.

@author Mark Fisher
@author Gunnar Hillert
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/zookeeper/ZooKeeperStreamRepository.java