public class ElasticSearchDao extends Object
LogstashIndexerDao.IndexerType| Modifier and Type | Field and Description |
|---|---|
protected String |
host |
protected String |
key |
protected String |
password |
protected int |
port |
protected String |
username |
| Constructor and Description |
|---|
ElasticSearchDao(String host,
int port,
String key,
String username,
String password) |
| Modifier and Type | Method and Description |
|---|---|
net.sf.json.JSONObject |
buildPayload(BuildData buildData,
String jenkinsUrl,
List<String> logLines)
Builds a JSON payload compatible with the Logstash schema.
|
String |
getDescription() |
LogstashIndexerDao.IndexerType |
getIndexerType() |
void |
push(String data)
Sends the log data to the Logstash indexer.
|
protected final String host
protected final int port
protected final String key
protected final String username
protected final String password
public void push(String data) throws IOException
LogstashIndexerDaodata - The serialized data, not nullIOException - The data is not written to the serverpublic LogstashIndexerDao.IndexerType getIndexerType()
public net.sf.json.JSONObject buildPayload(BuildData buildData, String jenkinsUrl, List<String> logLines)
LogstashIndexerDaobuildPayload in interface LogstashIndexerDaobuildData - Metadata about the current build, not nulljenkinsUrl - The host name of the Jenkins instance, not nulllogLines - The log data to transmit, not nullpublic String getDescription()
getDescription in interface LogstashIndexerDaoCopyright © 2004-2016. All Rights Reserved.