- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.server.ServerPlane
-
- All Implemented Interfaces:
DownlinkFactory
,PlaneContext
,SwimRef
,AuthenticatorContext
,CellContext
,RootContext
,TierBinding
,TierContext
,Log
public class ServerPlane extends AbstractTierBinding implements RootContext, PlaneContext, AuthenticatorContext
-
-
Field Summary
Fields Modifier and Type Field Description protected HttpEndpoint
endpoint
protected Plane
plane
protected RootBinding
root
protected Theater
stage
protected StoreBinding
store
protected WarpSettings
warpSettings
-
Fields inherited from class swim.runtime.AbstractTierBinding
CLOSED_PHASE, CLOSED_STATE, CLOSING_STATE, FAILED_STATE, FAILING_STATE, LOADED_PHASE, LOADED_STATE, LOADING_STATE, OPENED_PHASE, OPENED_STATE, OPENING_STATE, PHASE_MASK, PHASE_SHIFT, RECOVERING_STATE, STARTED_PHASE, STARTED_STATE, STARTING_STATE, STATE_MASK, status, STATUS, STOPPING_STATE, UNLOADING_STATE
-
-
Constructor Summary
Constructors Constructor Description ServerPlane(Theater stage, StoreBinding store, HttpEndpoint endpoint, RootBinding root)
-
Method Summary
-
Methods inherited from class swim.runtime.AbstractTierBinding
activate, close, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload
-
Methods inherited from class swim.runtime.AbstractSwimRef
command, command, command, command, command, command, command, command, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.api.downlink.DownlinkFactory
downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs
-
Methods inherited from interface swim.api.ref.SwimRef
close, command, command, command, command, command, command, command, command, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
Methods inherited from interface swim.runtime.TierContext
close
-
-
-
-
Field Detail
-
stage
protected final Theater stage
-
store
protected final StoreBinding store
-
endpoint
protected final HttpEndpoint endpoint
-
root
protected final RootBinding root
-
plane
protected Plane plane
-
warpSettings
protected WarpSettings warpSettings
-
-
Constructor Detail
-
ServerPlane
public ServerPlane(Theater stage, StoreBinding store, HttpEndpoint endpoint, RootBinding root)
-
-
Method Detail
-
tierContext
public TierContext tierContext()
- Specified by:
tierContext
in interfaceTierBinding
- Specified by:
tierContext
in classAbstractTierBinding
-
meshUri
public Uri meshUri()
- Specified by:
meshUri
in interfaceCellContext
-
policy
public Policy policy()
- Specified by:
policy
in interfaceCellContext
-
schedule
public Schedule schedule()
- Specified by:
schedule
in interfaceAuthenticatorContext
- Specified by:
schedule
in interfaceCellContext
- Specified by:
schedule
in interfacePlaneContext
-
stage
public final Stage stage()
- Specified by:
stage
in interfaceCellContext
- Specified by:
stage
in interfacePlaneContext
-
store
public StoreBinding store()
- Specified by:
store
in interfaceCellContext
-
endpoint
public HttpEndpoint endpoint()
- Specified by:
endpoint
in interfaceAuthenticatorContext
-
root
public RootBinding root()
-
getPlane
public Plane getPlane()
-
setPlane
public void setPlane(Plane plane)
-
warpSettings
public WarpSettings warpSettings()
-
setWarpSettings
public void setWarpSettings(WarpSettings warpSettings)
-
bind
public ServiceRef bind(ServiceDef serviceDef)
-
bind
public ServiceRef bind(String address, int port)
-
bind
public ServiceRef bind(String address, int port, WarpSettings warpSettings)
-
planePolicy
public PlanePolicy planePolicy()
- Specified by:
planePolicy
in interfacePlaneContext
-
setPlanePolicy
public void setPlanePolicy(PlanePolicy policy)
- Specified by:
setPlanePolicy
in interfacePlaneContext
-
authenticators
public FingerTrieSeq<Authenticator> authenticators()
- Specified by:
authenticators
in interfacePlaneContext
-
setAuthenticators
public void setAuthenticators(FingerTrieSeq<Authenticator> authenticators)
- Specified by:
setAuthenticators
in interfacePlaneContext
-
addAuthenticator
public void addAuthenticator(Authenticator authenticator)
- Specified by:
addAuthenticator
in interfacePlaneContext
-
agentClass
public <S extends Agent> AgentType<S> agentClass(Class<? extends S> agentClass)
- Specified by:
agentClass
in interfacePlaneContext
-
hasAgentType
public boolean hasAgentType(String name)
- Specified by:
hasAgentType
in interfacePlaneContext
-
getAgentType
public <S extends Agent> AgentType<S> getAgentType(String name)
- Specified by:
getAgentType
in interfacePlaneContext
-
addAgentType
public void addAgentType(String name, AgentType<?> agentType)
- Specified by:
addAgentType
in interfacePlaneContext
-
removeAgentType
public void removeAgentType(String name)
- Specified by:
removeAgentType
in interfacePlaneContext
-
getAgentRoute
public <S extends Agent> AgentType<S> getAgentRoute(Uri nodeUri)
- Specified by:
getAgentRoute
in interfacePlaneContext
-
addAgentRoute
public void addAgentRoute(UriPattern pattern, AgentType<?> agentType)
- Specified by:
addAgentRoute
in interfacePlaneContext
-
addAgentRoute
public void addAgentRoute(String pattern, AgentType<?> agentType)
- Specified by:
addAgentRoute
in interfacePlaneContext
-
removeAgentRoute
public void removeAgentRoute(UriPattern pattern)
- Specified by:
removeAgentRoute
in interfacePlaneContext
-
createMesh
public MeshBinding createMesh(Uri meshUri)
- Specified by:
createMesh
in interfaceRootContext
-
injectMesh
public MeshBinding injectMesh(Uri meshUri, MeshBinding mesh)
- Specified by:
injectMesh
in interfaceRootContext
-
createPart
public PartBinding createPart(Uri meshUri, Value partKey)
- Specified by:
createPart
in interfaceRootContext
-
injectPart
public PartBinding injectPart(Uri meshUri, Value partKey, PartBinding part)
- Specified by:
injectPart
in interfaceRootContext
-
createHost
public HostBinding createHost(Uri meshUri, Value partKey, Uri hostUri)
- Specified by:
createHost
in interfaceRootContext
-
injectHost
public HostBinding injectHost(Uri meshUri, Value partKey, Uri hostUri, HostBinding host)
- Specified by:
injectHost
in interfaceRootContext
-
createNode
public NodeBinding createNode(Uri meshUri, Value partKey, Uri hostUri, Uri nodeUri)
- Specified by:
createNode
in interfaceRootContext
-
getServerPart
public ServerPart getServerPart(Value partKey)
-
injectNode
public NodeBinding injectNode(Uri meshUri, Value partKey, Uri hostUri, Uri nodeUri, NodeBinding node)
- Specified by:
injectNode
in interfaceRootContext
-
injectLane
public LaneBinding injectLane(Uri meshUri, Value partKey, Uri hostUri, Uri nodeUri, Uri laneUri, LaneBinding lane)
- Specified by:
injectLane
in interfaceRootContext
-
authenticate
public PolicyDirective<Identity> authenticate(Credentials credentials)
- Specified by:
authenticate
in interfaceRootContext
-
bindDownlink
public LinkBinding bindDownlink(Downlink downlink)
- Specified by:
bindDownlink
in interfaceCellContext
-
openDownlink
public void openDownlink(LinkBinding link)
- Specified by:
openDownlink
in interfaceCellContext
-
closeDownlink
public void closeDownlink(LinkBinding link)
- Specified by:
closeDownlink
in interfaceCellContext
-
httpDownlink
public void httpDownlink(HttpBinding http)
- Specified by:
httpDownlink
in interfaceCellContext
-
pushDown
public void pushDown(PushRequest pushRequest)
- Specified by:
pushDown
in interfaceCellContext
-
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.
-
willOpen
public void willOpen()
- Specified by:
willOpen
in interfaceTierContext
- Overrides:
willOpen
in classAbstractTierBinding
-
didOpen
public void didOpen()
- Specified by:
didOpen
in interfaceTierContext
- Overrides:
didOpen
in classAbstractTierBinding
-
willLoad
public void willLoad()
- Specified by:
willLoad
in interfaceTierContext
- Overrides:
willLoad
in classAbstractTierBinding
-
didLoad
public void didLoad()
- Specified by:
didLoad
in interfaceTierContext
- Overrides:
didLoad
in classAbstractTierBinding
-
willStart
public void willStart()
- Specified by:
willStart
in interfaceTierContext
- Overrides:
willStart
in classAbstractTierBinding
-
didStart
public void didStart()
- Specified by:
didStart
in interfaceTierContext
- Overrides:
didStart
in classAbstractTierBinding
-
willStop
public void willStop()
- Specified by:
willStop
in interfaceTierContext
- Overrides:
willStop
in classAbstractTierBinding
-
didStop
public void didStop()
- Specified by:
didStop
in interfaceTierContext
- Overrides:
didStop
in classAbstractTierBinding
-
willUnload
public void willUnload()
- Specified by:
willUnload
in interfaceTierContext
- Overrides:
willUnload
in classAbstractTierBinding
-
didUnload
public void didUnload()
- Specified by:
didUnload
in interfaceTierContext
- Overrides:
didUnload
in classAbstractTierBinding
-
willClose
public void willClose()
- Specified by:
willClose
in interfaceTierContext
- Overrides:
willClose
in classAbstractTierBinding
-
didClose
public void didClose()
- Specified by:
didClose
in interfaceTierBinding
- Overrides:
didClose
in classAbstractTierBinding
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceTierBinding
- Overrides:
didFail
in classAbstractTierBinding
-
-