@Override
    public void run() {
        this.stopped = false;
        Log.info("OutThread running...");
        Object obj;

        while (!isStop()) {
            try {
                //busy wait for incomming request from client
                while ((obj = getMessage()) == null) {
                    Thread.sleep(100);
                    if (isStop()) {
                        break;
                    }
                }
                if (!isStop()) {
                    try { 
                        out.writeObject(obj);
                    } catch (IOException ex) {
                        shutdown();
                        continue;
                    }
                }
            } catch (InterruptedException ex) {
                Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex);
            }
        }

        Log.info("OutThread shuting down...");

        if (out != null) {
            try {
                Log.debug("Closing out socket;");
                out.close();
                Log.debug("Closed out socket;");
            } catch (IOException ex) {
                Log.error("Out Thread coud not close Output Stream", ex);
            }
        }

        this.stopped = true;
        Log.debug("OutThread - stopped:true");
    }