- 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 AgentContext
agentContext
protected JsBridge
bridge
protected Object
guest
protected JsModule
module
-
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 AgentContext
agentContext()
Returns theAgentContext
used to manage thisAgent
.JsBridge
bridge()
void
didClose()
Lifecycle callback invoked immediately after thisAgent
closes.void
didFail(Throwable error)
Lifecycle callback invoked immediately after thisAgent
throwserror
.void
didLoad()
Lifecycle callback invoked immediately after thisAgent
loads, i.e.void
didOpen()
Lifecycle callback invoked immediately after thisAgent
opens, i.e.void
didStart()
Lifecycle callback invoked immediately after thisAgent
starts.void
didStop()
Lifecycle callback invoked immediately after thisAgent
stops, i.e.void
didUnload()
Lifecycle callback invoked immediately after thisAgent
unloads, i.e.JsModule
module()
Object
unwrap()
Returns the guest value that this host object wraps.void
willClose()
Lifecycle callback invoked immediately before thisAgent
closes.void
willLoad()
Lifecycle callback invoked immediately before thisAgent
loads.void
willOpen()
Lifecycle callback invoked immediately before thisAgent
opens.void
willStart()
Lifecycle callback invoked immediately before thisAgent
starts.void
willStop()
Lifecycle callback invoked immediately before thisAgent
stops.void
willUnload()
Lifecycle callback invoked immediately before thisAgent
unloads.
-
-
-
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:Agent
Returns theAgentContext
used to manage thisAgent
.- Specified by:
agentContext
in interfaceAgent
-
bridge
public final JsBridge bridge()
-
module
public final JsModule module()
-
unwrap
public final Object unwrap()
Description copied from interface:GuestWrapper
Returns the guest value that this host object wraps.- Specified by:
unwrap
in interfaceGuestWrapper
-
willOpen
public void willOpen()
Description copied from interface:Agent
Lifecycle callback invoked immediately before thisAgent
opens.//@see swim.system.TierBinding#open
-
didOpen
public void didOpen()
Description copied from interface:Agent
Lifecycle callback invoked immediately after thisAgent
opens, i.e. before it loads.//@see swim.system.TierBinding#open //@see swim.system.TierBinding#load
-
willLoad
public void willLoad()
Description copied from interface:Agent
Lifecycle callback invoked immediately before thisAgent
loads.//@see swim.system.TierBinding#load
-
didLoad
public void didLoad()
Description copied from interface:Agent
Lifecycle callback invoked immediately after thisAgent
loads, i.e. before it starts.//@see swim.system.TierBinding#load //@see swim.system.TierBinding#start
-
willStart
public void willStart()
Description copied from interface:Agent
Lifecycle callback invoked immediately before thisAgent
starts.//@see swim.system.TierBinding#start
-
didStart
public void didStart()
Description copied from interface:Agent
Lifecycle callback invoked immediately after thisAgent
starts.//@see swim.system.TierBinding#start
-
willStop
public void willStop()
Description copied from interface:Agent
Lifecycle callback invoked immediately before thisAgent
stops.//@see swim.system.TierBinding#stop
-
didStop
public void didStop()
Description copied from interface:Agent
Lifecycle callback invoked immediately after thisAgent
stops, i.e. before it unloads.//@see swim.system.TierBinding#stop //@see swim.system.TierBinding#unload
-
willUnload
public void willUnload()
Description copied from interface:Agent
Lifecycle callback invoked immediately before thisAgent
unloads.//@see swim.system.TierBinding#unload
- Specified by:
willUnload
in interfaceAgent
-
didUnload
public void didUnload()
Description copied from interface:Agent
Lifecycle callback invoked immediately after thisAgent
unloads, i.e. before it closes.//@see swim.system.TierBinding.unload //@see swim.system.TierBinding.close
-
willClose
public void willClose()
Description copied from interface:Agent
Lifecycle callback invoked immediately before thisAgent
closes.//@see swim.system.TierBinding.close
-
didClose
public void didClose()
Description copied from interface:Agent
Lifecycle callback invoked immediately after thisAgent
closes.//@see swim.system.TierBinding.close
-
-