There is an important bug in class HttpBindThread,
public synchronized void write(final String _s):
can case a thread lock if it is called twice consecutively with short delay between each time.
First time will lunch the thread secondthread and before the method readStanzas is arrived in this thread ,the second call will came and take the lock of object this.
readStanzas will be arrived and suspended waiting for the lock of this object and in same time the write method will stop waiting secondthread to finish.
Replace sleep(200) in write method to wait(200) , This will allow to release the lock of this object allowing others methods to take it.