|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkg.apc.perfmon.client.AbstractTransport
public abstract class AbstractTransport
Class that solved most of communication tasks for Transport interface and only readln() and writeln() methods left to be implemented
Transport| Field Summary | |
|---|---|
protected PipedInputStream |
pis
|
protected PipedOutputStream |
pos
|
| Constructor Summary | |
|---|---|
AbstractTransport()
|
|
| Method Summary | |
|---|---|
void |
disconnect()
Disconnects client from server agent |
String |
getAddressLabel()
Returns address string if one was set by setAddressLabel |
protected String |
getNextLine(int newlineCount)
Method retrieves next line from received bytes sequence |
String[] |
readMetrics()
Method to be used after startWithMetrics Returns array containing collected metric values |
void |
setAddressLabel(String label)
Set connected address string to be used in labels, since SocketAddress does not provide any info. |
void |
setInterval(long interval)
Sets metrics collection interval |
void |
shutdownAgent()
Commands server agent to close all connections and shutdown the process |
void |
startWithMetrics(String[] metricsArray)
Asks agent to start metrics transmission. |
boolean |
test()
Method to test if transport connection established with applicable server agent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface kg.apc.perfmon.client.Transport |
|---|
readln, writeln |
| Field Detail |
|---|
protected final PipedOutputStream pos
protected final PipedInputStream pis
| Constructor Detail |
|---|
public AbstractTransport()
throws IOException
IOException| Method Detail |
|---|
public String[] readMetrics()
Transport
readMetrics in interface Transportpublic void setInterval(long interval)
Transport
setInterval in interface Transportpublic void shutdownAgent()
Transport
shutdownAgent in interface Transport
public void startWithMetrics(String[] metricsArray)
throws IOException
Transport
startWithMetrics in interface TransportmetricsArray - String array containing metric description
IOExceptionpublic void disconnect()
Transport
disconnect in interface Transportpublic boolean test()
Transport
test in interface Transport
protected String getNextLine(int newlineCount)
throws IOException
newlineCount -
IOExceptionpublic String getAddressLabel()
Transport
getAddressLabel in interface Transportpublic void setAddressLabel(String label)
Transport
setAddressLabel in interface Transportlabel - the label to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||