public synchronized void run() {
      // go over all complete messages and process them.
      while (_tokenizer.hasMessage()) {
         String msg = _tokenizer.nextMessage();
         String response = this._protocol.processMessage(msg);
         if (response != null) {
            try {
               ByteBuffer bytes = _tokenizer.getBytesForMessage(response);
               this._handler.addOutData(bytes);
            } catch (CharacterCodingException e) { e.printStackTrace(); }
         }
      }
	}