/*
* Update the port monitor to show a remote tunnel with
* no active connections when starting or remove it when
* stopping
*/
PortMonitor portMonitor = agent.getGUI().getPortMonitor();
if(request.getRequestName().equals(START_REMOTE_TUNNEL)) {
TunnelConfiguration conf = new DefaultTunnel(
resourceId, TunnelConfiguration.REMOTE_TUNNEL, TunnelConfiguration.TCP_TUNNEL, listeningInterface, listeningPort, destinationPort, destinationHost, true, false, resourceName, launchId);
RemotePortItem portItem = new RemotePortItem(conf);
portMonitor.addPortItem(portItem);
}
else {
int idx = portMonitor.getIndexForId(resourceId);
if(idx != -1) {
portMonitor.removeItemAt(idx);
}
}
return true;
} catch (IOException e) {