org.altlinux.jabbix
Class JabbixWriter

java.lang.Object
  extended by org.altlinux.jabbix.JabbixWriter

public class JabbixWriter
extends Object

A stream writer implementing the base Jabbix protocol.

To send the messages the structured Zabbix protocol is used (see JabbixProtocol).

Author:
Paul Wolneykien
See Also:
JabbixReader

Constructor Summary
JabbixWriter(OutputStream out)
          Creates a writer for the given output stream.
 
Method Summary
 void writeMessage(String msg)
          Sends the given message using the Zabbix protocol.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabbixWriter

public JabbixWriter(OutputStream out)
Creates a writer for the given output stream.

Parameters:
out - the stream to write to
Method Detail

writeMessage

public void writeMessage(String msg)
                  throws IOException
Sends the given message using the Zabbix protocol. The length of the message is explicitly set in the header in accordance with the Zabbix protocol.

Parameters:
msg - message to send
Throws:
IOException - if an I/O exception occurred during the read operation
See Also:
JabbixProtocol.HEADER, JabbixReader.readMessage(boolean)