public void writePacket(PacketInfo info) {
            if (info.packetCode() == Packet.PCODE_REQUEST) {
                writeRequestCount++;
            } else if (info.packetCode() == Packet.PCODE_REPLY) {
                writeReplyCount++;
            } else if (info.packetCode() == Packet.PCODE_ERROR) {
                writeErrorCount++;
            }
            writeBytes += info.packetLength();
            super.writePacket(info);
        }
Supervisor extension with some extra statistics used for
testing.
jrt/tests/com/yahoo/jrt/Test.java