running = true;
while (running) {
Thread.sleep(1000);
for (int i = 0; i < services.size(); i++) {
PrintService service = (PrintService)services.get(i);
PrintServiceAttributeSet lastSet =
(PrintServiceAttributeSet)attributes.get(service);
PrintServiceAttributeSet newSet = service.getAttributes();
if (!lastSet.equals(newSet)) {
PrintServiceAttributeSet updated =
getUpdatedAttributeSet(lastSet, newSet);
if (updated.size() > 0) {
PrintServiceAttributeEvent event =