|
||||||||||
| 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.ForwardingChannel
com.maverick.sshd.SocketForwardingChannel
An abstract forwarding channel implementation for use with forwarding both local and remote sockets.
ForwardingChannel| Nested Class Summary |
| Nested classes inherited from class com.maverick.sshd.Channel |
Channel.QueuedData |
| Field Summary |
| Fields inherited from class com.maverick.sshd.ForwardingChannel |
hostToConnect, originatingHost, originatingPort, portToConnect |
| Fields inherited from class com.maverick.sshd.Channel |
connection, localwindow, localWindowLock |
| Constructor Summary | |
SocketForwardingChannel(java.lang.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(int remaining)
Called to evaluate the window space available. |
int |
getInterestedOps()
Returns the current operations the handler is interested in |
void |
initialize(ProtocolEngine engine,
Daemon daemon)
No initialization is necessary so this method does nothing. |
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)
data has arrived from the end of the tunnel so add to the queue of data heading towards the start of the tunnel |
protected void |
onChannelFree()
does nothing |
protected void |
onChannelOpen()
does nothing |
protected abstract 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(java.lang.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 abstract void |
onRegistrationComplete()
Called by the subsystem when the selector registration has been completed. |
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. |
boolean |
processReadEvent()
read data from the start/end of tunnel and write it into the ssh tunnel. |
boolean |
processWriteEvent()
read data from the ssh tunnel and write it to the start/end point. |
void |
registrationCompleted(java.nio.channels.SelectableChannel channel,
java.nio.channels.SelectionKey key,
SelectorThread selectorThread)
The registration completed and its selector added to an available SelectorThread |
void |
setThread(SelectorThread thread)
Sets the selector thread for this connection |
protected void |
shutdownSocket()
|
| Methods inherited from class com.maverick.sshd.ForwardingChannel |
getHost, getOriginatingHost, getOriginatingPort, getPort |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SocketForwardingChannel(java.lang.String channeltype)
channeltype - the type of channel i.e. "forwarded-tcpip"| Method Detail |
protected void onChannelOpen()
onChannelOpen in class Channel
public void initialize(ProtocolEngine engine,
Daemon daemon)
initialize in interface SocketHandlerengine - ProtocolEnginedaemon - Daemon
protected abstract byte[] createChannel()
throws java.io.IOException
Channel
createChannel in class Channeljava.io.IOException
protected void onExtendedData(byte[] data,
int type)
onExtendedData in class Channeldata - protected abstract void onRegistrationComplete()
public void registrationCompleted(java.nio.channels.SelectableChannel channel,
java.nio.channels.SelectionKey key,
SelectorThread selectorThread)
SelectorRegistrationListenerSelectorThread
registrationCompleted in interface SelectorRegistrationListenerchannel - SelectableChannelkey - SelectionKeyselectorThread - SelectorThreadprotected void onChannelData(byte[] data)
onChannelData in class Channeldata -
protected void onChannelRequest(java.lang.String parm1,
boolean parm2,
byte[] parm3)
Channel
onChannelRequest in class Channelparm1 - parm2 - parm3 - protected 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 shutdownSocket()
protected void onChannelClosed()
Channel
onChannelClosed in class Channelprotected void onLocalEOF()
onLocalEOF in class Channelprotected void onRemoteEOF()
onRemoteEOF in class Channelprotected abstract void onChannelOpenConfirmation()
Channel
onChannelOpenConfirmation in class Channelprotected void evaluateWindowSpace(int remaining)
Channel
evaluateWindowSpace in class Channelremaining -
protected abstract byte[] openChannel(byte[] parm1)
throws WriteOperationRequest,
ChannelOpenException
Channel
openChannel in class Channelparm1 -
ChannelOpenException
WriteOperationRequestpublic boolean processReadEvent()
processReadEvent in interface SocketHandlerpublic boolean processWriteEvent()
processWriteEvent in interface SocketHandlerpublic int getInterestedOps()
SocketHandler
getInterestedOps in interface SocketHandlerpublic void setThread(SelectorThread thread)
setThread in interface SocketHandlerthread - SelectorThread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||