public abstract class AbstractSftpClientExtension extends org.apache.sshd.common.util.logging.AbstractLoggingBean implements SftpClientExtension, RawSftpClient
logBY_NAME_COMPARATOR, NAME_EXTRACTORFALSE, TRUE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSftpClientExtension(String name,
SftpClient client,
RawSftpClient raw,
boolean supported) |
protected |
AbstractSftpClientExtension(String name,
SftpClient client,
RawSftpClient raw,
Collection<String> extras) |
protected |
AbstractSftpClientExtension(String name,
SftpClient client,
RawSftpClient raw,
Map<String,byte[]> extensions) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNameall, any, ofprotected AbstractSftpClientExtension(String name, SftpClient client, RawSftpClient raw, Collection<String> extras)
protected AbstractSftpClientExtension(String name, SftpClient client, RawSftpClient raw, Map<String,byte[]> extensions)
protected AbstractSftpClientExtension(String name, SftpClient client, RawSftpClient raw, boolean supported)
public final String getName()
getName in interface NamedResourcepublic final SftpClient getClient()
getClient in interface SftpClientHolderprotected void sendAndCheckExtendedCommandStatus(org.apache.sshd.common.util.buffer.Buffer buffer) throws IOException
IOExceptionprotected int sendExtendedCommand(org.apache.sshd.common.util.buffer.Buffer buffer) throws IOException
IOExceptionpublic int send(int cmd,
org.apache.sshd.common.util.buffer.Buffer buffer)
throws IOException
send in interface RawSftpClientcmd - Command to send - Note: only lower 8-bits are usedbuffer - The Buffer containing the command dataIOException - if failed to send commandpublic org.apache.sshd.common.util.buffer.Buffer receive(int id) throws IOException
receive in interface RawSftpClientid - The expected request idBuffer containing the request idIOException - If connection closed or interruptedpublic org.apache.sshd.common.util.buffer.Buffer receive(int id, long timeout) throws IOException
receive in interface RawSftpClientid - The expected request idtimeout - The amount of time to wait for the responseBuffer containing the request idIOException - If connection closed or interruptedpublic org.apache.sshd.common.util.buffer.Buffer receive(int id, Duration timeout) throws IOException
receive in interface RawSftpClientid - The expected request idtimeout - The amount of time to wait for the responseBuffer containing the request idIOException - If connection closed or interruptedpublic final boolean isSupported()
isSupported in interface OptionalFeatureprotected void checkStatus(org.apache.sshd.common.util.buffer.Buffer buffer) throws IOException
IOExceptionpublic org.apache.sshd.common.util.buffer.Buffer putTarget(org.apache.sshd.common.util.buffer.Buffer buffer, Object target)
buffer - The Buffertarget - A target path String or SftpClient.Handle or byte[] to be
encoded in the bufferUnsupportedOperationException - If target is not one of the above supported typesprotected org.apache.sshd.common.util.buffer.Buffer getCommandBuffer(Object target)
target - A target path String or SftpClient.Handle or byte[] to be encoded in the bufferBuffer with the extension name setgetCommandBuffer(Object, int)protected org.apache.sshd.common.util.buffer.Buffer getCommandBuffer(Object target, int extraSize)
target - A target path String or SftpClient.Handle or byte[] to be encoded in the bufferextraSize - Extra size - beyond the path/handle to be allocatedBuffer with the extension name setgetCommandBuffer(int)protected org.apache.sshd.common.util.buffer.Buffer getCommandBuffer(int extraSize)
extraSize - Extra size - besides the extension nameBuffer with the extension name setprotected org.apache.sshd.common.util.buffer.Buffer checkExtendedReplyBuffer(org.apache.sshd.common.util.buffer.Buffer buffer) throws IOException
buffer - The Buffer to checkBuffer if this is an SftpConstants.SSH_FXP_EXTENDED_REPLY, or
null if this is a SftpConstants.SSH_FXP_STATUS carrying an
SftpConstants.SSH_FX_OK resultIOException - If a non-SftpConstants.SSH_FX_OK result or not a
SftpConstants.SSH_FXP_EXTENDED_REPLY bufferprotected void validateIncomingResponse(int cmd,
int id,
int type,
int length,
org.apache.sshd.common.util.buffer.Buffer buffer)
throws IOException
IOExceptionprotected void throwStatusException(int id,
int substatus,
String msg,
String lang)
throws IOException
IOExceptionCopyright © 2018–2021 The Apache Software Foundation. All rights reserved.