@Override
    public void run()
    {
      try
      {
        while (true)
        {
          String message = outgoingMessages.take();
          OutputStream out = socket.getOutputStream();
          ObjectOutputStream objOut = new ObjectOutputStream(out);
          objOut.writeObject(message);
          objOut.flush();
        }
      }
      catch (Exception e)
      {
        listener.disconnect();
      }
    }