/** * @return * @throws IOException */ private List<PortForwarder> startForwarding() throws IOException { List<PortForwarder> res = new ArrayList<PortForwarder>(); res.add(new PortForwarder(8301, 7301)); res.add(new PortForwarder(8401, 7401)); res.add(new PortForwarder(7302, 8302)); res.add(new PortForwarder(7402, 8402)); res.add(new PortForwarder(7303, 8303)); res.add(new PortForwarder(7403, 8403)); return res; }
/** * @param pfs * @throws Exception */ private void stopForwarding(List<PortForwarder> pfs) throws Exception { for (PortForwarder pf : pfs) { pf.shutdown(); } }