public class RemoteForwardingManager extends ForwardingManager
forwardingFactories, listeningPorts
Constructor and Description |
---|
RemoteForwardingManager() |
Modifier and Type | Method and Description |
---|---|
RemoteForwardingFactory |
getRemoteForwardingFactory(int port)
Get the
RemoteForwardingFactory implementation for a given port. |
boolean |
isListening(int port)
Is there an existing forwarding listening on a particular port?
|
void |
registerConnection(ConnectionProtocol connection,
Class<? extends RemoteForwardingFactory> remoteForwardingFactoryImpl)
Register a connection with the forwarding manager.
|
int |
startRemoteForwarding(String addressToBind,
int portToBind,
ConnectionProtocol connection)
Start remote forwarding.
|
int |
startRemoteForwarding(String addressToBind,
int portToBind,
ConnectionProtocol connection,
String channelType) |
boolean |
startX11Forwarding(boolean singleConnection,
String protocol,
byte[] cookie,
int screen,
ConnectionProtocol connection) |
boolean |
stopRemoteForwarding(String addressToBind,
int portToBind,
boolean dropActiveTunnels,
ConnectionProtocol connection)
Stop remote forwarding.
|
void |
unregisterConnection(ConnectionProtocol connection)
Unregister a connection with the remote forwarding manager.
|
getInstance
public void registerConnection(ConnectionProtocol connection, Class<? extends RemoteForwardingFactory> remoteForwardingFactoryImpl)
connection
- ConnectionProtocolremoteForwardingFactoryImpl
- Classpublic void unregisterConnection(ConnectionProtocol connection)
connection
- ConnectionProtocolpublic boolean isListening(int port)
port
- intpublic RemoteForwardingFactory getRemoteForwardingFactory(int port) throws IOException
RemoteForwardingFactory
implementation for a given port.port
- intIOException
public int startRemoteForwarding(String addressToBind, int portToBind, ConnectionProtocol connection)
addressToBind
- StringportToBind
- intconnection
- ConnectionProtocolpublic int startRemoteForwarding(String addressToBind, int portToBind, ConnectionProtocol connection, String channelType)
public boolean stopRemoteForwarding(String addressToBind, int portToBind, boolean dropActiveTunnels, ConnectionProtocol connection)
addressToBind
- StringportToBind
- intdropActiveTunnels
- booleanconnection
- ConnectionProtocolpublic boolean startX11Forwarding(boolean singleConnection, String protocol, byte[] cookie, int screen, ConnectionProtocol connection)
Copyright © 2024. All rights reserved.