Package org.apache.sshd.common.channel
Class ChannelOutputStream
java.lang.Object
java.io.OutputStream
org.apache.sshd.common.channel.ChannelOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Channel
,ChannelHolder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
protected static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Buffer
private int
private final Object
private final AbstractChannel
private final byte
private final boolean
private boolean
private int
protected final org.slf4j.Logger
private final Duration
private final AtomicBoolean
protected final AtomicReference
<ChannelOutputStream.OpenState> private final ChannelStreamWriter
private final RemoteWindow
-
Constructor Summary
ConstructorsConstructorDescriptionChannelOutputStream
(AbstractChannel channel, RemoteWindow remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) ChannelOutputStream
(AbstractChannel channel, RemoteWindow remoteWindow, Duration maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) ChannelOutputStream
(AbstractChannel channel, RemoteWindow remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Field Details
-
openState
-
log
protected final org.slf4j.Logger log -
channelInstance
-
packetWriter
-
remoteWindow
-
maxWaitTimeout
-
cmd
private final byte cmd -
eofOnClose
private final boolean eofOnClose -
noDelay
-
bufferLock
-
buffer
-
bufferLength
private int bufferLength -
lastSize
private int lastSize -
isFlushing
private boolean isFlushing
-
-
Constructor Details
-
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, Duration maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
-
-
Method Details
-
getChannel
- Specified by:
getChannel
in interfaceChannelHolder
- Returns:
- The associated
Channel
instance
-
getCommandType
public byte getCommandType()- Returns:
- Either
SSH_MSG_CHANNEL_DATA
orSSH_MSG_CHANNEL_EXTENDED_DATA
indicating the output stream type
-
isEofOnClose
public boolean isEofOnClose() -
isNoDelay
public boolean isNoDelay() -
setNoDelay
public void setNoDelay(boolean noDelay) -
isOpen
public boolean isOpen() -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
newBuffer
-
toString
-