public final synchronized void onHttpCallback ( final byte [ ] message ) { final long endTime = System . currentTimeMillis ( ) + WAIT_TIMEOUT ; while ( cmdOutput != null ) { final long waitTime = endTime - System . currentTimeMillis ( ) ; if ( waitTime <= 0 ) { break ; } try { wait ( WAIT_TIME ) ; } catch ( final InterruptedException e ) { LOG . log ( Level . WARNING , "HttpServeShellCmdHandler onHttpCallback InterruptedException: {0}" , e ) ; } } LOG . log ( Level . INFO , "HttpServeShellCmdHandler OnCallback: {0}" , HttpShellJobDriver . CODEC . decode ( message ) ) ; cmdOutput = HttpShellJobDriver . CODEC . decode ( message ) ; notify ( ) ; }
called after shell command is completed .