Package org.apache.sshd.sftp.server
Interface SftpErrorStatusDataHandler
-
public interface SftpErrorStatusDataHandler
Invoked in order to format failed commands messages- Author:
- Apache MINA SSHD Project
-
-
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 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 Detail
-
DEFAULT
static final SftpErrorStatusDataHandler DEFAULT
-
-
Method Detail
-
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:
SftpHelper.resolveSubstatus(Throwable)
-
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:
SftpHelper.resolveStatusMessage(int)
-
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
-
-