Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/wsplgen/WSPLGENFuture.java @ 4168:e6b0d0b160b7
Added extracted doc from ChangeLog to READMEs in flys-artifact and flys-artifacts/contrib/.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 17 Oct 2012 22:58:52 +0200 |
parents | 368040e5c400 |
children |
line wrap: on
line source
package de.intevation.flys.wsplgen; import java.util.concurrent.FutureTask; import org.apache.log4j.Logger; /** * This FutureTask overrides the <i>cancel()</i> method. Before super.cancel() * is called, WSPLGENCallable.cancelWSPLGEN() is executed to kill a running * WSPLGEN process. * * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class WSPLGENFuture extends FutureTask { private static final Logger logger = Logger.getLogger(WSPLGENFuture.class); protected WSPLGENCallable wsplgenCallable; public WSPLGENFuture(WSPLGENCallable callable) { super(callable); this.wsplgenCallable = callable; } public WSPLGENCallable getWSPLGENCallable() { return wsplgenCallable; } @Override public boolean cancel(boolean mayInterruptIfRunning) { logger.debug("WSPLGENFuture.cancel"); wsplgenCallable.cancelWSPLGEN(); return super.cancel(mayInterruptIfRunning); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :