com.mindbright.ssh2
public class SSH2ConnectionEventAdapter extends java.lang.Object implements SSH2ConnectionEventHandler
SSH2ConnectionEventHandler.SSH2ConnectionEventHandler| Constructor and Description |
|---|
SSH2ConnectionEventAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
channelAdded(SSH2Connection connection,
SSH2Channel channel)
Called when a new channel is added.
|
void |
channelClosed(SSH2Connection connection,
SSH2Channel channel)
Called when a channel is closed.
|
void |
channelConnect(java.lang.Object originator,
SSH2Channel channel,
java.net.Socket fwdSocket)
Called when a channel is connected to a
Socket. |
void |
channelDeleted(SSH2Connection connection,
SSH2Channel channel)
Called when a channel is deleted.
|
boolean |
listenerAccept(SSH2Listener listener,
java.net.Socket fwdSocket)
Called when a listener accepts a new connection.
|
void |
localChannelOpenFailure(SSH2Connection connection,
SSH2Channel channel,
int reasonCode,
java.lang.String reasonText,
java.lang.String languageTag)
Called on either side when a locally originating channel gets a channel
open failure indication from peer.
|
void |
localDirectConnect(SSH2Connection connection,
SSH2Listener listener,
SSH2Channel channel)
Called on the client side when a local forward channel is confirmed to
be open.
|
void |
localForwardedConnect(SSH2Connection connection,
SSH2Listener listener,
SSH2Channel channel)
Called on the server side when a remote forward channel is confirmed to
be open.
|
void |
localSessionConnect(SSH2Connection connection,
SSH2Channel channel)
Called on the client side when a session channel is confirmed to be open.
|
void |
localX11Connect(SSH2Connection connection,
SSH2Listener listener,
SSH2Channel channel)
Called on the server side when an X11 channel is confirmed to be open.
|
void |
remoteChannelOpenFailure(SSH2Connection connection,
java.lang.String channelType,
java.lang.String targetAddr,
int targetPort,
java.lang.String originAddr,
int originPort,
SSH2Exception cause)
Called on either side when there is a problem opening a remotely
originating channel resulting in a channel open failure indication beeing
sent back to peer.
|
void |
remoteDirectConnect(SSH2Connection connection,
SSH2Channel channel)
Called on the client side when a remote direct channel has been
confirmed to be open.
|
void |
remoteForwardedConnect(SSH2Connection connection,
java.lang.String remoteAddr,
int remotePort,
SSH2Channel channel)
Called on the client side when a remote forward channel has been
confirmed to be open.
|
void |
remoteSessionConnect(SSH2Connection connection,
java.lang.String remoteAddr,
int remotePort,
SSH2Channel channel)
Called on the client side when a remote session channel has been
confirmed to be open.
|
void |
remoteX11Connect(SSH2Connection connection,
SSH2Channel channel)
Called on the client side when a remote X11 channel has been
confirmed to be open.
|
void |
setSocketOptions(int channelType,
java.net.Socket s)
Called to set socket options on newly connected port forward channels
|
public void channelAdded(SSH2Connection connection, SSH2Channel channel)
SSH2ConnectionEventHandlerchannelAdded in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was addedpublic void channelDeleted(SSH2Connection connection, SSH2Channel channel)
SSH2ConnectionEventHandlerchannelDeleted in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was deletedpublic void channelConnect(java.lang.Object originator,
SSH2Channel channel,
java.net.Socket fwdSocket)
SSH2ConnectionEventHandlerSocket.channelConnect in interface SSH2ConnectionEventHandleroriginator - the responsible listener/connectorchannel - the created channelfwdSocket - the socket which is connected topublic void channelClosed(SSH2Connection connection, SSH2Channel channel)
SSH2ConnectionEventHandlerchannelClosed in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was deletedpublic boolean listenerAccept(SSH2Listener listener, java.net.Socket fwdSocket)
SSH2ConnectionEventHandlertrue or
false.listenerAccept in interface SSH2ConnectionEventHandlerlistener - the responsible listenerfwdSocket - the socket which resultedboolean indicating wether to process connection or
not.public void localForwardedConnect(SSH2Connection connection, SSH2Listener listener, SSH2Channel channel)
SSH2ConnectionEventHandlerlocalForwardedConnect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblelistener - the responsible listenerchannel - the channel which was openedpublic void localDirectConnect(SSH2Connection connection, SSH2Listener listener, SSH2Channel channel)
SSH2ConnectionEventHandlerlocalDirectConnect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblelistener - the responsible listenerchannel - the channel which was openedpublic void localSessionConnect(SSH2Connection connection, SSH2Channel channel)
SSH2ConnectionEventHandlerlocalSessionConnect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was openedpublic void localX11Connect(SSH2Connection connection, SSH2Listener listener, SSH2Channel channel)
SSH2ConnectionEventHandlerlocalX11Connect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblelistener - the responsible listenerchannel - the channel which was openedpublic void localChannelOpenFailure(SSH2Connection connection, SSH2Channel channel, int reasonCode, java.lang.String reasonText, java.lang.String languageTag)
SSH2ConnectionEventHandlerSSH2 for
reason codes.localChannelOpenFailure in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was openedreasonCode - the reason codeSSH2public void remoteForwardedConnect(SSH2Connection connection, java.lang.String remoteAddr, int remotePort, SSH2Channel channel)
SSH2ConnectionEventHandlerremoteForwardedConnect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was openedpublic void remoteDirectConnect(SSH2Connection connection, SSH2Channel channel)
SSH2ConnectionEventHandlerremoteDirectConnect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was openedpublic void remoteSessionConnect(SSH2Connection connection, java.lang.String remoteAddr, int remotePort, SSH2Channel channel)
SSH2ConnectionEventHandlerremoteSessionConnect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was openedpublic void remoteX11Connect(SSH2Connection connection, SSH2Channel channel)
SSH2ConnectionEventHandlerremoteX11Connect in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannel - the channel which was openedpublic void remoteChannelOpenFailure(SSH2Connection connection, java.lang.String channelType, java.lang.String targetAddr, int targetPort, java.lang.String originAddr, int originPort, SSH2Exception cause)
SSH2ConnectionEventHandlerremoteChannelOpenFailure in interface SSH2ConnectionEventHandlerconnection - the connection layer responsiblechannelType - the type of channeltargetAddr - the address which should have been connected totargetPort - the port which should have been connected tooriginAddr - the address where the channel originated (depends on type)originPort - the port where the channel originated (depends on type)cause - the exception which was the cause of the problempublic void setSocketOptions(int channelType,
java.net.Socket s)
SSH2ConnectionEventHandlersetSocketOptions in interface SSH2ConnectionEventHandlerchannelType - the type of the channels - socket to manipulate