public void run ( ) { try { readStream ( ) ; } catch ( EOFException eof ) { // Normal disconnect } catch ( SocketException se ) { // Do nothing if the exception occured while shutting down the // component otherwise // log the error and try to establish a new connection if ( ! shutdown ) { component . getManager ( ) . getLog ( ) . error ( se ) ; component . connectionLost ( ) ; } } catch ( XmlPullParserException ie ) { component . getManager ( ) . getLog ( ) . error ( ie ) ; } catch ( Exception e ) { component . getManager ( ) . getLog ( ) . warn ( e ) ; } }
A dedicated thread loop for reading the stream and sending incoming packets to the appropriate router .