@Override
	public StreamDefinitionResource createStream(String name, String definition, boolean deploy) {
		MultiValueMap<String, Object> values = new LinkedMultiValueMap<String, Object>();
		values.add("name", name);
		values.add("definition", definition);
		values.add("deploy", Boolean.toString(deploy));

		StreamDefinitionResource stream = restTemplate.postForObject(resources.get("streams/definitions").expand(),
				values,
				StreamDefinitionResource.class);
		return stream;
	}
Implementation of the Stream-related part of the API.

@author Eric Bottard
@author Ilayaperumal Gopinathan
@author Paul Harris
@author Gary Russell
spring-xd-rest-client/src/main/java/org/springframework/xd/rest/client/impl/StreamTemplate.java