public class ServerTrafficCounter extends Object
Constructor and Description |
---|
ServerTrafficCounter() |
Modifier and Type | Method and Description |
---|---|
static void |
incrementIncomingCounter(long delta)
Increments the counter of read bytes by delta.
|
static void |
incrementOutgoingCounter(long delta)
Increments the counter of written bytes by delta.
|
static void |
initStatistics()
Creates and adds statistics to statistic manager.
|
static InputStream |
wrapInputStream(InputStream originalStream)
Wraps the specified input stream to count the number of bytes that were read.
|
static OutputStream |
wrapOutputStream(OutputStream originalStream)
Wraps the specified output stream to count the number of bytes that were written.
|
static ReadableByteChannel |
wrapReadableChannel(ReadableByteChannel originalChannel)
Wraps the specified readable channel to count the number of bytes that were read.
|
static WritableByteChannel |
wrapWritableChannel(WritableByteChannel originalChannel)
Wraps the specified writable channel to count the number of bytes that were written.
|
public static void initStatistics()
public static InputStream wrapInputStream(InputStream originalStream)
originalStream
- the input stream to wrap.public static OutputStream wrapOutputStream(OutputStream originalStream)
originalStream
- the output stream to wrap.public static ReadableByteChannel wrapReadableChannel(ReadableByteChannel originalChannel)
originalChannel
- the readable byte channel to wrap.public static WritableByteChannel wrapWritableChannel(WritableByteChannel originalChannel)
originalChannel
- the writable byte channel to wrap.public static void incrementIncomingCounter(long delta)
delta
- the delta of bytes that were read.public static void incrementOutgoingCounter(long delta)
delta
- the delta of bytes that were written.Copyright © 2003-2008 Jive Software.