Top Description Fields Constructors Methods
org.apache.sshd.common.forward

public Class ChannelToPortHandler

extends AbstractLoggingBean
Class Inheritance
Imports
java.io.IOException, java.util.Objects, org.apache.sshd.common.SshConstants, org.apache.sshd.common.channel.Channel, .LocalWindow, org.apache.sshd.common.io.IoSession, org.apache.sshd.common.util.ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, .ByteArrayBuffer, org.apache.sshd.common.util.logging.AbstractLoggingBean

Implements forwarding messages received from a channel to a port in TCP/IP port forwarding.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final Channel
private final IoSession
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
checkWindow(byte cmd, long len)

public IoSession

Returns:

the IoSession, never null
getPortSession
()

Retrieves the IoSession for the port connection.

public 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, Throwable t)

protected void
handleWriteDataSuccess(byte cmd, byte[] data, int off, int len)

public void
sendToPort(byte cmd, byte[] data, int off, long len)

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

channelback to summary
private final Channel channel
portback to summary
private final IoSession port

Constructor Detail

ChannelToPortHandlerback to summary
public ChannelToPortHandler(IoSession port, Channel channel)

Method Detail

checkWindowback to summary
private void checkWindow(byte cmd, long len)
getPortSessionback to summary
public IoSession getPortSession()

Retrieves the IoSession for the port connection.

Returns:IoSession

the IoSession, never null

handleEofback to summary
public void handleEof() throws IOException

Perform appropriate actions on the port session when the channel received an SSH_MSG_CHANNEL_EOF message.

handleWriteDataFailureback to summary
protected void handleWriteDataFailure(byte cmd, byte[] data, int off, int len, Throwable t)
handleWriteDataSuccessback to summary
protected void handleWriteDataSuccess(byte cmd, byte[] data, int off, int len)
sendToPortback to summary
public void sendToPort(byte cmd, byte[] data, int off, long len) throws IOException