package de.wwwu.awolf.view.services;

import de.wwwu.awolf.presenter.Presenter;
import de.wwwu.awolf.view.ViewController;
import javafx.concurrent.Service;
import javafx.concurrent.Task;

public class GuiRegisterService extends Service<String> {

    private final ViewController view;


    public GuiRegisterService(final ViewController view) {
        this.view = view;
    }

    @Override
    protected Task<String> createTask() {
        return new Task<>() {
            @Override
            protected String call() throws Exception {
                Presenter.getInstance().registerView(view);
                return "Done";
            }
        };
    }

}
