Java client-server queue simulation