This function will cancel an existing fax job.

@param   serverName
The fax server name
@param   faxJobID
The fax job ID
3820
private void winCancelFaxJob(String serverName,int faxJobID)
    {
        synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK)
        {
            //pre native call
            this.preNativeCall();
            
            //invoke native
            WindowsJNIFaxClientSpi.cancelFaxJobNative(serverName,faxJobID);
        }
    }
1060894
@Override
    protected void suspendFaxJobImpl(FaxJob faxJob)
    {
        //get fax job ID
        int faxJobIDInt=WindowsFaxClientSpiHelper.getFaxJobID(faxJob);

        //invoke fax action
        this.winSuspendFaxJob(this.faxServerName,faxJobIDInt);
    }
1120446
public static void cancelJob(String jobHandle) throws NoSuchObjectException {
    checkNonEmpty(jobHandle, "jobHandle");
    Key key = KeyFactory.createKey(JobRecord.DATA_STORE_KIND, jobHandle);
    JobRecord jobRecord = backEnd.queryJob(key, InflationType.NONE);
    CancelJobTask cancelJobTask = new CancelJobTask(key, jobRecord.getQueueSettings());
    try {
      backEnd.enqueue(cancelJobTask);
    } catch (TaskAlreadyExistsException e) {
      // OK. Some other thread has already enqueued this task.
    }
  }
1357027
@Override
    protected void resumeFaxJobImpl(FaxJob faxJob)
    {
        //get connection
        Connection<MailResourcesHolder> mailConnection=this.getMailConnection();

        //get holder
        MailResourcesHolder mailResourcesHolder=mailConnection.getResource();

        //create message
        Message message=this.createResumeFaxJobMessage(faxJob,mailResourcesHolder);
        
        //send message
        this.sendMail(faxJob,mailConnection,message);
    }
1035930
@Override
    protected void cancelFaxJobImpl(FaxJob faxJob)
    {
        //get connection
        Connection<MailResourcesHolder> mailConnection=this.getMailConnection();

        //get holder
        MailResourcesHolder mailResourcesHolder=mailConnection.getResource();

        //create message
        Message message=this.createCancelFaxJobMessage(faxJob,mailResourcesHolder);
        
        //send message
        this.sendMail(faxJob,mailConnection,message);
    }
622786
public void serviceName_lines_number_diagnostic_cancel_POST(String serviceName, String number) throws IOException {
		String qPath = "/xdsl/{serviceName}/lines/{number}/diagnostic/cancel";
		StringBuilder sb = path(qPath, serviceName, number);
		exec(qPath, "POST", sb.toString(), null);
	}
23521
@Override
    protected void suspendFaxJobImpl(FaxJob faxJob)
    {
        //create command
        String command=this.createSuspendFaxJobProcessCommand(faxJob);
        
        //execute command
        this.executeProcess(faxJob,command,FaxActionType.SUSPEND_FAX_JOB);
    }
992198
private void winResumeFaxJob(String serverName,int faxJobID)
    {
        synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK)
        {
            //pre native call
            this.preNativeCall();
            
            //invoke native
            WindowsJNIFaxClientSpi.resumeFaxJobNative(serverName,faxJobID);
        }
    }
707773
public void submitFaxJob(FaxJob faxJob)
    {
        //validate fax job
        this.invokeFaxJobNullValidation(faxJob);

        //validate fax job target address
        String targetAddress=faxJob.getTargetAddress();
        if((targetAddress==null)||(targetAddress.length()==0))
        {
            throw new FaxException("Fax job target address not provided.");
        }

        //validate fax job file
        File file=faxJob.getFile();
        if(file==null)
        {
            throw new FaxException("Fax job file not provided.");
        }
        else if(!file.exists())
        {
            throw new FaxException("Fax job file "+file.getPath()+" does not exist.");
        }
        else if(!file.isFile())
        {
            throw new FaxException("Fax job file "+file.getPath()+" is not a file.");
        }
        else if(file.length()==0)
        {
            throw new FaxException("Fax job file "+file.getPath()+" is empty.");
        }

        //invoke action
        this.submitFaxJobImpl(faxJob);
        
        //fire event
        this.fireFaxEvent(FaxClientActionEventID.SUBMIT_FAX_JOB,faxJob);

        //start monitoring fax job if and only if monitoring is supported and there are existing listeners
        if(this.isFaxMonitorEventsSupported())
        {
            synchronized(this.faxMonitorEventListeners)
            {
                if(!this.faxMonitorEventListeners.isEmpty())
                {
                    //monitor the submitted fax job
                    this.spiFaxJobMonitor.monitorFaxJob(this,faxJob);
                }
            }
        }
    }
93845
@Override
    protected void resumeFaxJobImpl(FaxJob faxJob)
    {
        //get fax job ID
        int faxJobIDInt=WindowsFaxClientSpiHelper.getFaxJobID(faxJob);

        //invoke fax action
        this.winResumeFaxJob(this.faxServerName,faxJobIDInt);
    }
719997
public void submitFaxJob(FaxJob faxJob,CommPortAdapter adapter)
    {
        if(faxJob==null)
        {
            throw new FaxException("Fax job not provided.");
        }

        if(adapter==null)
        {
            throw new FaxException("COMM port adapter not provided.");
        }

        //submit fax job
        this.submitFaxJobImpl(faxJob,adapter);
    }
508538
public synchronized void cancel() {
    for (int taskId : mJobInfo.getTaskIdList()) {
      mCommandManager.submitCancelTaskCommand(mJobInfo.getId(), taskId,
          mTaskIdToWorkerInfo.get(taskId).getId());
    }
  }
1298687
private String winGetFaxJobStatus(String serverName,int faxJobID)
    {
        String status=null;
        synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK)
        {
            //pre native call
            this.preNativeCall();
            
            //invoke native
            status=WindowsJNIFaxClientSpi.getFaxJobStatusNative(serverName,faxJobID);
        }
        
        return status;
    }
868630
protected void suspendFaxJob(HylaFaxJob faxJob,HylaFAXClient client) throws Exception
    {
        //get job
        Job job=faxJob.getHylaFaxJob();
        
        //suspend job
        client.suspend(job);
    }
1044079
@CommandArgument
  public void cancel(int index) {
    if (jobProgressStates == null) {
      System.err.println("Server not running");
      return;
    }
    if (index <= 0 || index > jobProgressStates.size()) {
      System.err.println("Invalid job number");
    }
    ProgressState state = jobProgressStates.get(index - 1);
    state.setCancelPending();
  }
1224844
public void resumeFaxJob(FaxJob faxJob)
    {
        //validate fax job ID
        this.invokeFaxJobIDValidation(faxJob);
        
        //invoke action
        this.resumeFaxJobImpl(faxJob);
        
        //fire event
        this.fireFaxEvent(FaxClientActionEventID.RESUME_FAX_JOB,faxJob);
    }
245939
public void suspendFaxJob(FaxJob faxJob)
    {
        //validate fax job ID
        this.invokeFaxJobIDValidation(faxJob);
        
        //invoke action
        this.suspendFaxJobImpl(faxJob);
        
        //fire event
        this.fireFaxEvent(FaxClientActionEventID.SUSPEND_FAX_JOB,faxJob);
    }