Interface ChannelStreamWriterResolver

All Known Subinterfaces:
Channel, ChannelStreamWriterResolverManager, ClientChannel, ClientFactoryManager, ClientSession, FactoryManager, ServerChannel, ServerFactoryManager, ServerSession, Session
All Known Implementing Classes:
AbstractChannel, AbstractClientChannel, AbstractClientSession, AbstractFactoryManager, AbstractServerChannel, AbstractServerSession, AbstractSession, AgentForwardedChannel, AgentForwardedChannel, ChannelAgentForwarding, ChannelAgentForwarding, ChannelDirectTcpip, ChannelExec, ChannelForwardedX11, ChannelSession, ChannelSession, ChannelShell, ChannelSubsystem, ClientSessionImpl, PtyCapableChannelSession, ServerSessionImpl, SessionHelper, SshClient, SshServer, TcpipClientChannel, TcpipServerChannel
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ChannelStreamWriterResolver
A special mechanism that enables users to intervene in the way packets are sent from ChannelOutputStream-s - e.g., by introducing throttling
Author:
Apache MINA SSHD Project
  • Field Details

    • NONE

      static final ChannelStreamWriterResolver NONE
      An identity resolver - i.e., no special intervention - simply use the channel itself
  • Method Details

    • resolveChannelStreamWriter

      ChannelStreamWriter resolveChannelStreamWriter(Channel channel, byte cmd)
      Parameters:
      channel - The original Channel
      cmd - The SSH_MSG_CHANNEL_DATA or SSH_MSG_CHANNEL_EXTENDED_DATA command that triggered the resolution
      Returns:
      The ChannelStreamWriter to use - Note: if the return value is not a Channel then it will be closed when the stream is closed