sunlabs.brazil.handler

Class ResourceLimitHandler

public class ResourceLimitHandler extends Object implements Handler

Handler for server resource management. This handler monitors various system load parameters, and rejects each request with a short message if any resource limit is exceeded. The properties are evaluated at init time, to minimize the per-request overhead of this monitor.

Properties:

memory
The minimum # of remaining bytes available to the vm
threads
The Max number of active threads
file
The file name or resource of the html file to return if resources run low. Defaults to "busy.html".
retry
The number of seconds to request the client wait before retrying the request.

Version: 2.3

Author: Stephen Uhler

Method Summary
booleaninit(Server server, String prefix)
booleanrespond(Request request)

Method Detail

init

public boolean init(Server server, String prefix)

respond

public boolean respond(Request request)