Module swim.runtime
Package swim.runtime.lane
Class LaneModel<View extends LaneView,U extends UplinkModem>
- java.lang.Object
-
- swim.runtime.AbstractSwimRef
-
- swim.runtime.AbstractTierBinding
-
- swim.runtime.lane.LaneModel<View,U>
-
- All Implemented Interfaces:
DownlinkFactory
,SwimRef
,CellBinding
,CellContext
,LaneBinding
,TierBinding
,Log
- Direct Known Subclasses:
CommandLaneModel
,DemandLaneModel
,DemandMapLaneModel
,JoinMapLaneModel
,JoinValueLaneModel
,ListLaneModel
,MapLaneModel
,SpatialLaneModel
,SupplyLaneModel
,ValueLaneModel
public abstract class LaneModel<View extends LaneView,U extends UplinkModem> extends AbstractTierBinding implements LaneBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected LaneContext
laneContext
-
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 LaneModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description LinkBinding
bindDownlink(Downlink downlink)
void
closeDownlink(LinkBinding link)
void
closeLaneView(Lane view)
void
closeUplink(Value linkKey)
protected abstract U
createUplink(LinkBinding link)
protected void
cueDown()
void
debug(Object message)
Logs a debug-level message.Decoder<Object>
decodeRequest(HttpLaneUplink uplink, HttpRequest<?> request)
void
didClose()
protected void
didCloseLaneView(View view)
protected void
didEnter(Identity identity)
void
didFail(Throwable error)
protected void
didLeave(Identity identity)
protected abstract void
didOpenLaneView(View view)
void
didRequest(HttpLaneUplink uplink, HttpRequest<Object> request)
void
didRespond(HttpLaneUplink uplink, HttpResponse<?> response)
protected void
didUplink(U uplink)
void
doRespond(HttpLaneUplink uplink, HttpRequest<Object> request)
void
error(Object message)
Logs an error-level message.Lane
getLaneView(AgentContext agentContext)
LinkBinding
getUplink(Value linkKey)
FingerTrieSeq<LinkContext>
getUplinks()
Uri
hostUri()
void
httpDownlink(HttpBinding http)
void
httpUplink(HttpBinding http)
void
info(Object message)
Logs an info-level message.LaneContext
laneContext()
Uri
laneUri()
LaneBinding
laneWrapper()
Uri
meshUri()
NodeBinding
node()
Uri
nodeUri()
protected void
onCommand(CommandMessage message)
void
openDownlink(LinkBinding link)
void
openLaneView(Lane view)
void
openUplink(LinkBinding link)
Value
partKey()
Policy
policy()
void
pushDown(PushRequest pushRequest)
void
pushUp(PushRequest pushRequest)
void
pushUpCommand(CommandMessage message)
Schedule
schedule()
protected void
sendDown(Value body)
void
setLaneContext(LaneContext laneContext)
Stage
stage()
StoreBinding
store()
TierContext
tierContext()
void
trace(Object message)
Logs a trace-level message.<T> T
unwrapLane(Class<T> laneClass)
void
warn(Object message)
Logs a warn-level message.protected void
willClose()
protected void
willLoad()
protected void
willOpen()
void
willRequest(HttpLaneUplink uplink, HttpRequest<?> request)
void
willRespond(HttpLaneUplink uplink, HttpResponse<?> response)
protected void
willStart()
protected void
willStop()
protected void
willUnload()
-
Methods inherited from class swim.runtime.AbstractTierBinding
activate, close, didLoad, didOpen, didStart, didStop, didUnload, 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.runtime.LaneBinding
laneType
-
-
-
-
Field Detail
-
laneContext
protected LaneContext laneContext
-
-
Method Detail
-
tierContext
public final TierContext tierContext()
- Specified by:
tierContext
in interfaceTierBinding
- Specified by:
tierContext
in classAbstractTierBinding
-
node
public final NodeBinding node()
- Specified by:
node
in interfaceLaneBinding
-
laneWrapper
public final LaneBinding laneWrapper()
- Specified by:
laneWrapper
in interfaceLaneBinding
-
laneContext
public final LaneContext laneContext()
- Specified by:
laneContext
in interfaceLaneBinding
-
setLaneContext
public void setLaneContext(LaneContext laneContext)
- Specified by:
setLaneContext
in interfaceLaneBinding
-
unwrapLane
public <T> T unwrapLane(Class<T> laneClass)
- Specified by:
unwrapLane
in interfaceLaneBinding
-
createUplink
protected abstract U createUplink(LinkBinding link)
-
meshUri
public final Uri meshUri()
- Specified by:
meshUri
in interfaceCellContext
- Specified by:
meshUri
in interfaceLaneBinding
-
partKey
public final Value partKey()
- Specified by:
partKey
in interfaceLaneBinding
-
hostUri
public final Uri hostUri()
- Specified by:
hostUri
in interfaceLaneBinding
-
nodeUri
public final Uri nodeUri()
- Specified by:
nodeUri
in interfaceLaneBinding
-
laneUri
public final Uri laneUri()
- Specified by:
laneUri
in interfaceLaneBinding
-
policy
public Policy policy()
- Specified by:
policy
in interfaceCellContext
-
schedule
public Schedule schedule()
- Specified by:
schedule
in interfaceCellContext
- Specified by:
schedule
in interfaceLaneBinding
-
stage
public Stage stage()
- Specified by:
stage
in interfaceCellContext
- Specified by:
stage
in interfaceLaneBinding
-
store
public StoreBinding store()
- Specified by:
store
in interfaceCellContext
- Specified by:
store
in interfaceLaneBinding
-
getLaneView
public Lane getLaneView(AgentContext agentContext)
- Specified by:
getLaneView
in interfaceLaneBinding
-
openLaneView
public void openLaneView(Lane view)
- Specified by:
openLaneView
in interfaceLaneBinding
-
closeLaneView
public void closeLaneView(Lane view)
- Specified by:
closeLaneView
in interfaceLaneBinding
-
getUplinks
public FingerTrieSeq<LinkContext> getUplinks()
- Specified by:
getUplinks
in interfaceLaneBinding
-
getUplink
public LinkBinding getUplink(Value linkKey)
- Specified by:
getUplink
in interfaceLaneBinding
-
openUplink
public void openUplink(LinkBinding link)
- Specified by:
openUplink
in interfaceCellBinding
-
closeUplink
public void closeUplink(Value linkKey)
- Specified by:
closeUplink
in interfaceLaneBinding
-
httpUplink
public void httpUplink(HttpBinding http)
- Specified by:
httpUplink
in interfaceCellBinding
-
cueDown
protected void cueDown()
-
sendDown
protected void sendDown(Value body)
-
pushUp
public void pushUp(PushRequest pushRequest)
- Specified by:
pushUp
in interfaceCellBinding
-
pushUpCommand
public void pushUpCommand(CommandMessage message)
- Specified by:
pushUpCommand
in interfaceLaneBinding
-
onCommand
protected void onCommand(CommandMessage message)
-
didOpenLaneView
protected abstract void didOpenLaneView(View view)
-
didCloseLaneView
protected void didCloseLaneView(View view)
-
didUplink
protected void didUplink(U uplink)
-
didEnter
protected void didEnter(Identity identity)
-
didLeave
protected void didLeave(Identity identity)
-
decodeRequest
public Decoder<Object> decodeRequest(HttpLaneUplink uplink, HttpRequest<?> request)
-
willRequest
public void willRequest(HttpLaneUplink uplink, HttpRequest<?> request)
-
didRequest
public void didRequest(HttpLaneUplink uplink, HttpRequest<Object> request)
-
doRespond
public void doRespond(HttpLaneUplink uplink, HttpRequest<Object> request)
-
willRespond
public void willRespond(HttpLaneUplink uplink, HttpResponse<?> response)
-
didRespond
public void didRespond(HttpLaneUplink uplink, HttpResponse<?> response)
-
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
protected void willOpen()
- Overrides:
willOpen
in classAbstractTierBinding
-
willLoad
protected void willLoad()
- Overrides:
willLoad
in classAbstractTierBinding
-
willStart
protected void willStart()
- Overrides:
willStart
in classAbstractTierBinding
-
willStop
protected void willStop()
- Overrides:
willStop
in classAbstractTierBinding
-
willUnload
protected void willUnload()
- Overrides:
willUnload
in classAbstractTierBinding
-
willClose
protected void willClose()
- 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
-
-