@Override
    public long getOutgoingMessageCount(final boolean resetAfter) {
        if (resetAfter) {
            return outMessages.getAndSet(0);
        }
        else {
            return outMessages.get();
        }
    }
Returns the total number of outgoing messages since last reset.

@param resetAfter True if you want the counter to be reset after results returned.
@return the number of outgoing messages through the service.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java