Package com.embabel.agent.core
Object AgentProcess.Companion
-
- All Implemented Interfaces:
public class AgentProcess.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static AgentProcess.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final static AgentProcessget()Get the current agent process for this thread, if any. final <T extends Any> TwithCurrent(AgentProcess $self, Function0<T> block)Execute a block with this AgentProcess as the current process for the thread. -
-
Method Detail
-
get
final static AgentProcess get()
Get the current agent process for this thread, if any.
-
withCurrent
final <T extends Any> T withCurrent(AgentProcess $self, Function0<T> block)
Execute a block with this AgentProcess as the current process for the thread. Properly saves and restores any previous value, ensuring cleanup even on exception.
-
-
-
-