- java.lang.Object
-
- swim.api.agent.AbstractAgentRoute<JsAgent>
-
- swim.js.JsAgentFactory
-
- All Implemented Interfaces:
AgentFactory<JsAgent>
,AgentRoute<JsAgent>
public class JsAgentFactory extends AbstractAgentRoute<JsAgent>
-
-
Field Summary
Fields Modifier and Type Field Description protected JsAgentDef
agentDef
protected UriPath
basePath
protected JsKernel
jsKernel
-
Fields inherited from class swim.api.agent.AbstractAgentRoute
context
-
-
Constructor Summary
Constructors Constructor Description JsAgentFactory(JsKernel jsKernel, UriPath basePath, JsAgentDef agentDef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsAgentDef
agentDef()
UriPath
basePath()
JsAgent
createAgent(AgentContext agentContext)
Creates an instance ofA
with internal contextcontext
.protected JsBridge
createAgentJsBridge(AgentContext agentContext, org.graalvm.polyglot.Context jsContext)
protected org.graalvm.polyglot.Context
createAgentJsContext(AgentContext agentContext)
protected JsModuleSystem
createAgentModuleSystem(AgentContext agentContext, org.graalvm.polyglot.Context jsContext, JsBridge jsBridge)
protected org.graalvm.polyglot.Value
createGuestAgent(AgentContext agentContext, JsBridge jsBridge, JsModule agentModule)
Value
id(Uri nodeUri)
JsKernel
jsKernel()
protected JsModule
requireAgentModule(AgentContext agentContext, JsModuleSystem moduleSystem)
-
Methods inherited from class swim.api.agent.AbstractAgentRoute
agentRouteContext, pattern, props, routeName, setAgentRouteContext
-
-
-
-
Field Detail
-
jsKernel
protected final JsKernel jsKernel
-
basePath
protected final UriPath basePath
-
agentDef
protected final JsAgentDef agentDef
-
-
Constructor Detail
-
JsAgentFactory
public JsAgentFactory(JsKernel jsKernel, UriPath basePath, JsAgentDef agentDef)
-
-
Method Detail
-
jsKernel
public final JsKernel jsKernel()
-
basePath
public final UriPath basePath()
-
agentDef
public final JsAgentDef agentDef()
-
createAgentJsContext
protected org.graalvm.polyglot.Context createAgentJsContext(AgentContext agentContext)
-
createAgentJsBridge
protected JsBridge createAgentJsBridge(AgentContext agentContext, org.graalvm.polyglot.Context jsContext)
-
createAgentModuleSystem
protected JsModuleSystem createAgentModuleSystem(AgentContext agentContext, org.graalvm.polyglot.Context jsContext, JsBridge jsBridge)
-
requireAgentModule
protected JsModule requireAgentModule(AgentContext agentContext, JsModuleSystem moduleSystem)
-
createGuestAgent
protected org.graalvm.polyglot.Value createGuestAgent(AgentContext agentContext, JsBridge jsBridge, JsModule agentModule)
-
createAgent
public JsAgent createAgent(AgentContext agentContext)
Description copied from interface:AgentFactory
Creates an instance ofA
with internal contextcontext
.- Specified by:
createAgent
in interfaceAgentFactory<JsAgent>
- Specified by:
createAgent
in classAbstractAgentRoute<JsAgent>
-
-