package de.twenty11.skysail.server.ext.osgi.monitor.gogo.commands; public class ResponseHandler { private byte[] rsp = null; public synchronized boolean handleResponse(byte[] rsp) { this.rsp = rsp; this.notify(); return true; } public synchronized void waitForResponse() { while (this.rsp == null) { try { this.wait(); } catch (InterruptedException e) { } } System.out.println(new String(this.rsp)); } }