Package org.apache.sshd.common.forward
Class ChannelToPortHandler
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.common.forward.ChannelToPortHandler
-
public class ChannelToPortHandler extends AbstractLoggingBean
Implements forwarding messages received from a channel to a port in TCP/IP port forwarding.
-
-
Constructor Summary
Constructors Constructor Description ChannelToPortHandler(IoSession port, Channel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkWindow(byte cmd)
IoSession
getPortSession()
Retrieves theIoSession
for the port connection.void
handleEof()
Perform appropriate actions on the port session when the channel received an SSH_MSG_CHANNEL_EOF message.protected void
handleWriteDataFailure(byte cmd, byte[] data, int off, int len, java.lang.Throwable t)
protected void
handleWriteDataSuccess(byte cmd, byte[] data, int off, int len)
void
sendToPort(byte cmd, byte[] data, int off, long len)
-
-
-
Method Detail
-
getPortSession
public IoSession getPortSession()
Retrieves theIoSession
for the port connection.- Returns:
- the
IoSession
, nevernull
-
handleEof
public void handleEof() throws java.io.IOException
Perform appropriate actions on the port session when the channel received an SSH_MSG_CHANNEL_EOF message.- Throws:
java.io.IOException
-
sendToPort
public void sendToPort(byte cmd, byte[] data, int off, long len) throws java.io.IOException
- Throws:
java.io.IOException
-
handleWriteDataSuccess
protected void handleWriteDataSuccess(byte cmd, byte[] data, int off, int len)
-
handleWriteDataFailure
protected void handleWriteDataFailure(byte cmd, byte[] data, int off, int len, java.lang.Throwable t)
-
checkWindow
private void checkWindow(byte cmd)
-
-