|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.wildfire.net.ServerTrafficCounter
public class ServerTrafficCounter
A ServerTrafficCounter counts the number of bytes read and written by the server. This includes client-server, server-server, external components and connection managers traffic. Note that traffic is monitored only for entities that are directly connected to the server. However, traffic generated by file transfers is not considered unless files were sent using the in-band method.
Constructor Summary | |
---|---|
ServerTrafficCounter()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerTrafficCounter()
Method Detail |
---|
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.
|
Wildfire 3.2.4 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |