public boolean shutdown ( ) { if ( url != null ) { logger . debug ( "Trying to shutdown gass server directly..." ) ; try { GlobusURL u = new GlobusURL ( url ) ; GassServer . shutdown ( this . cred , u ) ; } catch ( Exception e ) { logger . debug ( "gass server shutdown failed" , e ) ; } try { gassJobListener . reset ( ) ; int status = gassJobListener . waitFor ( 1000 * 60 ) ; if ( status == GramJob . STATUS_FAILED || status == GramJob . STATUS_DONE ) { // shutdown successful reset ( ) ; return true ; } } catch ( InterruptedException e ) { logger . debug ( "" , e ) ; } } // otherwise just cancel the job. if ( job == null ) return true ; logger . debug ( "Canceling gass server job." ) ; try { job . cancel ( ) ; reset ( ) ; return true ; } catch ( Exception e ) { return false ; } }
Shutdowns remotely running gass server .