for (Tunnel tunnel : tunnels) {
try {
RemoteTunnel rt = RemoteTunnelManagerFactory.getInstance().getRemoteTunnel(tunnel.getResourceId());
if (rt != null) {
rt.stopListener();
} else {
throw new Exception("No active with ID for " + tunnel.getResourceId());
}
} catch (Exception ex) {
throw new TunnelException(TunnelException.INTERNAL_ERROR, ex);