Package org.apache.sshd.sftp.server
Interface SftpErrorStatusDataHandler
public interface SftpErrorStatusDataHandler
Invoked in order to format failed commands messages
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault String
resolveErrorLanguage
(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int subStatus, int cmd, Object... args) default String
resolveErrorMessage
(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int subStatus, int cmd, Object... args) default int
resolveSubStatus
(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int cmd, Object... args)
-
Field Details
-
DEFAULT
-
-
Method Details
-
resolveSubStatus
default int resolveSubStatus(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int cmd, 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:
-
resolveErrorMessage
default String resolveErrorMessage(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int subStatus, int cmd, 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:
-
resolveErrorLanguage
default String resolveErrorLanguage(SftpSubsystemEnvironment sftpSubsystem, int id, Throwable e, int subStatus, int cmd, 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
-