|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cindy.SessionFilterAdapter
net.sf.cindy.filter.StatisticFilter
public class StatisticFilter
Statistic filter.
Constructor Summary | |
---|---|
StatisticFilter()
Construct a statistic filter monitor all sessions. |
|
StatisticFilter(Session session)
Construct a statistic filter monitor special session. |
Method Summary | |
---|---|
double |
getAvgReceiveSpeed()
Get average receive speed, in byte/s. |
double |
getAvgSendSpeed()
Get average send speed, in byte/s. |
long |
getElapsedTime()
Get elapsed time after session started and before session closed, in ms. |
long |
getReceivedBytes()
Get received bytes count. |
double |
getReceiveSpeed()
Get instantaneous receive speed, in byte/s. |
double |
getSendSpeed()
Get instantaneous send speed, in byte/s. |
long |
getSentBytes()
Get sent bytes count. |
boolean |
isStopped()
|
void |
packetReceived(SessionFilterChain filterChain,
Packet packet)
Session received a packet. |
void |
packetSent(SessionFilterChain filterChain,
Packet packet)
Session sent a packet. |
void |
reset()
Reset. |
void |
sessionClosed(SessionFilterChain filterChain)
Session have closed. |
void |
sessionStarted(SessionFilterChain filterChain)
Session have started. |
void |
start()
|
void |
stop()
|
Methods inherited from class net.sf.cindy.SessionFilterAdapter |
---|
exceptionCaught, objectReceived, objectSent, packetSend, sessionTimeout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatisticFilter()
public StatisticFilter(Session session)
session
- monitor special sessionMethod Detail |
---|
public boolean isStopped()
public void start()
public void stop()
public double getAvgReceiveSpeed()
public double getAvgSendSpeed()
public long getElapsedTime()
public long getReceivedBytes()
public long getSentBytes()
public double getReceiveSpeed()
public double getSendSpeed()
public void reset()
public void sessionStarted(SessionFilterChain filterChain) throws java.lang.Exception
SessionFilter
sessionStarted
in interface SessionFilter
sessionStarted
in class SessionFilterAdapter
filterChain
- session filter chain
java.lang.Exception
- any exceptionpublic void sessionClosed(SessionFilterChain filterChain) throws java.lang.Exception
SessionFilter
sessionClosed
in interface SessionFilter
sessionClosed
in class SessionFilterAdapter
filterChain
- session filter chain
java.lang.Exception
- any exceptionpublic void packetReceived(SessionFilterChain filterChain, Packet packet) throws java.lang.Exception
SessionFilter
packetReceived
in interface SessionFilter
packetReceived
in class SessionFilterAdapter
filterChain
- session filter chainpacket
- the received packet
java.lang.Exception
- any exceptionpublic void packetSent(SessionFilterChain filterChain, Packet packet) throws java.lang.Exception
SessionFilter
packetSent
in interface SessionFilter
packetSent
in class SessionFilterAdapter
filterChain
- session filter chainpacket
- the sent packet
java.lang.Exception
- any exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |