public class ForwardingManager<T extends SshContext> extends Object implements ConnectionStateListener<T>
Modifier and Type | Field and Description |
---|---|
protected Map<Integer,ForwardingFactory<T>> |
listeningPorts |
Constructor and Description |
---|
ForwardingManager() |
Modifier and Type | Method and Description |
---|---|
void |
connected(Connection<T> con) |
void |
disconnected(Connection<T> con) |
boolean |
isListening(int port)
Is there an existing forwarding listening on a particular port?
|
int |
startListening(String addressToBind,
int portToBind,
Connection<T> con,
SocketListeningForwardingFactoryImpl<T> forwardingFactory) |
boolean |
startX11Forwarding(boolean singleConnection,
String protocol,
byte[] cookie,
int screen,
ConnectionProtocol<T> connection) |
boolean |
stopListening(String addressToBind,
int portToBind,
boolean dropActiveTunnels,
Connection<T> connection)
Stop remote forwarding.
|
protected Map<Integer,ForwardingFactory<T extends SshContext>> listeningPorts
public boolean isListening(int port)
port
- intpublic int startListening(String addressToBind, int portToBind, Connection<T> con, SocketListeningForwardingFactoryImpl<T> forwardingFactory) throws SshException
SshException
public boolean stopListening(String addressToBind, int portToBind, boolean dropActiveTunnels, Connection<T> connection)
addressToBind
- StringportToBind
- intdropActiveTunnels
- booleanconnection
- ConnectionProtocolpublic boolean startX11Forwarding(boolean singleConnection, String protocol, byte[] cookie, int screen, ConnectionProtocol<T> connection)
public void connected(Connection<T> con)
connected
in interface ConnectionStateListener<T extends SshContext>
public void disconnected(Connection<T> con)
disconnected
in interface ConnectionStateListener<T extends SshContext>
Copyright © 2016. All rights reserved.