Skip to content

Instantly share code, notes, and snippets.

@germanescobar
Created October 7, 2017 20:33
Show Gist options
  • Save germanescobar/c2ddf9c834848617b3b1a0e326f2b0bf to your computer and use it in GitHub Desktop.
Save germanescobar/c2ddf9c834848617b3b1a0e326f2b0bf to your computer and use it in GitHub Desktop.
ConvertLoop class example in Java
import org.springframework.core.task.TaskExecutor;
// otros imports
public class ConvertLoop {
private TaskExecutor taskExecutor;
public void userRegistered(final User user) {
taskExecutor.execute(new Runnable() {
@Override
public void run() {
// acá ira el código de ConvertLoop
}
}
}
public void setTaskExecutor(TaskExecutor taskExecutor) {
this.taskExecutor = taskExecutor;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment