- java.lang.Object
-
- swim.actor.ActorCell
-
- swim.actor.ActorTier
-
- swim.actor.ActorHost
-
- All Implemented Interfaces:
CellBinding
,CellContext
,HostBinding
,HostContext
,TierBinding
,TierContext
,Log
public class ActorHost extends ActorTier implements HostBinding, HostContext
-
-
Constructor Summary
Constructors Constructor Description ActorHost(HostBinding hostBinding, HostDef hostDef)
-
Method Summary
-
Methods inherited from class swim.actor.ActorTier
close, closeStage, closeStore, didLoad, didOpen, didStart, didStop, didUnload, isClosed, isLoaded, isOpened, isStarted, load, open, schedule, stage, start, stop, store, tierContext, unload, willClose, willLoad, willOpen, willStart, willStop, willUnload
-
Methods inherited from class swim.actor.ActorCell
bindDownlink, closeDownlink, closeLog, closePolicy, debug, edgeName, error, fail, info, meshUri, openDownlink, openUplink, policy, pushDown, pushUp, reportDown, trace, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.system.CellBinding
openUplink, pushUp
-
Methods inherited from interface swim.system.CellContext
bindDownlink, closeDownlink, openDownlink, policy, pushDown, reportDown, schedule, stage, store
-
Methods inherited from interface swim.system.HostBinding
meshUri
-
Methods inherited from interface swim.system.HostContext
edgeName, meshUri
-
-
-
-
Constructor Detail
-
ActorHost
public ActorHost(HostBinding hostBinding, HostDef hostDef)
-
-
Method Detail
-
hostDef
public final HostDef hostDef()
-
actorPart
public final ActorPart actorPart()
-
part
public final PartBinding part()
- Specified by:
part
in interfaceHostBinding
- Specified by:
part
in interfaceHostContext
-
hostWrapper
public final HostBinding hostWrapper()
- Specified by:
hostWrapper
in interfaceHostBinding
- Specified by:
hostWrapper
in interfaceHostContext
-
hostBinding
public final HostBinding hostBinding()
-
hostContext
public final HostContext hostContext()
- Specified by:
hostContext
in interfaceHostBinding
-
setHostContext
public void setHostContext(HostContext hostContext)
- Specified by:
setHostContext
in interfaceHostBinding
-
unwrapHost
public <T> T unwrapHost(Class<T> hostClass)
- Specified by:
unwrapHost
in interfaceHostBinding
- Specified by:
unwrapHost
in interfaceHostContext
-
bottomHost
public <T> T bottomHost(Class<T> hostClass)
- Specified by:
bottomHost
in interfaceHostBinding
- Specified by:
bottomHost
in interfaceHostContext
-
cellBinding
public final CellBinding cellBinding()
- Specified by:
cellBinding
in classActorCell
-
cellContext
public final CellContext cellContext()
- Specified by:
cellContext
in classActorCell
-
cellAddress
public final HostAddress cellAddress()
- Specified by:
cellAddress
in interfaceCellContext
- Specified by:
cellAddress
in interfaceHostBinding
- Specified by:
cellAddress
in interfaceHostContext
- Specified by:
cellAddress
in classActorCell
-
partKey
public Value partKey()
- Specified by:
partKey
in interfaceHostBinding
- Specified by:
partKey
in interfaceHostContext
-
hostUri
public Uri hostUri()
- Specified by:
hostUri
in interfaceHostBinding
- Specified by:
hostUri
in interfaceHostContext
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceHostBinding
-
isRemote
public boolean isRemote()
- Specified by:
isRemote
in interfaceHostBinding
-
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interfaceHostBinding
-
isPrimary
public boolean isPrimary()
- Specified by:
isPrimary
in interfaceHostBinding
-
setPrimary
public void setPrimary(boolean isPrimary)
- Specified by:
setPrimary
in interfaceHostBinding
-
isReplica
public boolean isReplica()
- Specified by:
isReplica
in interfaceHostBinding
-
setReplica
public void setReplica(boolean isReplica)
- Specified by:
setReplica
in interfaceHostBinding
-
isMaster
public boolean isMaster()
- Specified by:
isMaster
in interfaceHostBinding
-
isSlave
public boolean isSlave()
- Specified by:
isSlave
in interfaceHostBinding
-
didBecomeMaster
public void didBecomeMaster()
- Specified by:
didBecomeMaster
in interfaceHostBinding
-
didBecomeSlave
public void didBecomeSlave()
- Specified by:
didBecomeSlave
in interfaceHostBinding
-
nodes
public UriMapper<NodeBinding> nodes()
- Specified by:
nodes
in interfaceHostBinding
-
getNode
public NodeBinding getNode(Uri nodeUri)
- Specified by:
getNode
in interfaceHostBinding
-
openNode
public NodeBinding openNode(Uri nodeUri)
- Specified by:
openNode
in interfaceHostBinding
-
openNode
public NodeBinding openNode(Uri nodeUri, NodeBinding node)
- Specified by:
openNode
in interfaceHostBinding
-
createLog
public Log createLog(CellAddress cellAddress)
-
createPolicy
public Policy createPolicy(CellAddress cellAddress)
-
openPolicy
protected Policy openPolicy()
- Overrides:
openPolicy
in classActorCell
-
createStage
public Stage createStage(CellAddress cellAddress)
-
createStore
public StoreBinding createStore(StoreDef storeDef)
-
createStore
public StoreBinding createStore(CellAddress cellAddress)
-
injectStore
public StoreBinding injectStore(StoreBinding store)
-
openStore
protected StoreBinding openStore()
-
openMetaHost
public void openMetaHost(HostBinding host, NodeBinding metaHost)
- Specified by:
openMetaHost
in interfaceHostBinding
- Specified by:
openMetaHost
in interfaceHostContext
-
getNodeDef
public NodeDef getNodeDef(NodeAddress nodeAddress)
-
createNode
public NodeBinding createNode(NodeAddress nodeAddress)
- Specified by:
createNode
in interfaceHostContext
-
injectNode
public NodeBinding injectNode(NodeAddress nodeAddress, NodeBinding node)
- Specified by:
injectNode
in interfaceHostContext
-
openMetaNode
public void openMetaNode(NodeBinding node, NodeBinding metaNode)
- Specified by:
openMetaNode
in interfaceHostBinding
- Specified by:
openMetaNode
in interfaceHostContext
-
getLaneDef
public LaneDef getLaneDef(LaneAddress laneAddress)
-
createLane
public LaneBinding createLane(LaneAddress laneAddress)
- Specified by:
createLane
in interfaceHostContext
-
injectLane
public LaneBinding injectLane(LaneAddress laneAddress, LaneBinding lane)
- Specified by:
injectLane
in interfaceHostContext
-
openMetaLane
public void openMetaLane(LaneBinding lane, NodeBinding metaLane)
- Specified by:
openMetaLane
in interfaceHostBinding
- Specified by:
openMetaLane
in interfaceHostContext
-
openMetaUplink
public void openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
- Specified by:
openMetaUplink
in interfaceHostBinding
- Specified by:
openMetaUplink
in interfaceHostContext
-
openMetaDownlink
public void openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
- Specified by:
openMetaDownlink
in interfaceCellContext
-
createLane
public LaneBinding createLane(NodeBinding node, LaneDef laneDef)
- Specified by:
createLane
in interfaceHostContext
-
openLanes
public void openLanes(NodeBinding node)
- Specified by:
openLanes
in interfaceHostContext
-
createAgentFactory
public AgentFactory<?> createAgentFactory(NodeBinding node, AgentDef agentDef)
- Specified by:
createAgentFactory
in interfaceHostContext
-
createAgentFactory
public <A extends Agent> AgentFactory<A> createAgentFactory(NodeBinding node, Class<? extends A> agentClass)
- Specified by:
createAgentFactory
in interfaceHostContext
-
openAgents
public void openAgents(NodeBinding node)
- Specified by:
openAgents
in interfaceHostContext
-
authenticate
public PolicyDirective<Identity> authenticate(Credentials credentials)
- Specified by:
authenticate
in interfaceHostContext
-
didConnect
public void didConnect()
- Specified by:
didConnect
in interfaceHostContext
-
didDisconnect
public void didDisconnect()
- Specified by:
didDisconnect
in interfaceHostContext
-
didClose
public void didClose()
- Specified by:
didClose
in interfaceTierBinding
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceTierBinding
-
-