- java.lang.Object
-
- swim.js.JsAgent
-
- All Implemented Interfaces:
Agent,GuestWrapper
public class JsAgent extends Object implements Agent, GuestWrapper
-
-
Field Summary
Fields Modifier and Type Field Description protected AgentContextagentContextprotected JsBridgebridgeprotected Objectguestprotected JsModulemodule
-
Constructor Summary
Constructors Constructor Description JsAgent(AgentContext agentContext, JsBridge bridge, JsModule module, Object guest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentContextagentContext()Returns theAgentContextused to manage thisAgent.JsBridgebridge()voiddidClose()Lifecycle callback invoked immediately after thisAgentcloses.voiddidFail(Throwable error)Lifecycle callback invoked immediately after thisAgentthrowserror.voiddidLoad()Lifecycle callback invoked immediately after thisAgentloads, i.e.voiddidOpen()Lifecycle callback invoked immediately after thisAgentopens, i.e.voiddidStart()Lifecycle callback invoked immediately after thisAgentstarts.voiddidStop()Lifecycle callback invoked immediately after thisAgentstops, i.e.voiddidUnload()Lifecycle callback invoked immediately after thisAgentunloads, i.e.JsModulemodule()Objectunwrap()Returns the guest value that this host object wraps.voidwillClose()Lifecycle callback invoked immediately before thisAgentcloses.voidwillLoad()Lifecycle callback invoked immediately before thisAgentloads.voidwillOpen()Lifecycle callback invoked immediately before thisAgentopens.voidwillStart()Lifecycle callback invoked immediately before thisAgentstarts.voidwillStop()Lifecycle callback invoked immediately before thisAgentstops.voidwillUnload()Lifecycle callback invoked immediately before thisAgentunloads.
-
-
-
Field Detail
-
agentContext
protected final AgentContext agentContext
-
bridge
protected final JsBridge bridge
-
module
protected final JsModule module
-
guest
protected final Object guest
-
-
Constructor Detail
-
JsAgent
public JsAgent(AgentContext agentContext, JsBridge bridge, JsModule module, Object guest)
-
-
Method Detail
-
agentContext
public final AgentContext agentContext()
Description copied from interface:AgentReturns theAgentContextused to manage thisAgent.- Specified by:
agentContextin interfaceAgent
-
bridge
public final JsBridge bridge()
-
module
public final JsModule module()
-
unwrap
public final Object unwrap()
Description copied from interface:GuestWrapperReturns the guest value that this host object wraps.- Specified by:
unwrapin interfaceGuestWrapper
-
willOpen
public void willOpen()
Description copied from interface:AgentLifecycle callback invoked immediately before thisAgentopens.//@see swim.runtime.TierBinding#open
-
didOpen
public void didOpen()
Description copied from interface:AgentLifecycle callback invoked immediately after thisAgentopens, i.e. before it loads.//@see swim.runtime.TierBinding#open //@see swim.runtime.TierBinding#load
-
willLoad
public void willLoad()
Description copied from interface:AgentLifecycle callback invoked immediately before thisAgentloads.//@see swim.runtime.TierBinding#load
-
didLoad
public void didLoad()
Description copied from interface:AgentLifecycle callback invoked immediately after thisAgentloads, i.e. before it starts.//@see swim.runtime.TierBinding#load //@see swim.runtime.TierBinding#start
-
willStart
public void willStart()
Description copied from interface:AgentLifecycle callback invoked immediately before thisAgentstarts.//@see swim.runtime.TierBinding#start
-
didStart
public void didStart()
Description copied from interface:AgentLifecycle callback invoked immediately after thisAgentstarts.//@see swim.runtime.TierBinding#start
-
willStop
public void willStop()
Description copied from interface:AgentLifecycle callback invoked immediately before thisAgentstops.//@see swim.runtime.TierBinding#stop
-
didStop
public void didStop()
Description copied from interface:AgentLifecycle callback invoked immediately after thisAgentstops, i.e. before it unloads.//@see swim.runtime.TierBinding#stop //@see swim.runtime.TierBinding#unload
-
willUnload
public void willUnload()
Description copied from interface:AgentLifecycle callback invoked immediately before thisAgentunloads.//@see swim.runtime.TierBinding#unload
- Specified by:
willUnloadin interfaceAgent
-
didUnload
public void didUnload()
Description copied from interface:AgentLifecycle callback invoked immediately after thisAgentunloads, i.e. before it closes.//@see swim.runtime.TierBinding.unload //@see swim.runtime.TierBinding.close
-
willClose
public void willClose()
Description copied from interface:AgentLifecycle callback invoked immediately before thisAgentcloses.//@see swim.runtime.TierBinding.close
-
didClose
public void didClose()
Description copied from interface:AgentLifecycle callback invoked immediately after thisAgentcloses.//@see swim.runtime.TierBinding.close
-
-