Skip to content

Instantly share code, notes, and snippets.

@edermfl
Created November 17, 2016 11:07
Show Gist options
  • Save edermfl/6dcdddd22f3405063b34fed9aa993913 to your computer and use it in GitHub Desktop.
Save edermfl/6dcdddd22f3405063b34fed9aa993913 to your computer and use it in GitHub Desktop.
public class GerenciadorContexto {
private static final ThreadLocal<IParametrosProcesso> contexto =
new ThreadLocal<IParametrosProcesso>();
public static IParametrosProcesso getParametros() {
return contexto.get();
}
public static void setParametros(
final IParametrosProcesso pParametros) {
contexto.set(pParametros);
}
public static void clean() {
contexto.set(null);
contexto.remove();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment