
com.windowsazure.samples.internal.queue.PutMessageDOMBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jpa4azure Show documentation
Show all versions of jpa4azure Show documentation
jpa4azure, implements a subset of the JPA specification using Azure Storage for pesisting beans. see http://jpa4azure.codeplex.com for more information.
package com.windowsazure.samples.internal.queue;
import com.windowsazure.samples.internal.util.Base64;
import com.windowsazure.samples.internal.xml.AzureDOMBuilder;
import com.windowsazure.samples.internal.xml.XmlNode;
public final class PutMessageDOMBuilder extends AzureDOMBuilder {
public PutMessageDOMBuilder(String messageContent) {
this.messageContent = messageContent;
}
@Override
protected void buildDOM() {
String base64MessageText = new String(Base64.encode(messageContent.getBytes()));
XmlNode queueMessageNode = addRootNode("QueueMessage");
addTextNode(queueMessageNode, "MessageText" , base64MessageText);
}
private String messageContent;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy