![JAR search and dependency download from the Maven repository](/logo.png)
com.embeddedunveiled.serial.ftp.SerialComFTPCMDAbort Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scm Show documentation
Show all versions of scm Show documentation
serial communication in java
The newest version!
/*
* Author : Rishi Gupta
*
* This file is part of 'serial communication manager' library.
* Copyright (C) <2014-2016>
*
* This 'serial communication manager' is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* The 'serial communication manager' is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with 'serial communication manager'. If not, see .
*/
package com.embeddedunveiled.serial.ftp;
/**
* Acts as a messenger between application and this library to specify
* whether sending/receiving file should continue or be aborted.
*
* @author Rishi Gupta
*/
public final class SerialComFTPCMDAbort {
private volatile boolean abortTransferNow;
/**
* Allocates a new SerialComFTPCMDAbort object with initial state as continue to
* transfer.
*/
public SerialComFTPCMDAbort() {
abortTransferNow = false; // initial state.
}
/**
* Instructs this library to stop sending file if called by file sender,
* or to stop receiving file if called by file receiver using Xmodem or
* its variant protocols.
*/
public void abortTransfer() {
abortTransferNow = true;
}
/**
* Checks whether file transfer or reception should be aborted or not.
*
* @return true if it should be aborted otherwise false if file transfer
* should continue.
*/
public boolean isTransferToBeAborted() {
return abortTransferNow;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy