@Override
	public void run() {
		while (canRun) {
			try {
				// read the incoming message
				RMIMessage o = (RMIMessage) in.readObject();
				// invoke the message locally and get return value
				Object returnVal = dispatch(o);
				// compose the return message
				RMIMessage ret = new RMIMessage(returnVal);
				out.writeObject(ret);
				out.flush();
			} catch (IOException e) {
				break;
			} catch (ClassNotFoundException e) {
				System.out.println("RegistryWorker: Class Not Found Exception"
						+ e.getMessage());

			}
		}
	}