public void setListener(PackageListener listener) {
		this.listener = listener;
		// This does not work well: the two separate
		// lists do not preserve the order in which 
		// messages arrive.
		while(!statusBuffer.isEmpty()) {
			listener.addInput(statusBuffer.pop());
		}
		while(!messageBuffer.isEmpty()) {
			listener.addInput(messageBuffer.pop());
		}
	}