Package spin.off
Class SpinOffEvaluator
- java.lang.Object
-
- spin.Evaluator
-
- spin.off.SpinOffEvaluator
-
public class SpinOffEvaluator extends Evaluator
An evaluator for spin-off, i.e. all invocations are evaluated on another thread than the EDT while further events are dispatched.- See Also:
Starter
,DispatcherFactory
-
-
Constructor Summary
Constructors Constructor Description SpinOffEvaluator()
Create an evaluator for spin-off using the default dispatcherFactory and starter.SpinOffEvaluator(DispatcherFactory dispatcherFactory)
Create an evaluator for spin-off using the default starter.SpinOffEvaluator(DispatcherFactory dispatcherFactory, Starter starter)
Create an evaluator for spin-off.SpinOffEvaluator(Starter starter)
Create an evaluator for spin-off using the default dispatcherFactory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
evaluate(Invocation invocation)
Spin the given invocation off the EDT.static DispatcherFactory
getDefaultDispatcherFactory()
Get the default dispatcher factory.static Starter
getDefaultStarter()
Get the default starter.static void
setDefaultDispatcherFactory(DispatcherFactory dispatcherFactory)
Set the default dispatcher factory.static void
setDefaultStarter(Starter starter)
Set the default starter.
-
-
-
Constructor Detail
-
SpinOffEvaluator
public SpinOffEvaluator()
Create an evaluator for spin-off using the default dispatcherFactory and starter.
-
SpinOffEvaluator
public SpinOffEvaluator(DispatcherFactory dispatcherFactory)
Create an evaluator for spin-off using the default starter.- Parameters:
dispatcherFactory
- factory of dispatchers- See Also:
setDefaultStarter(Starter)
-
SpinOffEvaluator
public SpinOffEvaluator(Starter starter)
Create an evaluator for spin-off using the default dispatcherFactory.- Parameters:
starter
- starter- See Also:
setDefaultDispatcherFactory(DispatcherFactory)
-
SpinOffEvaluator
public SpinOffEvaluator(DispatcherFactory dispatcherFactory, Starter starter)
Create an evaluator for spin-off.- Parameters:
dispatcherFactory
- factory of dispatchersstarter
- starter
-
-
Method Detail
-
evaluate
public final void evaluate(Invocation invocation) throws java.lang.Throwable
Spin the given invocation off the EDT.
-
getDefaultDispatcherFactory
public static DispatcherFactory getDefaultDispatcherFactory()
Get the default dispatcher factory.- Returns:
- default factory of dispatchers
-
setDefaultDispatcherFactory
public static void setDefaultDispatcherFactory(DispatcherFactory dispatcherFactory)
Set the default dispatcher factory.- Parameters:
dispatcherFactory
- the factory of dispatchers to use as default
-
getDefaultStarter
public static Starter getDefaultStarter()
Get the default starter.- Returns:
- default starter
-
setDefaultStarter
public static void setDefaultStarter(Starter starter)
Set the default starter.- Parameters:
starter
- the starter to use as default
-
-