public void run() {
		final String methodName = "run";
		MqttWireMessage message = null;
		while (running && (out != null)) {
			try {
				message = clientState.get();
				if (message != null) {
					// @TRACE 802=network send key={0} msg={1}
					log.fine(className, methodName, "802", new Object[] { message.getKey(), message });

					if (message instanceof MqttAck) {
						out.write(message);
						out.flush();
					} else {
						MqttToken token = tokenStore.getToken(message);
						// While quiescing the tokenstore can be cleared so need
						// to check for null for the case where clear occurs
						// while trying to send a message.
						if (token != null) {
							synchronized (token) {
								out.write(message);
								out.flush();
								clientState.notifySent(message);
							}
						}
					}
				} else { // null message
					// @TRACE 803=get message returned null, stopping}
					log.fine(className, methodName, "803");

					running = false;
				}
			} catch (MqttException me) {
				handleRunException(message, me);
			} catch (Exception ex) {
				handleRunException(message, ex);
			}
		} // end while

		// @TRACE 805=<
		log.fine(className, methodName, "805");

	}