Skip to content

Instantly share code, notes, and snippets.

@shillem
Last active August 29, 2015 14:01
Show Gist options
  • Save shillem/b6a31b323808e7952bd5 to your computer and use it in GitHub Desktop.
Save shillem/b6a31b323808e7952bd5 to your computer and use it in GitHub Desktop.
tell dots tasklist
package com.still.demo;
import lotus.domino.NotesException;
import org.eclipse.core.runtime.IProgressMonitor;
import com.ibm.dots.annotation.Run;
import com.ibm.dots.task.AbstractServerTaskExt;
import com.ibm.dots.task.RunWhen;
public class Demo extends AbstractServerTaskExt {
@Override
public void dispose() throws NotesException {
// TODO Auto-generated method stub
}
@Override
protected void doRun(RunWhen arg0, IProgressMonitor arg1)
throws NotesException {
// TODO Auto-generated method stub
}
@Run(id = "doThis")
public void runThis(IProgressMonitor monitor) throws Exception {
logMessage("START: Countings 15 times for 2 seconds each");
monitor.beginTask("Sleeping well", 15);
for (int i = 0; i < 15; i++) {
monitor.worked(1);
Thread.sleep(2000);
if (monitor.isCanceled()) {
logMessage("Hai fatto una vaccata eh?");
break;
}
}
logMessage("END: Countings 15 times for 2 seconds each");
}
@Run(id = "doThat")
public void runThat(IProgressMonitor monitor) throws Exception {
logMessage("I did that");
}
}
> tell dots tasklist
05/08/2014 04:12:13 PM [DOTS]
05/08/2014 04:12:13 PM [DOTS] ID: com.still.demo.Demo
05/08/2014 04:12:13 PM [DOTS] Description: For demo's sake
05/08/2014 04:12:13 PM [DOTS] Run on start: false
05/08/2014 04:12:13 PM [DOTS] Run every: Not scheduled
05/08/2014 04:12:13 PM [DOTS] Last run: Never run
05/08/2014 04:12:13 PM [DOTS]
05/08/2014 04:12:13 PM [DOTS] ID: Demo.doThis
05/08/2014 04:12:13 PM [DOTS] Description: null
05/08/2014 04:12:13 PM [DOTS] Run on start: false
05/08/2014 04:12:13 PM [DOTS] Run every: Not scheduled
05/08/2014 04:12:13 PM [DOTS] Last run: Never run
05/08/2014 04:12:13 PM [DOTS]
05/08/2014 04:12:13 PM [DOTS] ID: Demo.doThat
05/08/2014 04:12:13 PM [DOTS] Description: null
05/08/2014 04:12:13 PM [DOTS] Run on start: false
05/08/2014 04:12:13 PM [DOTS] Run every: Not scheduled
05/08/2014 04:12:13 PM [DOTS] Last run: Never run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment