Package org.opentrafficsim.core.egtf
Class EgtfParallelListener
- java.lang.Object
-
- org.opentrafficsim.core.egtf.EgtfParallelListener
-
- All Implemented Interfaces:
EventListener,EgtfListener
public class EgtfParallelListener extends Object implements EgtfListener
Listener that allows another thread to monitor, report on, and wait for the filtering result.Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 24 okt. 2018
- Author:
- Wouter Schakel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FiltergetFilter()Get the filter results after the EGTF is done.voidinterrupt()Interrupts the EGTF.voidnotifyProgress(EgtfEvent event)Notifies progress.voidsetFilter(Filter filter)Set the filter results, this is done by the EGTF.StringtoString()doublewait(double untilProgress, long timeout)Waits until progress has been reached, or timeout was exceeded.
-
-
-
Method Detail
-
wait
public double wait(double untilProgress, long timeout) throws InterruptedExceptionWaits until progress has been reached, or timeout was exceeded.- Parameters:
untilProgress- double; progress to wait untiltimeout- long; time out in milliseconds- Returns:
- double; value equal to or above untilProgress, or lower if the timeout was exceeded
- Throws:
InterruptedException- when the calling thread is interrupted
-
setFilter
public void setFilter(Filter filter)
Set the filter results, this is done by the EGTF.- Parameters:
filter- Filter; filter results
-
getFilter
public Filter getFilter()
Get the filter results after the EGTF is done.- Returns:
- Filter; filter results
-
notifyProgress
public void notifyProgress(EgtfEvent event)
Notifies progress.- Specified by:
notifyProgressin interfaceEgtfListener- Parameters:
event- EgtfEvent; event
-
interrupt
public void interrupt()
Interrupts the EGTF.
-
-