- java.lang.Object
-
- swim.kernel.KernelProxy
-
- All Implemented Interfaces:
IpInterface
,Kernel
,KernelBinding
,KernelContext
,Log
- Direct Known Subclasses:
ActorKernel
,AuthenticatorKernel
,BootKernel
,DbStoreKernel
,JavaKernel
,JsKernel
,MemStoreKernel
,MetaKernel
,RemoteKernel
,ServiceKernel
,WebServiceKernel
public abstract class KernelProxy extends Object implements KernelBinding, KernelContext
-
-
Field Summary
Fields Modifier and Type Field Description protected KernelBinding
kernelBinding
protected KernelContext
kernelContext
protected static int
STARTED
protected int
status
protected static AtomicIntegerFieldUpdater<KernelProxy>
STATUS
-
Constructor Summary
Constructors Constructor Description KernelProxy()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.io.IpInterface
bindTcp, bindTcp, bindTcp, bindTls, bindTls, bindTls, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTls, connectTls, connectTls, connectTls, connectTls, connectTls, connectTls
-
Methods inherited from interface swim.kernel.Kernel
openService, openService
-
-
-
-
Field Detail
-
kernelBinding
protected KernelBinding kernelBinding
-
kernelContext
protected KernelContext kernelContext
-
status
protected volatile int status
-
STARTED
protected static final int STARTED
- See Also:
- Constant Field Values
-
STATUS
protected static final AtomicIntegerFieldUpdater<KernelProxy> STATUS
-
-
Method Detail
-
kernelWrapper
public final KernelBinding kernelWrapper()
- Specified by:
kernelWrapper
in interfaceKernelBinding
- Specified by:
kernelWrapper
in interfaceKernelContext
-
kernelBinding
public final KernelBinding kernelBinding()
- Specified by:
kernelBinding
in interfaceKernelContext
-
setKernelBinding
public void setKernelBinding(KernelBinding kernelBinding)
- Specified by:
setKernelBinding
in interfaceKernelContext
-
kernelContext
public final KernelContext kernelContext()
- Specified by:
kernelContext
in interfaceKernelBinding
-
setKernelContext
public void setKernelContext(KernelContext kernelContext)
- Specified by:
setKernelContext
in interfaceKernelBinding
-
unwrapKernel
public <T> T unwrapKernel(Class<T> kernelClass)
- Specified by:
unwrapKernel
in interfaceKernel
-
kernelPriority
public abstract double kernelPriority()
Description copied from interface:Kernel
Returns the relative priority of thisKernel
implementation. Kernel implementations with greater priority inject into kernel stacks before implementations with lower priority.- Specified by:
kernelPriority
in interfaceKernel
-
injectKernel
public Kernel injectKernel(Kernel kernel)
Description copied from interface:Kernel
Returns aKernel
implementation with the combined capabilities of thisKernel
implementation and the givenkernel
implementation.- Specified by:
injectKernel
in interfaceKernel
-
modules
public FingerTrieSeq<Kernel> modules()
- Specified by:
modules
in interfaceKernelContext
-
stage
public Stage stage()
- Specified by:
stage
in interfaceKernelContext
-
station
public Station station()
- Specified by:
station
in interfaceKernelContext
-
defineLog
public LogDef defineLog(Item logConfig)
- Specified by:
defineLog
in interfaceKernelContext
-
createLog
public Log createLog(LogDef logDef)
- Specified by:
createLog
in interfaceKernelContext
-
createLog
public Log createLog(CellAddress cellAddress)
- Specified by:
createLog
in interfaceKernelContext
-
injectLog
public Log injectLog(Log log)
- Specified by:
injectLog
in interfaceKernelContext
-
definePolicy
public PolicyDef definePolicy(Item policyConfig)
- Specified by:
definePolicy
in interfaceKernelContext
-
createPolicy
public Policy createPolicy(PolicyDef policyDef)
- Specified by:
createPolicy
in interfaceKernelContext
-
createPolicy
public Policy createPolicy(CellAddress cellAddress)
- Specified by:
createPolicy
in interfaceKernelContext
-
injectPolicy
public Policy injectPolicy(Policy policy)
- Specified by:
injectPolicy
in interfaceKernelContext
-
defineSchedule
public ScheduleDef defineSchedule(Item scheduleConfig)
- Specified by:
defineSchedule
in interfaceKernelContext
-
createSchedule
public Schedule createSchedule(ScheduleDef scheduleDef, Stage stage)
- Specified by:
createSchedule
in interfaceKernelContext
-
injectSchedule
public Schedule injectSchedule(Schedule schedule)
- Specified by:
injectSchedule
in interfaceKernelContext
-
defineStage
public StageDef defineStage(Item stageConfig)
- Specified by:
defineStage
in interfaceKernelContext
-
createStage
public Stage createStage(StageDef stageDef)
- Specified by:
createStage
in interfaceKernelContext
-
createStage
public Stage createStage(CellAddress cellAddress)
- Specified by:
createStage
in interfaceKernelContext
-
injectStage
public Stage injectStage(Stage stage)
- Specified by:
injectStage
in interfaceKernelContext
-
defineStore
public StoreDef defineStore(Item storeConfig)
- Specified by:
defineStore
in interfaceKernelContext
-
createStore
public StoreBinding createStore(StoreDef storeDef, ClassLoader classLoader)
- Specified by:
createStore
in interfaceKernelContext
-
createStore
public StoreBinding createStore(CellAddress cellAddress)
- Specified by:
createStore
in interfaceKernelContext
-
injectStore
public StoreBinding injectStore(StoreBinding store)
- Specified by:
injectStore
in interfaceKernelContext
-
defineAuthenticator
public AuthenticatorDef defineAuthenticator(Item authenticatorConfig)
- Specified by:
defineAuthenticator
in interfaceKernelContext
-
createAuthenticator
public Authenticator createAuthenticator(AuthenticatorDef authenticatorDef, ClassLoader classLoader)
- Specified by:
createAuthenticator
in interfaceKernelContext
-
injectAuthenticator
public Authenticator injectAuthenticator(Authenticator authenticator)
- Specified by:
injectAuthenticator
in interfaceKernelContext
-
ipSettings
public IpSettings ipSettings()
- Specified by:
ipSettings
in interfaceIpInterface
- Specified by:
ipSettings
in interfaceKernelContext
-
bindTcp
public IpServiceRef bindTcp(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
- Specified by:
bindTcp
in interfaceIpInterface
- Specified by:
bindTcp
in interfaceKernelContext
-
bindTls
public IpServiceRef bindTls(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
- Specified by:
bindTls
in interfaceIpInterface
- Specified by:
bindTls
in interfaceKernelContext
-
connectTcp
public IpSocketRef connectTcp(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
- Specified by:
connectTcp
in interfaceIpInterface
- Specified by:
connectTcp
in interfaceKernelContext
-
connectTls
public IpSocketRef connectTls(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
- Specified by:
connectTls
in interfaceIpInterface
- Specified by:
connectTls
in interfaceKernelContext
-
getService
public Service getService(String serviceName)
- Specified by:
getService
in interfaceKernel
- Specified by:
getService
in interfaceKernelContext
-
defineService
public ServiceDef defineService(Item serviceConfig)
- Specified by:
defineService
in interfaceKernel
- Specified by:
defineService
in interfaceKernelContext
-
createServiceFactory
public ServiceFactory<?> createServiceFactory(ServiceDef serviceDef, ClassLoader classLoader)
- Specified by:
createServiceFactory
in interfaceKernel
- Specified by:
createServiceFactory
in interfaceKernelContext
-
injectService
public Service injectService(Service service)
- Specified by:
injectService
in interfaceKernelContext
-
openService
public <S extends Service> S openService(String serviceName, ServiceFactory<S> serviceFactory)
- Specified by:
openService
in interfaceKernel
- Specified by:
openService
in interfaceKernelContext
-
routeRequest
public WebResponse routeRequest(WebRequest request)
- Specified by:
routeRequest
in interfaceKernelContext
-
getSpace
public Space getSpace(String spaceName)
- Specified by:
getSpace
in interfaceKernel
- Specified by:
getSpace
in interfaceKernelContext
-
defineSpace
public SpaceDef defineSpace(Item spaceConfig)
- Specified by:
defineSpace
in interfaceKernel
- Specified by:
defineSpace
in interfaceKernelContext
-
openSpace
public Space openSpace(SpaceDef spaceDef)
- Specified by:
openSpace
in interfaceKernel
- Specified by:
openSpace
in interfaceKernelContext
-
definePlane
public PlaneDef definePlane(Item planeConfig)
- Specified by:
definePlane
in interfaceKernel
- Specified by:
definePlane
in interfaceKernelContext
-
createPlaneFactory
public PlaneFactory<?> createPlaneFactory(PlaneDef planeDef, ClassLoader classLoader)
- Specified by:
createPlaneFactory
in interfaceKernel
- Specified by:
createPlaneFactory
in interfaceKernelContext
-
createPlaneFactory
public <P extends Plane> PlaneFactory<P> createPlaneFactory(Class<? extends P> planeClass)
- Specified by:
createPlaneFactory
in interfaceKernel
- Specified by:
createPlaneFactory
in interfaceKernelContext
-
injectPlane
public Plane injectPlane(Plane plane)
- Specified by:
injectPlane
in interfaceKernelContext
-
defineAgent
public AgentDef defineAgent(Item agentConfig)
- Specified by:
defineAgent
in interfaceKernel
- Specified by:
defineAgent
in interfaceKernelContext
-
createAgentFactory
public AgentFactory<?> createAgentFactory(AgentDef agentDef, ClassLoader classLoader)
- Specified by:
createAgentFactory
in interfaceKernel
- Specified by:
createAgentFactory
in interfaceKernelContext
-
createAgentFactory
public AgentFactory<?> createAgentFactory(NodeBinding node, AgentDef agentDef)
- Specified by:
createAgentFactory
in interfaceKernelContext
-
createAgentFactory
public <A extends Agent> AgentFactory<A> createAgentFactory(Class<? extends A> agentClass)
- Specified by:
createAgentFactory
in interfaceKernel
- Specified by:
createAgentFactory
in interfaceKernelContext
-
createAgentFactory
public <A extends Agent> AgentFactory<A> createAgentFactory(NodeBinding node, Class<? extends A> agentClass)
- Specified by:
createAgentFactory
in interfaceKernelContext
-
createAgentRoute
public <A extends Agent> AgentRoute<A> createAgentRoute(EdgeBinding edge, Class<? extends A> agentClass)
- Specified by:
createAgentRoute
in interfaceKernelContext
-
openAgents
public void openAgents(NodeBinding node)
- Specified by:
openAgents
in interfaceKernelContext
-
openLanes
public void openLanes(NodeBinding node)
- Specified by:
openLanes
in interfaceKernelContext
-
createEdge
public EdgeBinding createEdge(EdgeAddress edgeAddress)
- Specified by:
createEdge
in interfaceKernelContext
-
injectEdge
public EdgeBinding injectEdge(EdgeAddress edgeAddress, EdgeBinding edge)
- Specified by:
injectEdge
in interfaceKernelContext
-
openMetaEdge
public void openMetaEdge(EdgeBinding edge, NodeBinding metaEdge)
- Specified by:
openMetaEdge
in interfaceKernelContext
-
defineMesh
public MeshDef defineMesh(Item meshConfig)
- Specified by:
defineMesh
in interfaceKernelContext
-
getMeshDef
public MeshDef getMeshDef(MeshAddress meshAddress)
- Specified by:
getMeshDef
in interfaceKernelContext
-
createMesh
public MeshBinding createMesh(EdgeBinding edge, MeshDef meshDef)
- Specified by:
createMesh
in interfaceKernelContext
-
createMesh
public MeshBinding createMesh(MeshAddress meshAddress)
- Specified by:
createMesh
in interfaceKernelContext
-
injectMesh
public MeshBinding injectMesh(MeshAddress meshAddress, MeshBinding mesh)
- Specified by:
injectMesh
in interfaceKernelContext
-
openMetaMesh
public void openMetaMesh(MeshBinding mesh, NodeBinding metaMesh)
- Specified by:
openMetaMesh
in interfaceKernelContext
-
definePart
public PartDef definePart(Item partConfig)
- Specified by:
definePart
in interfaceKernelContext
-
getPartDef
public PartDef getPartDef(PartAddress partAddress)
- Specified by:
getPartDef
in interfaceKernelContext
-
createPart
public PartBinding createPart(MeshBinding mesh, PartDef partDef)
- Specified by:
createPart
in interfaceKernelContext
-
createPart
public PartBinding createPart(PartAddress partAddress)
- Specified by:
createPart
in interfaceKernelContext
-
injectPart
public PartBinding injectPart(PartAddress partAddress, PartBinding part)
- Specified by:
injectPart
in interfaceKernelContext
-
openMetaPart
public void openMetaPart(PartBinding part, NodeBinding metaPart)
- Specified by:
openMetaPart
in interfaceKernelContext
-
defineHost
public HostDef defineHost(Item hostConfig)
- Specified by:
defineHost
in interfaceKernelContext
-
getHostDef
public HostDef getHostDef(HostAddress hostAddress)
- Specified by:
getHostDef
in interfaceKernelContext
-
createHost
public HostBinding createHost(PartBinding part, HostDef hostDef)
- Specified by:
createHost
in interfaceKernelContext
-
createHost
public HostBinding createHost(HostAddress hostAddress)
- Specified by:
createHost
in interfaceKernelContext
-
injectHost
public HostBinding injectHost(HostAddress hostAddress, HostBinding host)
- Specified by:
injectHost
in interfaceKernelContext
-
openMetaHost
public void openMetaHost(HostBinding host, NodeBinding metaHost)
- Specified by:
openMetaHost
in interfaceKernelContext
-
defineNode
public NodeDef defineNode(Item nodeConfig)
- Specified by:
defineNode
in interfaceKernelContext
-
getNodeDef
public NodeDef getNodeDef(NodeAddress nodeAddress)
- Specified by:
getNodeDef
in interfaceKernelContext
-
createNode
public NodeBinding createNode(HostBinding host, NodeDef nodeDef)
- Specified by:
createNode
in interfaceKernelContext
-
createNode
public NodeBinding createNode(NodeAddress nodeAddress)
- Specified by:
createNode
in interfaceKernelContext
-
injectNode
public NodeBinding injectNode(NodeAddress nodeAddress, NodeBinding node)
- Specified by:
injectNode
in interfaceKernelContext
-
openMetaNode
public void openMetaNode(NodeBinding node, NodeBinding metaNode)
- Specified by:
openMetaNode
in interfaceKernelContext
-
defineLane
public LaneDef defineLane(Item laneConfig)
- Specified by:
defineLane
in interfaceKernelContext
-
getLaneDef
public LaneDef getLaneDef(LaneAddress laneAddress)
- Specified by:
getLaneDef
in interfaceKernelContext
-
createLane
public LaneBinding createLane(NodeBinding node, LaneDef laneDef)
- Specified by:
createLane
in interfaceKernelContext
-
createLane
public LaneBinding createLane(LaneAddress laneAddress)
- Specified by:
createLane
in interfaceKernelContext
-
injectLane
public LaneBinding injectLane(LaneAddress laneAddress, LaneBinding lane)
- Specified by:
injectLane
in interfaceKernelContext
-
openMetaLane
public void openMetaLane(LaneBinding lane, NodeBinding metaLane)
- Specified by:
openMetaLane
in interfaceKernelContext
-
openMetaUplink
public void openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
- Specified by:
openMetaUplink
in interfaceKernelContext
-
openMetaDownlink
public void openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
- Specified by:
openMetaDownlink
in interfaceKernelContext
-
reportDown
public void reportDown(Metric metric)
- Specified by:
reportDown
in interfaceKernelContext
-
trace
public void trace(Object message)
Description copied from interface:Log
Logs a trace-level message.
-
debug
public void debug(Object message)
Description copied from interface:Log
Logs a debug-level message.
-
info
public void info(Object message)
Description copied from interface:Log
Logs an info-level message.
-
warn
public void warn(Object message)
Description copied from interface:Log
Logs a warn-level message.
-
error
public void error(Object message)
Description copied from interface:Log
Logs an error-level message.
-
fail
public void fail(Object message)
Description copied from interface:Log
Logs an fail-level message.
-
willStart
protected void willStart()
-
didStart
protected void didStart()
-
willStop
protected void willStop()
-
didStop
protected void didStop()
-
-