All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.weixinmp.outbound.passive.PassiveStringMessage Maven / Gradle / Ivy

The newest version!
package net.sf.weixinmp.outbound.passive;

import java.io.IOException;
import java.io.Writer;


import org.apache.log4j.Logger;

public class PassiveStringMessage implements PassiveMessage{
	private final static Logger LOGGER=Logger.getLogger(PassiveStringMessage.class);
	private String contentType;
	private String source;
	
	public PassiveStringMessage(String contentType, String source) {
		super();
		this.contentType = contentType;
		this.source = source;
	}

	public String getContentType() {
		return contentType;
	}

	public void write(Writer w) {
		try {
			LOGGER.debug(source);
			w.write(source);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public String toString() {
		return source;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy