public static void cancel ( GramJob job ) throws GramException , GSSException { GlobusURL jobURL = job . getID ( ) ; if ( jobURL == null ) { throw new GramException ( GramException . ERROR_JOB_CONTACT_NOT_SET ) ; } GSSCredential cred = getJobCredentials ( job ) ; String msg = GRAMProtocol . CANCEL_JOB ( jobURL . getURL ( ) , jobURL . getHost ( ) ) ; GatekeeperReply reply = jmConnect ( cred , jobURL , msg ) ; if ( reply . failureCode != 0 ) { throw new GramException ( reply . failureCode ) ; } // this might need to be fixed // if (handler != null) handler.unregisterJob(jobContact); }
This function cancels an already running job .