*/
        public void failed(RegisterableChannel channel, Throwable e)
        {
            log.log(Level.WARNING, "", e);
        }
        
    }
    
    private static class MyDataListener implements DataListener {

        private String name;
        
        public MyDataListener(String name) {
            this.name= name;
        }
        
        /**
         * @see org.playorm.nio.api.handlers.DataListener#incomingData(Channel, java.nio.ByteBuffer)
         */
        public synchronized void incomingData(Channel channel, DataChunk chunk) throws IOException
        {
        	ByteBuffer b = chunk.getData();
        	//A session is associated with a channel which should make sense as
        	//if the channel goes away, the session goes away.
        	ChannelSession session = channel.getSession();
        	Integer sessionCount = (Integer)session.get("count");
        	if(sessionCount == null) {
        		sessionCount = Integer.valueOf(0);
        	}
        	
            String msg = HELPER.readString(b, b.remaining());   
            log.info(name+" count="+(sessionCount++)+" says '"+msg+"'    s="+session+"  t="+Thread.currentThread());

        	session.put("count", sessionCount);
        	chunk.setProcessed("TestExampleSessions.MyDataListener");
        }

        /**
         * @see org.playorm.nio.api.handlers.DataListener#farEndClosed(Channel)
         */
        public void farEndClosed(Channel channel)
        {
        }

        /**
         * @see org.playorm.nio.api.handlers.DataListener#failure(Channel, java.nio.ByteBuffer, java.lang.Exception)
         */
        public void failure(Channel channel, ByteBuffer data, Exception e)
        {
        }