|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.maverick.sshd.Channel
com.maverick.sshd.tunnel.ForwardingChannel
com.maverick.sshd.tunnel.SocketForwardingChannel
public abstract class SocketForwardingChannel
An abstract forwarding channel implementation for use with forwarding both local and remote sockets.
ForwardingChannel| Nested Class Summary | |
|---|---|
protected class |
SocketForwardingChannel.QueuedData
|
| Field Summary |
|---|
| Fields inherited from class com.maverick.sshd.tunnel.ForwardingChannel |
|---|
hostToConnect, originatingHost, originatingPort, portToConnect |
| Fields inherited from class com.maverick.sshd.Channel |
|---|
connection, localwindow, localWindowLock, state |
| Constructor Summary | |
|---|---|
SocketForwardingChannel(String channeltype)
Construct the forwarding channel. |
|
| Method Summary | |
|---|---|
protected boolean |
canClose()
Can this channel close? |
protected abstract byte[] |
createChannel()
Called when the channel is being created. |
protected void |
evaluateClosure()
set the closePending flag to true and attempt to close the channel |
protected void |
evaluateWindowSpace(long remaining)
Called to evaluate the window space available. |
protected void |
onChannelClosed()
Called when the channel has been closed to enable resources to be freed. |
protected void |
onChannelClosing()
does nothing |
protected void |
onChannelData(byte[] data)
Called by the channel when data arrives from the remote side. |
protected void |
onChannelFree()
does nothing |
protected void |
onChannelOpen()
does nothing |
protected void |
onChannelOpenConfirmation()
Called when the channel has been confirmed as open by the remote side - this method is only called when the channel has been requested by this side of the connection |
protected void |
onChannelRequest(String parm1,
boolean parm2,
byte[] parm3)
Called when a channel request is received. |
protected void |
onExtendedData(byte[] data,
int type)
does nothing |
protected void |
onLocalEOF()
The start of the tunnel has gone EOF , if the end of the tunnel has already gone EOF then close the tunnel. |
protected void |
onRemoteClose()
We override this to make sure that all data from the socket has been sent before we close our side of the channel |
protected void |
onRemoteEOF()
The end of the tunnel has gone EOF , if the start of the tunnel has already gone EOF then close the tunnel. |
protected abstract byte[] |
openChannel(byte[] parm1)
Called when the channel is being opened. |
void |
sendChannelData(org.apache.mina.core.buffer.IoBuffer buf,
Runnable r)
|
| Methods inherited from class com.maverick.sshd.tunnel.ForwardingChannel |
|---|
getHost, getInformation, getOriginatingHost, getOriginatingPort, getPort |
| Methods inherited from class com.maverick.sshd.Channel |
|---|
addEventListener, addInputListener, addOutputListener, close, getConnection, getContext, getLocalId, getLocalPacket, getLocalWindow, getName, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, hasQueuedData, idle, isClosed, isClosing, isEOF, isLocalEOF, isOpen, isRemoteEOF, onChannelOpenFailure, onWindowAdjust, queueSize, registerExtendedData, removeEventListener, sendChannelData, sendChannelRequest, sendEOF, sendExtendedData, sendRequestResponse, sendWindowAdjust |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketForwardingChannel(String channeltype)
channeltype - the type of channel i.e. "forwarded-tcpip"| Method Detail |
|---|
protected void onChannelOpen()
onChannelOpen in class Channelprotected void onChannelOpenConfirmation()
Channel
onChannelOpenConfirmation in class Channel
protected abstract byte[] createChannel()
throws IOException,
com.maverick.ssh.common.ChannelOpenException
Channel
createChannel in class ChannelIOException
com.maverick.ssh.common.ChannelOpenException
public void sendChannelData(org.apache.mina.core.buffer.IoBuffer buf,
Runnable r)
sendChannelData in class Channelprotected void onChannelData(byte[] data)
Channel
onChannelData in class Channel
protected void onExtendedData(byte[] data,
int type)
onExtendedData in class Channel
protected void onChannelRequest(String parm1,
boolean parm2,
byte[] parm3)
Channel
onChannelRequest in class Channelprotected void onChannelFree()
onChannelFree in class Channelprotected void onChannelClosing()
onChannelClosing in class Channelprotected boolean canClose()
Channel
canClose in class Channelprotected void onRemoteClose()
onRemoteClose in class Channelprotected void evaluateClosure()
protected void onChannelClosed()
Channel
onChannelClosed in class Channelprotected void onLocalEOF()
onLocalEOF in class Channelprotected void onRemoteEOF()
onRemoteEOF in class Channelprotected void evaluateWindowSpace(long remaining)
Channel
evaluateWindowSpace in class Channel
protected abstract byte[] openChannel(byte[] parm1)
throws WriteOperationRequest,
com.maverick.ssh.common.ChannelOpenException
Channel
openChannel in class ChannelWriteOperationRequest
com.maverick.ssh.common.ChannelOpenException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||