![JAR search and dependency download from the Maven repository](/logo.png)
info.kwarc.sally4.mhw.base.impl.FSEventSubscriber Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mhw-base Show documentation
Show all versions of mhw-base Show documentation
Implements the interaction of assigning a MathHub document to a Worker.
The newest version!
package info.kwarc.sally4.mhw.base.impl;
import info.kwarc.sally4.mhw.base.IBuildWorkflow;
import info.kwarc.sally4.os.PathWatchEvent;
import info.kwarc.sally4.os.events.EventBusContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.eventbus.Subscribe;
public class FSEventSubscriber {
IBuildWorkflow newWorkflow;
EventBusContext context;
Logger log;
public FSEventSubscriber(EventBusContext context, IBuildWorkflow newWorkflow) {
log = LoggerFactory.getLogger(getClass());
this.newWorkflow = newWorkflow;
this.context = context;
context.register(this);
}
public void unregister() {
context.unregister(this);
}
@Subscribe public void onbuildWorkflowEvent(PathWatchEvent arg0) {
log.info("new FS event: "+arg0.getPath()+" "+arg0.getEventType());
newWorkflow.changeEvent(arg0);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy