Package com.sshtools.synergy.ssh
Interface ForwardingChannelFactory<T extends SshContext>
- All Known Implementing Classes:
SocketListeningForwardingChannelFactoryImpl
public interface ForwardingChannelFactory<T extends SshContext>
This interface defines the behaviour for remote forwarding requests. When an SSH client requests
a remote forwarding we typically open a server socket, accept connections and
open remote forwarding channels on the client.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbelongsTo(ConnectionProtocol<T> connection) Does this factory belong to the connection provided?intbindInterface(String addressToBind, int portToBind, ConnectionProtocol<?> connection, String channelType) intbindInterface(String addressToBind, int portToBind, ConnectionProtocol<T> connection) A client has requested that the server start listening and forward any subsequent connections to the client.Get the underlying channel type for this forwarding factory.intintvoidstopListening(boolean dropActiveTunnels) Stop listening on active interfaces.
-
Method Details
-
bindInterface
int bindInterface(String addressToBind, int portToBind, ConnectionProtocol<T> connection) throws IOException A client has requested that the server start listening and forward any subsequent connections to the client.- Parameters:
addressToBind- StringportToBind- intconnection- ConnectionProtocol- Throws:
IOException
-
bindInterface
int bindInterface(String addressToBind, int portToBind, ConnectionProtocol<?> connection, String channelType) throws IOException - Parameters:
addressToBind-portToBind-connection-channelType-- Throws:
IOException
-
belongsTo
Does this factory belong to the connection provided?- Parameters:
connection- ConnectionProtocol- Returns:
- boolean
-
stopListening
void stopListening(boolean dropActiveTunnels) Stop listening on active interfaces.- Parameters:
dropActiveTunnels- boolean
-
getChannelType
String getChannelType()Get the underlying channel type for this forwarding factory. -
getStartedEventCode
int getStartedEventCode() -
getStoppedEventCode
int getStoppedEventCode() -
getActiveTunnelManager
SocketListeningForwardingChannelFactoryImpl.ActiveTunnelManager<T> getActiveTunnelManager()
-