kg.apc.perfmon.client
Interface Transport

All Known Implementing Classes:
AbstractTransport

public interface Transport

Interface delcares client capabilities. PerfMon clients must implement it.

Author:
undera
See Also:
TransportFactory

Method Summary
 void disconnect()
          Disconnects client from server agent
 String getAddressLabel()
          Returns address string if one was set by setAddressLabel
 String readln()
          Basic primitive for reading server agent output
 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
 void writeln(String line)
          Basic agent communication primitive, send one command string
 

Method Detail

disconnect

void disconnect()
Disconnects client from server agent


readMetrics

String[] readMetrics()
Method to be used after startWithMetrics Returns array containing collected metric values

Returns:
metric values

readln

String readln()
Basic primitive for reading server agent output

Returns:
next line read from the agent

setInterval

void setInterval(long interval)
Sets metrics collection interval

Parameters:
interval -

shutdownAgent

void shutdownAgent()
Commands server agent to close all connections and shutdown the process


startWithMetrics

void startWithMetrics(String[] metricsArray)
                      throws IOException
Asks agent to start metrics transmission.

Parameters:
metricsArray - String array containing metric description
Throws:
IOException

test

boolean test()
Method to test if transport connection established with applicable server agent

Returns:
success

writeln

void writeln(String line)
             throws IOException
Basic agent communication primitive, send one command string

Parameters:
line - command string to send
Throws:
IOException

getAddressLabel

String getAddressLabel()
Returns address string if one was set by setAddressLabel

Returns:
address string

setAddressLabel

void setAddressLabel(String label)
Set connected address string to be used in labels, since SocketAddress does not provide any info.

Parameters:
label - the label to set


Copyright © 2013. All Rights Reserved.