SSF.App.DDoS
Class RequestsMonitor
java.lang.Object
|
+--SSF.App.DDoS.RequestsMonitor
- All Implemented Interfaces:
- ProtocolMonitor
- public class RequestsMonitor
- extends java.lang.Object
- implements ProtocolMonitor
Used to monitor the requests received by a httpServer.
It's similar to SSF.Net.droptailQueueMonitor, periodically probe the
number of requests received.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STREAM_TYPE
public static final java.lang.String STREAM_TYPE
- See Also:
- Constant Field Values
owner
protected ProtocolSession owner
RequestsMonitor
public RequestsMonitor()
config
public void config(ProtocolSession ownerProtocol,
com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
- configure the Monitor. The supported DML attributes are:
monitor [
use SSF.OS.WWW.RequestsMonitor
probe_interval %F # queue length averaging time interval, seconds (double)
debug %S # print verbose diagnostics, true/false
]
- Specified by:
config in interface ProtocolMonitor
com.renesys.raceway.DML.configException
init
public void init()
- called by SSF.OS.WWW.httpServer.init()
- Specified by:
init in interface ProtocolMonitor
receive
public void receive(ProtocolMessage msg,
ProtocolSession fromSession,
ProtocolSession toSession)
- Just increase a counter
- Specified by:
receive in interface ProtocolMonitor
recordToString
public static java.lang.String recordToString(byte[] bytes,
int offset)