class RemoteChunkingManagerParser extends AbstractBeanDefinitionParser {

	private static final String MESSAGE_TEMPLATE_ATTRIBUTE = "message-template";

	private static final String STEP_ATTRIBUTE = "step";

	private static final String REPLY_CHANNEL_ATTRIBUTE = "reply-channel";

	private static final String MESSAGING_OPERATIONS_PROPERTY = "messagingOperations";

	private static final String REPLY_CHANNEL_PROPERTY = "replyChannel";

	private static final String CHUNK_WRITER_PROPERTY = "chunkWriter";

	private static final String STEP_PROPERTY = "step";

	private static final String CHUNK_HANDLER_BEAN_NAME_PREFIX = "remoteChunkHandlerFactoryBean_";

	@Override
	public AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {<FILL_FUNCTION_BODY>}

}

		String id = element.getAttribute(ID_ATTRIBUTE);
		Assert.hasText(id, "The id attribute must be specified");

		String messageTemplate = element.getAttribute(MESSAGE_TEMPLATE_ATTRIBUTE);
		Assert.hasText(messageTemplate, "The message-template attribute must be specified");

		String step = element.getAttribute(STEP_ATTRIBUTE);
		Assert.hasText(step, "The step attribute must be specified");

		String replyChannel = element.getAttribute(REPLY_CHANNEL_ATTRIBUTE);
		Assert.hasText(replyChannel, "The reply-channel attribute must be specified");

		BeanDefinitionRegistry beanDefinitionRegistry = parserContext.getRegistry();

		BeanDefinition chunkMessageChannelItemWriter = BeanDefinitionBuilder
			.genericBeanDefinition(ChunkMessageChannelItemWriter.class)
			.addPropertyReference(MESSAGING_OPERATIONS_PROPERTY, messageTemplate)
			.addPropertyReference(REPLY_CHANNEL_PROPERTY, replyChannel)
			.getBeanDefinition();

		beanDefinitionRegistry.registerBeanDefinition(id, chunkMessageChannelItemWriter);

		BeanDefinition remoteChunkHandlerFactoryBean = BeanDefinitionBuilder
			.genericBeanDefinition(RemoteChunkHandlerFactoryBean.class)
			.addPropertyValue(CHUNK_WRITER_PROPERTY, chunkMessageChannelItemWriter)
			.addPropertyValue(STEP_PROPERTY, step)
			.getBeanDefinition();

		beanDefinitionRegistry.registerBeanDefinition(CHUNK_HANDLER_BEAN_NAME_PREFIX + step,
				remoteChunkHandlerFactoryBean);

		return null;
	
<methods>public void <init>() ,public final org.springframework.beans.factory.config.BeanDefinition parse(org.w3c.dom.Element, org.springframework.beans.factory.xml.ParserContext) <variables>public static final java.lang.String ID_ATTRIBUTE,public static final java.lang.String NAME_ATTRIBUTE