Terminating a job from the Java™ code

You can throw an Exception class object, or throw a ConnectorException class object, or call the Logger.fatal() method to stop a job before it ends naturally.