07.01.2013 Views

David Defour - Université de Perpignan

David Defour - Université de Perpignan

David Defour - Université de Perpignan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example: Multi-URL Validator<br />

• I<strong>de</strong>a<br />

–Let user enter any number of URLs<br />

–Check if they are legal by making HTTP HEAD requests and<br />

checking the server status line<br />

• Approach<br />

746<br />

jeudi 26 janvier 12<br />

–Make a List of URL result hol<strong>de</strong>rs<br />

–For each URL, pass result hol<strong>de</strong>r to background thread.<br />

Background thread stores result in hol<strong>de</strong>r. Use inner class for<br />

background thread implementation.<br />

–After all tasks are complete or 10 seconds have elapsed<br />

(whichever is sooner), show results in ScrollView

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!