Package org.apache.sshd.sftp.server
Interface SftpErrorStatusDataHandler
-
public interface SftpErrorStatusDataHandler
Invoked in order to format failed commands messages
-
-
Field Summary
Fields Modifier and Type Field Description static SftpErrorStatusDataHandler
DEFAULT
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.lang.String
resolveErrorLanguage(SftpSubsystemEnvironment sftpSubsystem, int id, java.lang.Throwable e, int subStatus, int cmd, java.lang.Object... args)
default java.lang.String
resolveErrorMessage(SftpSubsystemEnvironment sftpSubsystem, int id, java.lang.Throwable e, int subStatus, int cmd, java.lang.Object... args)
default int
resolveSubStatus(SftpSubsystemEnvironment sftpSubsystem, int id, java.lang.Throwable e, int cmd, java.lang.Object... args)
-
-
-
Field Detail
-
DEFAULT
static final SftpErrorStatusDataHandler DEFAULT
-
-
Method Detail
-
resolveSubStatus
default int resolveSubStatus(SftpSubsystemEnvironment sftpSubsystem, int id, java.lang.Throwable e, int cmd, java.lang.Object... args)
- Parameters:
sftpSubsystem
- The SFTP subsystem instanceid
- The command identifiere
- Thrown exceptioncmd
- The command that was attemptedargs
- 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:
SftpHelper.resolveSubstatus(Throwable)
-
resolveErrorMessage
default java.lang.String resolveErrorMessage(SftpSubsystemEnvironment sftpSubsystem, int id, java.lang.Throwable e, int subStatus, int cmd, java.lang.Object... args)
- Parameters:
sftpSubsystem
- The SFTP subsystem instanceid
- The command identifiere
- Thrown exceptionsubStatus
- The sub-status code obtained from invocation ofresolveSubStatus
cmd
- The command that was attemptedargs
- 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:
SftpHelper.resolveStatusMessage(int)
-
resolveErrorLanguage
default java.lang.String resolveErrorLanguage(SftpSubsystemEnvironment sftpSubsystem, int id, java.lang.Throwable e, int subStatus, int cmd, java.lang.Object... args)
- Parameters:
sftpSubsystem
- The SFTP subsystem instanceid
- The command identifiere
- Thrown exceptionsubStatus
- The sub-status code obtained from invocation ofresolveSubStatus
cmd
- The command that was attemptedargs
- 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
-
-