Package org.kairosdb.metrics4j.sinks
Class TextSocketSink.TextSocket
- java.lang.Object
-
- org.kairosdb.metrics4j.sinks.TextSocketSink.TextSocket
-
- Direct Known Subclasses:
TextSocketSink.TCPTextSocket,TextSocketSink.UDPTextSocket
- Enclosing class:
- TextSocketSink
protected abstract class TextSocketSink.TextSocket extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_bufferSizeprotected Stringm_hostprotected intm_portprotected ByteArrayOutputStreamm_textBuffer
-
Constructor Summary
Constructors Modifier Constructor Description protectedTextSocket(String host, int port, int bufferSize)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()abstract voidconnect()abstract voidflush()voidsendText(String msg)
-
-
-
Field Detail
-
m_host
protected final String m_host
-
m_port
protected final int m_port
-
m_bufferSize
protected final int m_bufferSize
-
m_textBuffer
protected final ByteArrayOutputStream m_textBuffer
-
-
Constructor Detail
-
TextSocket
protected TextSocket(String host, int port, int bufferSize)
-
-
Method Detail
-
sendText
public void sendText(String msg)
-
flush
public abstract void flush() throws IOException- Throws:
IOException
-
connect
public abstract void connect() throws IOException- Throws:
IOException
-
close
public abstract void close() throws IOException- Throws:
IOException
-
-