public void run() { while(stub.isConnected()){ Address dest = null; Address src = null; int len; byte[] data = null; DataInputStream input = null; try{ input = stub.getInputStream(); dest = Util.readAddress(input); len = input.readInt(); if(len > 0){ data = new byte[len]; input.readFully(data, 0, len); receive(dest, src, data, 0, len); } }catch(SocketException se){ //if(log.isWarnEnabled()) log.warn("failure in TUNNEL receiver thread", se); }catch(IOException ioe){ //if(log.isWarnEnabled()) log.warn("failure in TUNNEL receiver thread", ioe); }catch(Exception e){ if(log.isWarnEnabled()) log.warn("failure in TUNNEL receiver thread", e); } } } }