com.caucho.server.admin
Class JniNetStat

java.lang.Object
  extended by com.caucho.server.admin.JniNetStat
All Implemented Interfaces:
AlarmListener, java.util.EventListener

public class JniNetStat
extends java.lang.Object
implements AlarmListener

Statistics gathering attribute. Each time period, the attribute is polled. Samples the network every _samplePeriod seconds. Because the netstat sample can be slow, it has its own thread independent of the standard stat sample.


Nested Class Summary
 class JniNetStat.NetProbe
           
 
Field Summary
static int TCP_CLOSE
           
static int TCP_CLOSE_WAIT
           
static int TCP_CLOSING
           
static int TCP_ESTABLISHED
           
static int TCP_FIN_WAIT1
           
static int TCP_FIN_WAIT2
           
static int TCP_LAST_ACK
           
static int TCP_LISTEN
           
static int TCP_SYN_RECV
           
static int TCP_SYN_SENT
           
static int TCP_TIME_WAIT
           
 
Method Summary
static JniNetStat create()
           
 AbstractMeter createActiveProbe(java.lang.String name, int type)
           
 void handleAlarm(Alarm alarm)
          Handles a callback from an alarm.
static boolean isEnabled()
           
 double sampleNet(int type)
           
 void setSamplePeriod(long period)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TCP_ESTABLISHED

public static final int TCP_ESTABLISHED
See Also:
Constant Field Values

TCP_SYN_SENT

public static final int TCP_SYN_SENT
See Also:
Constant Field Values

TCP_SYN_RECV

public static final int TCP_SYN_RECV
See Also:
Constant Field Values

TCP_FIN_WAIT1

public static final int TCP_FIN_WAIT1
See Also:
Constant Field Values

TCP_FIN_WAIT2

public static final int TCP_FIN_WAIT2
See Also:
Constant Field Values

TCP_TIME_WAIT

public static final int TCP_TIME_WAIT
See Also:
Constant Field Values

TCP_CLOSE

public static final int TCP_CLOSE
See Also:
Constant Field Values

TCP_CLOSE_WAIT

public static final int TCP_CLOSE_WAIT
See Also:
Constant Field Values

TCP_LAST_ACK

public static final int TCP_LAST_ACK
See Also:
Constant Field Values

TCP_LISTEN

public static final int TCP_LISTEN
See Also:
Constant Field Values

TCP_CLOSING

public static final int TCP_CLOSING
See Also:
Constant Field Values
Method Detail

create

public static JniNetStat create()

isEnabled

public static boolean isEnabled()

setSamplePeriod

public void setSamplePeriod(long period)

createActiveProbe

public AbstractMeter createActiveProbe(java.lang.String name,
                                       int type)

sampleNet

public double sampleNet(int type)

handleAlarm

public void handleAlarm(Alarm alarm)
Description copied from interface: AlarmListener
Handles a callback from an alarm.

Specified by:
handleAlarm in interface AlarmListener