kg.apc.perfmon
Class PerfMonWorker

java.lang.Object
  extended by kg.apc.perfmon.PerfMonWorker
All Implemented Interfaces:
Runnable

public class PerfMonWorker
extends Object
implements Runnable

Author:
undera

Constructor Summary
PerfMonWorker()
           
 
Method Summary
protected  void connectUDPClient(SocketAddress remoteAddr, DatagramChannel channel, PerfMonMetricGetter getter)
           
 int getExitCode()
           
 boolean isFinished()
           
 void logSysInfo()
           
 void logVersion()
           
 void notifyDisonnected()
           
 void processCommands()
           
 void registerWritingChannel(SelectableChannel channel, PerfMonMetricGetter worker)
           
 void run()
           
 void sendToClient(SelectableChannel channel, ByteBuffer buf)
           
 void setAutoShutdown()
           
 void setInterval(long parseInt)
           
 void setTCPPort(int parseInt)
           
 void setUDPPort(int parseInt)
           
 void shutdownConnections()
           
 void startAcceptingCommands()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfMonWorker

public PerfMonWorker()
              throws IOException
Throws:
IOException
Method Detail

setTCPPort

public void setTCPPort(int parseInt)

setUDPPort

public void setUDPPort(int parseInt)

isFinished

public boolean isFinished()

processCommands

public void processCommands()
                     throws IOException
Throws:
IOException

getExitCode

public int getExitCode()

startAcceptingCommands

public void startAcceptingCommands()

shutdownConnections

public void shutdownConnections()
                         throws IOException
Throws:
IOException

run

public void run()
Specified by:
run in interface Runnable

registerWritingChannel

public void registerWritingChannel(SelectableChannel channel,
                                   PerfMonMetricGetter worker)
                            throws ClosedChannelException
Throws:
ClosedChannelException

setInterval

public void setInterval(long parseInt)

logVersion

public void logVersion()

logSysInfo

public void logSysInfo()

setAutoShutdown

public void setAutoShutdown()

notifyDisonnected

public void notifyDisonnected()
                       throws IOException
Throws:
IOException

sendToClient

public void sendToClient(SelectableChannel channel,
                         ByteBuffer buf)
                  throws IOException
Throws:
IOException

connectUDPClient

protected void connectUDPClient(SocketAddress remoteAddr,
                                DatagramChannel channel,
                                PerfMonMetricGetter getter)
                         throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.