Back to project page EvokeFramework.
The source code is released under:
Apache License
If you think the Android project EvokeFramework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.fs.net.evoke.th; //from w ww. ja va 2 s.c om /** * Created by Fatih on 28/01/15. * as org.fs.net.evoke.th.AbstractRunnable */ public abstract class AbstractRunnable implements Runnable { private final String name; public AbstractRunnable(String format, Object... args) { this.name = String.format(format, args); } /** * final part of run method, this has name swapping in runtime. */ @Override public final void run() { String oldName = Thread.currentThread().getName(); Thread.currentThread().setName(name); try { execute(); } finally { Thread.currentThread().setName(oldName); } } /** * Execute part for thread to run this. */ protected abstract void execute(); }