Module swim.client
Package swim.client

Class ClientRuntime

  • All Implemented Interfaces:
    swim.api.client.ClientContext, swim.api.downlink.DownlinkFactory, swim.api.ref.SwimRef, swim.runtime.CellContext, swim.runtime.RootContext, swim.runtime.TierContext, swim.store.StoreContext, swim.util.Log

    public class ClientRuntime
    extends swim.runtime.AbstractSwimRef
    implements swim.api.client.ClientContext, swim.runtime.RootContext
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected swim.io.http.HttpEndpoint endpoint  
      protected swim.runtime.RootBinding root  
      protected swim.concurrent.Theater stage  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientRuntime()  
      ClientRuntime​(swim.concurrent.Theater stage)  
      ClientRuntime​(swim.concurrent.Theater stage, swim.io.http.HttpSettings settings)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      swim.api.policy.PolicyDirective<swim.api.auth.Identity> authenticate​(swim.api.auth.Credentials credentials)  
      swim.runtime.LinkBinding bindDownlink​(swim.api.downlink.Downlink downlink)  
      void close()  
      void closeDownlink​(swim.runtime.LinkBinding link)  
      swim.runtime.HostBinding createHost​(swim.uri.Uri meshUri, swim.structure.Value partKey, swim.uri.Uri hostUri)  
      swim.runtime.MeshBinding createMesh​(swim.uri.Uri meshUri)  
      swim.runtime.NodeBinding createNode​(swim.uri.Uri meshUri, swim.structure.Value partKey, swim.uri.Uri hostUri, swim.uri.Uri nodeUri)  
      swim.runtime.PartBinding createPart​(swim.uri.Uri meshUri, swim.structure.Value partKey)  
      swim.api.data.DataFactory data()  
      void debug​(Object message)  
      void didLoad()  
      void didOpen()  
      void didStart()  
      void didStop()  
      void didUnload()  
      swim.io.http.HttpEndpoint endpoint()  
      void error​(Object message)  
      void httpDownlink​(swim.runtime.HttpBinding http)  
      void info​(Object message)  
      swim.runtime.HostBinding injectHost​(swim.uri.Uri meshUri, swim.structure.Value partKey, swim.uri.Uri hostUri, swim.runtime.HostBinding host)  
      swim.runtime.LaneBinding injectLane​(swim.uri.Uri meshUri, swim.structure.Value partKey, swim.uri.Uri hostUri, swim.uri.Uri nodeUri, swim.uri.Uri laneUri, swim.runtime.LaneBinding lane)  
      swim.store.ListDataBinding injectListData​(swim.store.ListDataBinding dataBinding)  
      swim.store.MapDataBinding injectMapData​(swim.store.MapDataBinding dataBinding)  
      swim.runtime.MeshBinding injectMesh​(swim.uri.Uri meshUri, swim.runtime.MeshBinding mesh)  
      swim.runtime.NodeBinding injectNode​(swim.uri.Uri meshUri, swim.structure.Value partKey, swim.uri.Uri hostUri, swim.uri.Uri nodeUri, swim.runtime.NodeBinding node)  
      swim.runtime.PartBinding injectPart​(swim.uri.Uri meshUri, swim.structure.Value partKey, swim.runtime.PartBinding part)  
      <S> swim.store.SpatialDataBinding<S> injectSpatialData​(swim.store.SpatialDataBinding<S> dataBinding)  
      swim.store.ValueDataBinding injectValueData​(swim.store.ValueDataBinding dataBinding)  
      swim.uri.Uri meshUri()  
      void openDownlink​(swim.runtime.LinkBinding link)  
      swim.store.ListDataBinding openListData​(swim.structure.Value name)  
      swim.store.MapDataBinding openMapData​(swim.structure.Value name)  
      <S> swim.store.SpatialDataBinding<S> openSpatialData​(swim.structure.Value name, swim.math.Z2Form<S> shapeForm)  
      swim.store.ValueDataBinding openValueData​(swim.structure.Value name)  
      swim.api.policy.Policy policy()  
      void pushDown​(swim.runtime.PushRequest pushRequest)  
      swim.runtime.RouterContext router()  
      swim.concurrent.Schedule schedule()  
      void setRouter​(swim.api.router.Router router)  
      swim.concurrent.Stage stage()  
      void start()  
      void stop()  
      void trace​(Object message)  
      void warn​(Object message)  
      void willClose()  
      void willLoad()  
      void willOpen()  
      void willStart()  
      void willStop()  
      void willUnload()  
      • Methods inherited from class swim.runtime.AbstractSwimRef

        command, command, command, command, command, command, command, command, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
      • Methods inherited from interface swim.api.downlink.DownlinkFactory

        downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue
      • Methods inherited from interface swim.api.ref.SwimRef

        command, command, command, command, command, command, command, command, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
    • Field Detail

      • stage

        protected final swim.concurrent.Theater stage
      • endpoint

        protected final swim.io.http.HttpEndpoint endpoint
      • root

        protected final swim.runtime.RootBinding root
    • Constructor Detail

      • ClientRuntime

        public ClientRuntime​(swim.concurrent.Theater stage,
                             swim.io.http.HttpSettings settings)
      • ClientRuntime

        public ClientRuntime​(swim.concurrent.Theater stage)
      • ClientRuntime

        public ClientRuntime()
    • Method Detail

      • router

        public final swim.runtime.RouterContext router()
        Specified by:
        router in interface swim.api.client.ClientContext
      • setRouter

        public void setRouter​(swim.api.router.Router router)
        Specified by:
        setRouter in interface swim.api.client.ClientContext
      • start

        public void start()
        Specified by:
        start in interface swim.api.client.ClientContext
      • stop

        public void stop()
        Specified by:
        stop in interface swim.api.client.ClientContext
      • meshUri

        public swim.uri.Uri meshUri()
        Specified by:
        meshUri in interface swim.runtime.CellContext
      • policy

        public swim.api.policy.Policy policy()
        Specified by:
        policy in interface swim.runtime.CellContext
      • schedule

        public swim.concurrent.Schedule schedule()
        Specified by:
        schedule in interface swim.runtime.CellContext
      • stage

        public final swim.concurrent.Stage stage()
        Specified by:
        stage in interface swim.runtime.CellContext
      • endpoint

        public final swim.io.http.HttpEndpoint endpoint()
      • data

        public swim.api.data.DataFactory data()
        Specified by:
        data in interface swim.runtime.CellContext
      • createMesh

        public swim.runtime.MeshBinding createMesh​(swim.uri.Uri meshUri)
        Specified by:
        createMesh in interface swim.runtime.RootContext
      • injectMesh

        public swim.runtime.MeshBinding injectMesh​(swim.uri.Uri meshUri,
                                                   swim.runtime.MeshBinding mesh)
        Specified by:
        injectMesh in interface swim.runtime.RootContext
      • createPart

        public swim.runtime.PartBinding createPart​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey)
        Specified by:
        createPart in interface swim.runtime.RootContext
      • injectPart

        public swim.runtime.PartBinding injectPart​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey,
                                                   swim.runtime.PartBinding part)
        Specified by:
        injectPart in interface swim.runtime.RootContext
      • createHost

        public swim.runtime.HostBinding createHost​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey,
                                                   swim.uri.Uri hostUri)
        Specified by:
        createHost in interface swim.runtime.RootContext
      • injectHost

        public swim.runtime.HostBinding injectHost​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey,
                                                   swim.uri.Uri hostUri,
                                                   swim.runtime.HostBinding host)
        Specified by:
        injectHost in interface swim.runtime.RootContext
      • createNode

        public swim.runtime.NodeBinding createNode​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey,
                                                   swim.uri.Uri hostUri,
                                                   swim.uri.Uri nodeUri)
        Specified by:
        createNode in interface swim.runtime.RootContext
      • injectNode

        public swim.runtime.NodeBinding injectNode​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey,
                                                   swim.uri.Uri hostUri,
                                                   swim.uri.Uri nodeUri,
                                                   swim.runtime.NodeBinding node)
        Specified by:
        injectNode in interface swim.runtime.RootContext
      • injectLane

        public swim.runtime.LaneBinding injectLane​(swim.uri.Uri meshUri,
                                                   swim.structure.Value partKey,
                                                   swim.uri.Uri hostUri,
                                                   swim.uri.Uri nodeUri,
                                                   swim.uri.Uri laneUri,
                                                   swim.runtime.LaneBinding lane)
        Specified by:
        injectLane in interface swim.runtime.RootContext
      • authenticate

        public swim.api.policy.PolicyDirective<swim.api.auth.Identity> authenticate​(swim.api.auth.Credentials credentials)
        Specified by:
        authenticate in interface swim.runtime.RootContext
      • openListData

        public swim.store.ListDataBinding openListData​(swim.structure.Value name)
        Specified by:
        openListData in interface swim.store.StoreContext
      • injectListData

        public swim.store.ListDataBinding injectListData​(swim.store.ListDataBinding dataBinding)
        Specified by:
        injectListData in interface swim.store.StoreContext
      • openMapData

        public swim.store.MapDataBinding openMapData​(swim.structure.Value name)
        Specified by:
        openMapData in interface swim.store.StoreContext
      • injectMapData

        public swim.store.MapDataBinding injectMapData​(swim.store.MapDataBinding dataBinding)
        Specified by:
        injectMapData in interface swim.store.StoreContext
      • openSpatialData

        public <S> swim.store.SpatialDataBinding<S> openSpatialData​(swim.structure.Value name,
                                                                    swim.math.Z2Form<S> shapeForm)
        Specified by:
        openSpatialData in interface swim.store.StoreContext
      • injectSpatialData

        public <S> swim.store.SpatialDataBinding<S> injectSpatialData​(swim.store.SpatialDataBinding<S> dataBinding)
        Specified by:
        injectSpatialData in interface swim.store.StoreContext
      • openValueData

        public swim.store.ValueDataBinding openValueData​(swim.structure.Value name)
        Specified by:
        openValueData in interface swim.store.StoreContext
      • injectValueData

        public swim.store.ValueDataBinding injectValueData​(swim.store.ValueDataBinding dataBinding)
        Specified by:
        injectValueData in interface swim.store.StoreContext
      • bindDownlink

        public swim.runtime.LinkBinding bindDownlink​(swim.api.downlink.Downlink downlink)
        Specified by:
        bindDownlink in interface swim.runtime.CellContext
      • openDownlink

        public void openDownlink​(swim.runtime.LinkBinding link)
        Specified by:
        openDownlink in interface swim.runtime.CellContext
      • closeDownlink

        public void closeDownlink​(swim.runtime.LinkBinding link)
        Specified by:
        closeDownlink in interface swim.runtime.CellContext
      • httpDownlink

        public void httpDownlink​(swim.runtime.HttpBinding http)
        Specified by:
        httpDownlink in interface swim.runtime.CellContext
      • pushDown

        public void pushDown​(swim.runtime.PushRequest pushRequest)
        Specified by:
        pushDown in interface swim.runtime.CellContext
      • trace

        public void trace​(Object message)
        Specified by:
        trace in interface swim.util.Log
      • debug

        public void debug​(Object message)
        Specified by:
        debug in interface swim.util.Log
      • info

        public void info​(Object message)
        Specified by:
        info in interface swim.util.Log
      • warn

        public void warn​(Object message)
        Specified by:
        warn in interface swim.util.Log
      • error

        public void error​(Object message)
        Specified by:
        error in interface swim.util.Log
      • close

        public void close()
        Specified by:
        close in interface swim.api.ref.SwimRef
        Specified by:
        close in interface swim.runtime.TierContext
        Specified by:
        close in class swim.runtime.AbstractSwimRef
      • willOpen

        public void willOpen()
        Specified by:
        willOpen in interface swim.runtime.TierContext
      • didOpen

        public void didOpen()
        Specified by:
        didOpen in interface swim.runtime.TierContext
      • willLoad

        public void willLoad()
        Specified by:
        willLoad in interface swim.runtime.TierContext
      • didLoad

        public void didLoad()
        Specified by:
        didLoad in interface swim.runtime.TierContext
      • willStart

        public void willStart()
        Specified by:
        willStart in interface swim.runtime.TierContext
      • didStart

        public void didStart()
        Specified by:
        didStart in interface swim.runtime.TierContext
      • willStop

        public void willStop()
        Specified by:
        willStop in interface swim.runtime.TierContext
      • didStop

        public void didStop()
        Specified by:
        didStop in interface swim.runtime.TierContext
      • willUnload

        public void willUnload()
        Specified by:
        willUnload in interface swim.runtime.TierContext
      • didUnload

        public void didUnload()
        Specified by:
        didUnload in interface swim.runtime.TierContext
      • willClose

        public void willClose()
        Specified by:
        willClose in interface swim.runtime.TierContext