de.uni.freiburg.iig.telematik.sepia.replay.ThreadedReplayer Maven / Gradle / Ivy
Show all versions of SEPIA Show documentation
package de.uni.freiburg.iig.telematik.sepia.replay;
import java.util.concurrent.ExecutionException;
import de.invation.code.toval.thread.AbstractCallable;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractFlowRelation;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractMarking;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractPlace;
import de.uni.freiburg.iig.telematik.sepia.petrinet.abstr.AbstractTransition;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.threaded.AbstractThreadedPNPropertyChecker;
import de.uni.freiburg.iig.telematik.sewol.log.LogEntry;
public class ThreadedReplayer,
T extends AbstractTransition,
F extends AbstractFlowRelation,
M extends AbstractMarking,
S extends Object,
E extends LogEntry>
extends AbstractThreadedPNPropertyChecker
,
ReplayResult,
ReplayException>{
protected ThreadedReplayer(ReplayCallableGenerator generator){
super(generator);
}
@SuppressWarnings("unchecked")
@Override
protected ReplayCallableGenerator
getGenerator() {
return (ReplayCallableGenerator
) super.getGenerator();
}
@Override
protected AbstractCallable> createCallable() {
return new ReplayCallable(getGenerator());
}
@Override
protected ReplayException createException(String message, Throwable cause) {
return new ReplayException(message, cause);
}
@Override
protected ReplayException executionException(ExecutionException e) {
if(e.getCause() instanceof ReplayException)
return (ReplayException) e.getCause();
return new ReplayException("Exception during replay", e);
}
@Override
protected ReplayResult getResultFromCallableResult(ReplayResult callableResult) throws Exception {
return callableResult;
}
}