Package pl.morgwai.base.guice.scopes
Class ContextTracker<Ctx extends ServerSideContext<Ctx>>
- java.lang.Object
-
- pl.morgwai.base.guice.scopes.ContextTracker<Ctx>
-
- Direct Known Subclasses:
ThreadLocalContextTracker
public abstract class ContextTracker<Ctx extends ServerSideContext<Ctx>> extends Object
Allows to track which server-side call is handled by which thread.
-
-
Constructor Summary
Constructors Constructor Description ContextTracker()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract void
clearCurrentContext()
For internal use.abstract Ctx
getCurrentContext()
protected abstract void
setCurrentContext(Ctx ctx)
For internal use.
-
-
-
Method Detail
-
getCurrentContext
public abstract Ctx getCurrentContext()
- Returns:
- call context of the calling thread.
-
setCurrentContext
protected abstract void setCurrentContext(Ctx ctx)
For internal use. Apps and deriving libs should rather useServerSideContext.runWithinSelf(Runnable)
andServerSideContext.callWithinSelf(java.util.concurrent.Callable)
.
-
clearCurrentContext
protected abstract void clearCurrentContext()
For internal use. Apps and deriving libs should rather useServerSideContext.runWithinSelf(Runnable)
andServerSideContext.callWithinSelf(java.util.concurrent.Callable)
.
-
-