package be.iminds.ilabt.jfed.highlevel.tasks;

import be.iminds.ilabt.jfed.highlevel.controller.Task;
import be.iminds.ilabt.jfed.highlevel.model.Slice;
import be.iminds.ilabt.jfed.log.ResultListener;
import be.iminds.ilabt.jfed.fedmon.webapi.service.json.*;
import be.iminds.ilabt.jfed.util.GeniUrn;

import javax.annotation.Nonnull;
import java.time.Instant;
import java.util.Collection;

/**
 * User: twalcari
 * Date: 6/18/2015
 * Time: 13:26
 */
public interface SliceAuthorityTaskFactory {
    RegisterSliversTask registerSlivers(Slice slice, Server auth, Collection<GeniUrn> sliverUrns,
                                        Instant sliverExpirationDate, Task extraTaskToDependOn, ResultListener... extraResultListeners);

    UnregisterSliversTask unregisterSlivers(@Nonnull Slice slice, @Nonnull Server auth);

    UnregisterSliversTask unregisterSlivers(@Nonnull Slice slice, @Nonnull Server auth,
                                            @Nonnull Collection<GeniUrn> sliversToUnregister, Task extraDependsOnTask,
                                            ResultListener... resultListeners);
}
