package be.iminds.ilabt.jfed.highlevel.jobs.states;

import be.iminds.ilabt.jfed.experiment.SfaExperimentPart;
import be.iminds.ilabt.jfed.highlevel.jobs.Job;
import be.iminds.ilabt.jfed.highlevel.jobs.SingleCallState;
import be.iminds.ilabt.jfed.highlevel.tasks.HighLevelTaskFactory;
import be.iminds.ilabt.jfed.highlevel.tasks.ShareLanTask;

/**
 * User: twalcari
 * Date: 12/4/2015
 * Time: 15:30
 */
public class ShareLanAtAuthorityPartState extends SingleCallState<ShareLanTask> {

    protected ShareLanAtAuthorityPartState(Job<?> job, SfaExperimentPart experimentPart, HighLevelTaskFactory hltf, String linkClientId, String sharedLanName) {
        super(String.format("Sharing LAN \"%s\" as \"%s\" at %s", linkClientId, sharedLanName, experimentPart.getName()),
                hltf.getShareLanTask(experimentPart.getExperiment().getSlice(), experimentPart.getConnectSfaAuthority(), linkClientId, sharedLanName));
    }
}
