Interface SftpErrorStatusDataHandler


public interface SftpErrorStatusDataHandler
Invoked in order to format failed commands messages
  • Field Details

  • Method Details

    • resolveSubStatus

      default int resolveSubStatus(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int cmd, Object... args)
      Parameters:
      sftpSubsystem - The SFTP subsystem instance
      id - The command identifier
      e - Thrown exception
      cmd - The command that was attempted
      args - The relevant command arguments - Note: provided only for logging purposes and subject to type and/or order change at any version
      Returns:
      The relevant sub-status to send as failure indication for the failed command
      See Also:
    • resolveErrorMessage

      default String resolveErrorMessage(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int subStatus, int cmd, Object... args)
      Parameters:
      sftpSubsystem - The SFTP subsystem instance
      id - The command identifier
      e - Thrown exception
      subStatus - The sub-status code obtained from invocation of resolveSubStatus
      cmd - The command that was attempted
      args - The relevant command arguments - Note: provided only for logging purposes and subject to type and/or order change at any version
      Returns:
      The human readable text message that explains the failure reason
      See Also:
    • resolveErrorLanguage

      default String resolveErrorLanguage(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int subStatus, int cmd, Object... args)
      Parameters:
      sftpSubsystem - The SFTP subsystem instance
      id - The command identifier
      e - Thrown exception
      subStatus - The sub-status code obtained from invocation of resolveSubStatus
      cmd - The command that was attempted
      args - The relevant command arguments - Note: provided only for logging purposes and subject to type and/or order change at any version
      Returns:
      The error message language tag - recommend returning empty string