public class ChainSawHandler extends ChainHandler
Output is a variant of the common logfile format. The common logfile format is as follows:
remotehost rfc931 authuser [date] "request" status bytes
Additional Configuration options:
See the LogHandler
handler for generating logs whose
contents are configurable.
Modifier and Type | Field and Description |
---|---|
static int |
BUFSIZE |
static java.lang.String |
FLUSH |
static java.lang.String |
LOG |
exitOnError, handlers, isMine, names, prefix, report
Constructor and Description |
---|
ChainSawHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
init(Server server,
java.lang.String prefix)
Initializes this
ChainHandler by initializing all the
"wrapped" handlers in the list of handlers. |
boolean |
respond(Request request)
Run the chain-handler, counting the # of bytes of output generated
by its chained handlers.
|
initHandler
public static final java.lang.String LOG
public static final java.lang.String FLUSH
public static final int BUFSIZE
public boolean init(Server server, java.lang.String prefix)
ChainHandler
ChainHandler
by initializing all the
"wrapped" handlers in the list of handlers. If a wrapped handler
cannot be initialized, this method logs a message and skips it. If no
handlers were specified, or no handlers were successfully initialized,
then the initialization of this ChainHandler
is
considered to have failed.init
in interface Handler
init
in class ChainHandler
server
- The HTTP server that created this ChainHandler
.prefix
- The prefix for this ChainHandler
's properties.true
if at least one of the wrapped handlers
was successfully initialized.public boolean respond(Request request) throws java.io.IOException
respond
in interface Handler
respond
in class ChainHandler
request
- The HTTP request.true
if one of the Handler
s returns
true
, false
otherwise.java.io.IOException
- if one of the Handler
s throws an
IOException
while responding.