@@ -0,0 +1,1670 @@
+package com.vmware.loginsight.send;%0A%0Aimport java.util.List;%0A%0Apublic class LogUploadClient %7B%0A%09public final String url;%0A%09public final int port;%0A%09public final LogInsigntProtocol proto;%0A%0A%09public LogUploadClient(String url, int port, LogInsigntProtocol proto) %7B%0A%09%09this.url = url;%0A%09%09this.port = port;%0A%09%09this.proto = proto;%0A%09%09%0A%09%09assert (!proto.equals(LogInsigntProtocol.UNKNOWN));%0A%09%7D%0A%09%0A%09private LogUploadClientReturnStatus sendMessageBySyslog(String msg, List%3CField%3E fields, List%3CString%3E filters) %7B%0A%09%09return null;%0A%09%7D%0A%09%0A%09private LogUploadClientReturnStatus sendMessageByHttp(String msg, List%3CField%3E fields, List%3CString%3E filters) %7B%0A%09%09return null;%0A%09%7D%0A%0A%09public LogUploadClientReturnStatus sendMessage(String msg, List%3CField%3E fields, List%3CString%3E filters) %7B%0A%09%09assert (msg != null);%0A%09%09assert (fields != null);%0A%09%09%0A%09%09if (proto.isSyslog()) %7B%0A%09%09%09return sendMessageBySyslog(msg, fields, filters);%0A%09%09%7D else %7B%0A%09%09%09return sendMessageByHttp(msg, fields, filters);%0A%09%09%7D%09%0A%09%7D%0A%0A%09public enum LogInsigntProtocol %7B%0A%09%09SYSLOG_TCP(1), SYSLOG_UDP(2), SYSLOG_TLS(3), HTTP(4),%0A%0A%09%09UNKNOWN(0);%0A%0A%09%09private int value;%0A%0A%09%09private LogInsigntProtocol(int value) %7B%0A%09%09%09this.value = value;%0A%09%09%7D%0A%0A%09%09public int getValue() %7B%0A%09%09%09return value;%0A%09%09%7D%0A%0A%09%09public boolean isSyslog() %7B%0A%09%09%09return (this.equals(SYSLOG_TCP) %7C%7C this.equals(SYSLOG_UDP) %7C%7C this%0A%09%09%09%09%09.equals(SYSLOG_TLS));%0A%09%09%7D%0A%09%7D%0A%09%0A%09public enum LogUploadClientReturnStatus %7B%0A%09%09FAIL(-1),%0A%09%09SUCCESS(1);%0A%09%09%0A%09%09int value;%0A%09%09private LogUploadClientReturnStatus(int value) %7B%0A%09%09%09this.value = value;%0A%09%09%7D%0A%09%09%0A%09%7D%0A%0A%09public static class Field %7B%0A%09%09public String key;%0A%09%09public String value;%0A%0A%09%09public Field(String key, String value) %7B%0A%09%09%09this.key = key;%0A%09%09%09this.value = value;%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add LogInsightClient.java as a starting point of message sending library