Set activeTunnels = ((TunnelingService) DefaultAgentManager.getInstance().getService(TunnelingService.class))
.getActiveTunnels(LogonControllerFactory.getInstance().getSessionInfo(request));
SessionInfo sessionInfo = LogonControllerFactory.getInstance().getSessionInfo(request);
LaunchSession launchSession = activeTunnels.contains(Integer.valueOf(tunnel.getResourceId())) ? LaunchSessionFactory
.getInstance().getFirstLaunchSessionForResource(sessionInfo, tunnel) : null;
return new WrappedFavoriteItem(new TunnelItem(tunnel, null, launchSession), type);
} else
return new WrappedFavoriteItem(new TunnelItem(tunnel, null, null), type);
}