Code example for AtomicInteger

Methods: addAndGet

0
	} 
 
	@Override 
	public void messageSent(IoSession session, Object message)
	{ 
		send.addAndGet(1);
	} 
 
	@Override 
	public void sessionOpened(IoSession session) throws Exception
	{ 
		for (int i = 0; i < total; i++)
		{ 
			JSONObject request = new JSONObject();
			request.put("protocol", "test.TestJsonProtocol");
			request.put("str", "Hello there");
			JsonMessage message = new JsonMessage();
			request.put("seq", i);
			for (int j = 0; j < i % 50; j++)
			{ 
				request.put(String.valueOf(j), j);