Java tutorial
/* * GNetWatch * Copyright 2006, 2007, 2008 Alexandre Fenyo * gnetwatch@fenyo.net * * This file is part of GNetWatch. * * GNetWatch is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GNetWatch is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNetWatch; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ package net.fenyo.gnetwatch.activities; import java.util.LinkedList; import java.util.List; import net.fenyo.gnetwatch.*; import net.fenyo.gnetwatch.GUI.*; import net.fenyo.gnetwatch.actions.Action; import net.fenyo.gnetwatch.targets.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * This queue holds Nmap actions. * @author Alexandre Fenyo * @version $Id: NmapQueue.java,v 1.2 2008/04/15 23:58:17 fenyo Exp $ */ public class NmapQueue extends Queue implements Runnable { private static Log log = LogFactory.getLog(NmapQueue.class); /** * Constructor. * @param name queue name. * @param config configuration. */ // main thread public NmapQueue(final String name, final Config config) { super(name, config); setDescription(config.getString("dedicated_for_nmap")); } /** * Returns the time to wait after each cycle. * @param none. * @return int time to wait. */ // Queue thread protected int getCycleDelay() { return 1000; } /** * Returns the time to wait between empty cycles. * @param none. * @return time to wait. */ // Queue thread protected int getEmptyCycleDelay() { return 1000; } /** * Returns the time to wait between two actions. * @param none. * @return time to wait. */ // Queue thread protected int getActionDelay() { return 0; } }