public abstract class AbstractSftpClientExtension extends 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) |
| Modifier and Type | Method and Description |
|---|---|
protected Buffer |
checkExtendedReplyBuffer(Buffer buffer) |
protected void |
checkStatus(Buffer buffer) |
SftpClient |
getClient() |
protected Buffer |
getCommandBuffer(int extraSize) |
protected Buffer |
getCommandBuffer(Object target) |
protected Buffer |
getCommandBuffer(Object target,
int extraSize) |
String |
getName() |
boolean |
isSupported() |
Buffer |
putTarget(Buffer buffer,
Object target) |
Buffer |
receive(int id) |
int |
send(int cmd,
Buffer buffer) |
protected void |
sendAndCheckExtendedCommandStatus(Buffer buffer) |
protected int |
sendExtendedCommand(Buffer buffer) |
protected void |
throwStatusException(int id,
int substatus,
String msg,
String lang) |
getSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindByName, getNameList, getNames, removeByNameall, 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 SftpClientExtensionSftpClient used to issue the extended commandprotected void sendAndCheckExtendedCommandStatus(Buffer buffer) throws IOException
IOExceptionprotected int sendExtendedCommand(Buffer buffer) throws IOException
IOExceptionpublic int send(int cmd,
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 Buffer receive(int id) throws IOException
receive in interface RawSftpClientid - The expected request idBuffer containing the request idIOException - If connection closed or interruptedpublic final boolean isSupported()
isSupported in interface OptionalFeatureprotected void checkStatus(Buffer buffer) throws IOException
IOExceptionpublic Buffer putTarget(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 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 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 Buffer getCommandBuffer(int extraSize)
extraSize - Extra size - besides the extension nameBuffer with the extension name setprotected Buffer checkExtendedReplyBuffer(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 throwStatusException(int id,
int substatus,
String msg,
String lang)
throws IOException
IOExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.