/** * Defines a new {@link FlowAsyncTaskAction} instance that task is defined by a class that extends * {@link Runnable}. Whenever a action is triggered a new instance of the given class will be created. Therefore the * class needs a default constructor. All injection that is working in a controller class will work in the given * class that defines the task, too. The task of the action will run on a background thread. Therefore the default * instance of the {@link ObservableExecutor} will be used. * * @param runnableClass the class that defines the task */ public FlowAsyncTaskAction(Class<? extends Runnable> runnableClass) { this(runnableClass, ObservableExecutor.getDefaultInstance()); }
/** * Defines a new {@link FlowAsyncTaskAction} instance that task is defined by a {@link Runnable} instance. The task * of the action will run on a background thread. Therefore the default instance of the {@link ObservableExecutor} * will be used. * * @param runnable defines the task and will be called whenever the action is triggered. */ public FlowAsyncTaskAction(Runnable runnable) { this(runnable, ObservableExecutor.getDefaultInstance()); }
public CrudObjectProperty(S entity, CrudListProperty<S, T> listProperty, CrudService<S, T> crudService) { this(entity, crudService, ObservableExecutor.getDefaultInstance()); this.listProperty = listProperty; }
@Override public ObservableExecutor getResource(ConcurrencyProvider annotation, Class<ObservableExecutor> cls, ViewContext<?> context) { return ObservableExecutor.getDefaultInstance(); }
public CrudListProperty(CrudService<S, T> crudService) { this(crudService, ObservableExecutor.getDefaultInstance()); }
public CrudObjectProperty(CrudService<S, T> crudService) { this(crudService, ObservableExecutor.getDefaultInstance()); }
/** * default constructor */ private EventSystem() { consumers = FXCollections.observableHashMap(); asyncConsumers = FXCollections.observableHashMap(); exceptionHandler = ExceptionHandler.getDefaultInstance(); executor = ObservableExecutor.getDefaultInstance(); }
@Override protected void executeTask(Task<V> task) { cancelable.unbind(); if (task instanceof DataFxTask) { cancelable.bind(((DataFxTask<V>) task).cancelableProperty()); } Executor e = getExecutor(); if (e != null) { e.execute(task); } else { ObservableExecutor.getDefaultInstance().execute(task); } }
for (EventProducerImpl eventProducer : eventProducers) { if (eventProducer.getThreadType().equals(ThreadType.EXECUTOR)) { ObservableExecutor.getDefaultInstance().execute(() -> { EventSystem.getInstance().send(eventProducer.getAdress(), eventProducer.getContentSupplier().get()); });