Package org.jmxtrans.agent.zabbix
Class ZabbixTcpOutputWriter
java.lang.Object
org.jmxtrans.agent.AbstractOutputWriter
org.jmxtrans.agent.zabbix.ZabbixTcpOutputWriter
- All Implemented Interfaces:
OutputWriter
public class ZabbixTcpOutputWriter extends AbstractOutputWriter implements OutputWriter
- Author:
- Steve McDuff
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLISstatic intSETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS_DEFAULT_VALUEprotected HostAndPortzabbixServerHostAndPortFields inherited from class org.jmxtrans.agent.AbstractOutputWriter
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE -
Constructor Summary
Constructors Constructor Description ZabbixTcpOutputWriter() -
Method Summary
Modifier and Type Method Description voidpostCollect()called after a serie of writes, typically at the end of a collection.voidpostConstruct(java.util.Map<java.lang.String,java.lang.String> settings)voidpreDestroy()java.lang.StringtoString()voidwriteInvocationResult(java.lang.String invocationName, java.lang.Object value)protected voidwriteMessage(byte[] data)voidwriteQueryResult(java.lang.String metricName, java.lang.String type, java.lang.Object value)Methods inherited from class org.jmxtrans.agent.AbstractOutputWriter
getDebugLevel, getInfoLevel, getTraceLevel, preCollectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jmxtrans.agent.OutputWriter
preCollect
-
Field Details
-
SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS
public static final java.lang.String SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS- See Also:
- Constant Field Values
-
SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS_DEFAULT_VALUE
public static final int SETTING_SOCKET_CONNECT_TIMEOUT_IN_MILLIS_DEFAULT_VALUE- See Also:
- Constant Field Values
-
zabbixServerHostAndPort
-
-
Constructor Details
-
ZabbixTcpOutputWriter
public ZabbixTcpOutputWriter()
-
-
Method Details
-
postConstruct
public void postConstruct(java.util.Map<java.lang.String,java.lang.String> settings)- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
writeInvocationResult
public void writeInvocationResult(@Nonnull java.lang.String invocationName, @Nullable java.lang.Object value) throws java.io.IOException- Specified by:
writeInvocationResultin interfaceOutputWriter- Specified by:
writeInvocationResultin classAbstractOutputWriter- Throws:
java.io.IOException
-
writeQueryResult
public void writeQueryResult(@Nonnull java.lang.String metricName, @Nullable java.lang.String type, @Nullable java.lang.Object value) throws java.io.IOException- Specified by:
writeQueryResultin interfaceOutputWriter- Specified by:
writeQueryResultin classAbstractOutputWritertype- seeQuery.type- Throws:
java.io.IOException
-
writeMessage
protected void writeMessage(byte[] data) throws java.io.IOException- Throws:
java.io.IOException
-
postCollect
public void postCollect() throws java.io.IOExceptionDescription copied from interface:OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
- Specified by:
postCollectin interfaceOutputWriter- Overrides:
postCollectin classAbstractOutputWriter- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
preDestroy
public void preDestroy()- Specified by:
preDestroyin interfaceOutputWriter- Overrides:
preDestroyin classAbstractOutputWriter
-