public class ChannelAsyncOutputStream extends AbstractCloseable implements IoOutputStream, ChannelHolder
AbstractCloseable.StatecloseFuture, futureLock, statelog| Constructor and Description |
|---|
ChannelAsyncOutputStream(Channel channel,
byte cmd) |
ChannelAsyncOutputStream(Channel channel,
byte cmd,
boolean sendChunkIfRemoteWindowIsSmallerThanPacketSize) |
| Modifier and Type | Method and Description |
|---|---|
protected Buffer |
createSendBuffer(Buffer buffer,
Channel channel,
long length) |
protected CloseFuture |
doCloseGracefully() |
protected void |
doWriteIfPossible(boolean resume) |
Channel |
getChannel() |
byte |
getCommandType() |
boolean |
isSendChunkIfRemoteWindowIsSmallerThanPacketSize() |
void |
onWindowExpanded() |
protected void |
onWritten(IoWriteFutureImpl future,
int total,
long length,
IoWriteFuture f) |
protected void |
preClose() |
void |
setSendChunkIfRemoteWindowIsSmallerThanPacketSize(boolean sendChunkIfRemoteWindowIsSmallerThanPacketSize) |
String |
toString() |
IoWriteFuture |
writeBuffer(Buffer buffer) |
addCloseFutureListener, builder, close, doCloseImmediately, getFutureLock, isClosed, isClosing, removeCloseFutureListenerdebug, 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, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerpublic ChannelAsyncOutputStream(Channel channel, byte cmd)
channel - The Channel through which the stream is communicatingcmd - Either SSH_MSG_CHANNEL_DATA or
SSH_MSG_CHANNEL_EXTENDED_DATA indicating the
output stream typepublic ChannelAsyncOutputStream(Channel channel, byte cmd, boolean sendChunkIfRemoteWindowIsSmallerThanPacketSize)
channel - The Channel through which the stream is
communicatingcmd - Either SSH_MSG_CHANNEL_DATA or
SSH_MSG_CHANNEL_EXTENDED_DATA indicating the output stream
typesendChunkIfRemoteWindowIsSmallerThanPacketSize - Determines the chunking behaviour, if the remote window
size is smaller than the packet size. Can be use to
establish compatibility with certain clients, that wait
until the window size is 0 before adjusting it.public Channel getChannel()
getChannel in interface ChannelHolderChannel instancepublic byte getCommandType()
SSH_MSG_CHANNEL_DATA or
SSH_MSG_CHANNEL_EXTENDED_DATA indicating the output
stream typepublic void onWindowExpanded()
throws IOException
IOExceptionpublic IoWriteFuture writeBuffer(Buffer buffer) throws IOException
writeBuffer in interface IoOutputStreamIOExceptionprotected void preClose()
preClose in class AbstractCloseableprotected CloseFuture doCloseGracefully()
doCloseGracefully in class AbstractCloseableprotected void doWriteIfPossible(boolean resume)
protected void onWritten(IoWriteFutureImpl future, int total, long length, IoWriteFuture f)
public boolean isSendChunkIfRemoteWindowIsSmallerThanPacketSize()
public void setSendChunkIfRemoteWindowIsSmallerThanPacketSize(boolean sendChunkIfRemoteWindowIsSmallerThanPacketSize)
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.