public abstract class Handle
extends java.lang.Object
implements java.nio.channels.Channel
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicBoolean |
closed |
private java.nio.file.Path |
file |
private java.lang.String |
handle |
Modifier | Constructor and Description |
---|---|
protected |
Handle(java.nio.file.Path file,
java.lang.String handle) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.nio.file.Path |
getFile() |
java.lang.String |
getFileHandle() |
boolean |
isOpen() |
protected void |
signalHandleOpen(SftpSubsystem subsystem) |
protected void |
signalHandleOpening(SftpSubsystem subsystem) |
java.lang.String |
toString() |
private final java.util.concurrent.atomic.AtomicBoolean closed
private final java.nio.file.Path file
private final java.lang.String handle
protected void signalHandleOpening(SftpSubsystem subsystem) throws java.io.IOException
java.io.IOException
protected void signalHandleOpen(SftpSubsystem subsystem) throws java.io.IOException
java.io.IOException
public java.nio.file.Path getFile()
public java.lang.String getFileHandle()
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object