// Path: src/main/java/edu/sjsu/mithai/export/ExportMessage.java
// public class ExportMessage implements Serializable {
// 
//     //TODO in future we may need to add fields to this.
// 
//     protected final String message;
// 
//     public  ExportMessage(String message) {
//         this.message = message;
//     }
// 
//     public String getMessage() {
//         return message;
//     }
// 
//     @Override
//     public String toString() {
//         return "ExportMessage{" +
//                 "message:" + message +
//                 '}';
//     }
// }
// 
// Path: src/main/java/edu/sjsu/mithai/export/HttpExportMessage.java
// public class HttpExportMessage extends ExportMessage {
// 
//     private String uri;
// 
//     public HttpExportMessage(String message, String uri) {
//         super(message);
//         this.uri = uri;
//     }
// 
//     public String getUri() {
//         return uri;
//     }
// 
//     @Override
//     public String toString() {
//         return "HttpExportMessage{" +
//                 "uri='" + uri + '\'' +
//                 "message=" + message + '\'' +
//                 '}';
//     }
// }
// 
// Path: src/main/java/edu/sjsu/mithai/export/IExporter.java
// public interface IExporter<T> {
// 
//     void setup() throws Exception;
// 
//     void send(T message) throws IOException;
// 
//     void tearDown() throws IOException;
// 
// }


import edu.sjsu.mithai.export.ExportMessage;
import edu.sjsu.mithai.export.HttpExportMessage;
import edu.sjsu.mithai.export.IExporter;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
package edu.sjsu.mithai.export.http;



public class HttpExporter implements IExporter<ExportMessage> {

    private CloseableHttpClient client;

    public HttpExporter() {
    }

    @Override
    public void setup() throws Exception {
        this.client = HttpClients.createDefault();
    }

    @Override
    public void send(ExportMessage message) throws IOException {

// Path: src/main/java/edu/sjsu/mithai/export/ExportMessage.java
// public class ExportMessage implements Serializable {
// 
//     //TODO in future we may need to add fields to this.
// 
//     protected final String message;
// 
//     public  ExportMessage(String message) {
//         this.message = message;
//     }
// 
//     public String getMessage() {
//         return message;
//     }
// 
//     @Override
//     public String toString() {
//         return "ExportMessage{" +
//                 "message:" + message +
//                 '}';
//     }
// }
// 
// Path: src/main/java/edu/sjsu/mithai/export/HttpExportMessage.java
// public class HttpExportMessage extends ExportMessage {
// 
//     private String uri;
// 
//     public HttpExportMessage(String message, String uri) {
//         super(message);
//         this.uri = uri;
//     }
// 
//     public String getUri() {
//         return uri;
//     }
// 
//     @Override
//     public String toString() {
//         return "HttpExportMessage{" +
//                 "uri='" + uri + '\'' +
//                 "message=" + message + '\'' +
//                 '}';
//     }
// }
// 
// Path: src/main/java/edu/sjsu/mithai/export/IExporter.java
// public interface IExporter<T> {
// 
//     void setup() throws Exception;
// 
//     void send(T message) throws IOException;
// 
//     void tearDown() throws IOException;
// 
// }


// Path: src/main/java/edu/sjsu/mithai/export/http/HttpExporter.java
import edu.sjsu.mithai.export.ExportMessage;
import edu.sjsu.mithai.export.HttpExportMessage;
import edu.sjsu.mithai.export.IExporter;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.IOException;

package edu.sjsu.mithai.export.http;



public class HttpExporter implements IExporter<ExportMessage> {

    private CloseableHttpClient client;

    public HttpExporter() {
    }

    @Override
    public void setup() throws Exception {
        this.client = HttpClients.createDefault();
    }

    @Override
    public void send(ExportMessage message) throws IOException {

        if (message instanceof HttpExportMessage) {