com.jivesoftware.forum.nntp
Interface CommandMonitor
- All Superinterfaces:
- Monitor
- All Known Implementing Classes:
- CommandMonitorImpl
public interface CommandMonitor
- extends Monitor
Monitors NNTP command-response pairs. Each sample is a single command and it's
associated response. In the base monitor, the sample quantity is simply
command-responses per second. However, more detailed logging of NNTP traffic
may occur in some implementations allowing the retrieval of other statistics
such as command-responses by command or response code, command-response sizes,
etc.
Method Summary |
void |
addSample(java.lang.String[] cmdParts,
NNTPResponse response,
long startTime,
long stopTime)
Adds a command and response as a sample. |
Methods inherited from interface com.jivesoftware.forum.net.Monitor |
addSample, addSample, getFirstSampleDate, getFrameRate, getFrameSize, getFrameTotal, getFrameTotalTime, getLastSampleDate, getRate, getTotal, getTotalTime, setFrameSize |
addSample
void addSample(java.lang.String[] cmdParts,
NNTPResponse response,
long startTime,
long stopTime)
- Adds a command and response as a sample. The time difference logs the
length of time that expired between reading the command, and returning
a response. Note that the expired time represents the time to process
the command and generate a response. Due to the asynchronous nature
of the connections used, tcp/ip buffering, etc, the time cannot reliably
represent the complete time needed to read the command and complete a
write of the data back to the client. Data may have been read into the
buffer asynchronously before the timer starts, and the timer stops
when the response is written to the write buffer. It is up to the underlying
flushing of the data to the client may occur asynchronously sometime following
the completion of the write.
- Parameters:
cmdParts
- the string parts composing the NNTP command string.response
- the response sent by the server.startTime
- the time the command began to be read (system time millis).stopTime
- the time the response was completely processed (system time millis).
Copyright © 1999-2006 Jive Software.