Read partial socket message
You are locking on a public field message which might cause a deadlock. If locking is needed, then do it on a private field.

private final Object SYNC_OBJECT = new Object();
...
synchronized(SYNC_OBJECT){
}


Your class extends Thread apparently, and the rule is : favor composition over inheritance.

  private Runnable runnable;

  public void startListening(){
    // use the runnable
  }


Moreover, you barely need to use threads, use Executors instead