- java.lang.Object
-
- swim.system.AbstractDownlinkBinding
-
- swim.system.DownlinkModel<View>
-
- swim.system.warp.WarpDownlinkModem<View>
-
- All Implemented Interfaces:
LinkBinding
,WarpBinding
,Log
- Direct Known Subclasses:
WarpDownlinkModel
public abstract class WarpDownlinkModem<View extends DownlinkView> extends DownlinkModel<View> implements WarpBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected Value
body
protected CellContext
cellContext
protected static AtomicLongFieldUpdater<WarpDownlinkModem<?>>
EXEC_DELTA
protected static AtomicLongFieldUpdater<WarpDownlinkModem<?>>
EXEC_TIME
protected WarpContext
linkContext
protected float
prio
protected float
rate
protected int
status
-
Fields inherited from class swim.system.DownlinkModel
views, VIEWS
-
Fields inherited from class swim.system.AbstractDownlinkBinding
hostUri, laneUri, meshUri, nodeUri
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
accumulateExecTime(long execDelta)
Value
body()
CellContext
cellContext()
void
closeDown()
protected WarpDownlinkProfile
collectProfile(long dt)
void
command(float prio, Value body)
void
command(float prio, Value body, Cont<CommandMessage> cont)
void
command(Value body)
void
command(Value body, Cont<CommandMessage> cont)
void
cueDown()
void
cueUp()
protected void
didAddDownlink(View view)
protected void
didClose()
void
didCloseUp()
void
didConnect()
void
didDisconnect()
void
didFail(Throwable error)
void
didFailUp(Throwable error)
protected void
didLink(LinkedResponse response)
protected void
didOpen()
protected void
didRemoveDownlink(View view)
protected void
didSync(SyncedResponse response)
protected void
didUnlink(UnlinkedResponse response)
protected void
didUpdateMetrics()
void
feedDown()
protected void
feedUp()
protected void
flushMetrics()
abstract boolean
keepLinked()
abstract boolean
keepSynced()
void
link()
WarpContext
linkContext()
protected LinkRequest
linkRequest()
WarpBinding
linkWrapper()
protected Push<CommandMessage>
nextUpCue()
protected Push<CommandMessage>
nextUpQueue()
protected void
onCommand(CommandMessage message)
protected void
onEvent(EventMessage message)
void
openDown()
void
openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
float
prio()
void
pullUp()
protected void
pullUpCommand(CommandMessage message)
protected void
pullUpLink(LinkRequest request)
protected void
pullUpSync(SyncRequest request)
protected void
pullUpUnlink(UnlinkRequest request)
void
pushDown(Push<?> push)
protected void
pushDownEvent(Push<EventMessage> push)
protected void
pushDownLinked(Push<LinkedResponse> push)
protected void
pushDownSynced(Push<SyncedResponse> push)
protected void
pushDownUnknown(Push<?> push)
protected void
pushDownUnlinked(Push<UnlinkedResponse> push)
void
pushUp(Value body)
protected void
pushUp(Envelope envelope)
protected void
queueUp(Value body, Cont<CommandMessage> cont)
float
rate()
protected void
reportMetrics(long dt)
void
setCellContext(CellContext cellContext)
void
setLinkContext(LinkContext linkContext)
void
skipDown()
void
sync()
protected SyncRequest
syncRequest()
void
unlink()
protected UnlinkRequest
unlinkRequest()
protected boolean
upQueueIsEmpty()
protected void
willLink(LinkRequest request)
protected void
willSync(SyncRequest request)
protected void
willUnlink(UnlinkRequest request)
-
Methods inherited from class swim.system.DownlinkModel
addDownlink, removeDownlink, removeDownlinks, reopen
-
Methods inherited from class swim.system.AbstractDownlinkBinding
bottomLink, cellAddressDown, cipherSuite, cipherSuiteDown, debug, debugDown, error, errorDown, fail, failDown, hostUri, info, infoDown, isConnected, isConnectedDown, isRemote, isRemoteDown, isSecure, isSecureDown, laneUri, linkKey, localAddress, localAddressDown, localCertificates, localCertificatesDown, localIdentity, localIdentityDown, localPrincipal, localPrincipalDown, meshUri, nodeUri, remoteAddress, remoteAddressDown, remoteCertificates, remoteCertificatesDown, remoteIdentity, remoteIdentityDown, remotePrincipal, remotePrincipalDown, securityProtocol, securityProtocolDown, setHostUri, setNodeUri, trace, traceDown, unwrapLink, warn, warnDown
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.system.LinkBinding
bottomLink, cellAddressDown, cipherSuiteDown, debugDown, errorDown, failDown, hostUri, infoDown, isConnectedDown, isRemoteDown, isSecureDown, laneUri, linkKey, localAddressDown, localCertificatesDown, localIdentityDown, localPrincipalDown, meshUri, nodeUri, remoteAddressDown, remoteCertificatesDown, remoteIdentityDown, remotePrincipalDown, reopen, securityProtocolDown, setHostUri, setNodeUri, traceDown, unwrapLink, warnDown
-
-
-
-
Field Detail
-
prio
protected final float prio
-
rate
protected final float rate
-
body
protected final Value body
-
linkContext
protected WarpContext linkContext
-
cellContext
protected CellContext cellContext
-
status
protected volatile int status
-
EXEC_DELTA
protected static final AtomicLongFieldUpdater<WarpDownlinkModem<?>> EXEC_DELTA
-
EXEC_TIME
protected static final AtomicLongFieldUpdater<WarpDownlinkModem<?>> EXEC_TIME
-
-
Method Detail
-
linkWrapper
public final WarpBinding linkWrapper()
- Specified by:
linkWrapper
in interfaceLinkBinding
- Specified by:
linkWrapper
in interfaceWarpBinding
- Specified by:
linkWrapper
in classAbstractDownlinkBinding
-
linkContext
public final WarpContext linkContext()
- Specified by:
linkContext
in interfaceLinkBinding
- Specified by:
linkContext
in interfaceWarpBinding
- Specified by:
linkContext
in classAbstractDownlinkBinding
-
setLinkContext
public void setLinkContext(LinkContext linkContext)
- Specified by:
setLinkContext
in interfaceLinkBinding
-
cellContext
public final CellContext cellContext()
- Specified by:
cellContext
in interfaceLinkBinding
- Specified by:
cellContext
in classAbstractDownlinkBinding
-
setCellContext
public void setCellContext(CellContext cellContext)
- Specified by:
setCellContext
in interfaceLinkBinding
-
prio
public final float prio()
- Specified by:
prio
in interfaceWarpBinding
-
rate
public final float rate()
- Specified by:
rate
in interfaceWarpBinding
-
body
public final Value body()
- Specified by:
body
in interfaceWarpBinding
-
keepLinked
public abstract boolean keepLinked()
- Specified by:
keepLinked
in interfaceWarpBinding
-
keepSynced
public abstract boolean keepSynced()
- Specified by:
keepSynced
in interfaceWarpBinding
-
cueDown
public void cueDown()
-
feedDown
public void feedDown()
- Specified by:
feedDown
in interfaceWarpBinding
-
pushDown
public void pushDown(Push<?> push)
- Specified by:
pushDown
in interfaceWarpBinding
-
pushDownEvent
protected void pushDownEvent(Push<EventMessage> push)
-
pushDownLinked
protected void pushDownLinked(Push<LinkedResponse> push)
-
pushDownSynced
protected void pushDownSynced(Push<SyncedResponse> push)
-
pushDownUnlinked
protected void pushDownUnlinked(Push<UnlinkedResponse> push)
-
pushDownUnknown
protected void pushDownUnknown(Push<?> push)
-
skipDown
public void skipDown()
- Specified by:
skipDown
in interfaceWarpBinding
-
upQueueIsEmpty
protected boolean upQueueIsEmpty()
-
queueUp
protected void queueUp(Value body, Cont<CommandMessage> cont)
-
nextUpQueue
protected Push<CommandMessage> nextUpQueue()
-
nextUpCue
protected Push<CommandMessage> nextUpCue()
-
pushUp
public void pushUp(Value body)
-
cueUp
public void cueUp()
-
feedUp
protected void feedUp()
-
pullUp
public void pullUp()
- Specified by:
pullUp
in interfaceWarpBinding
-
pullUpCommand
protected void pullUpCommand(CommandMessage message)
-
pullUpLink
protected void pullUpLink(LinkRequest request)
-
pullUpSync
protected void pullUpSync(SyncRequest request)
-
pullUpUnlink
protected void pullUpUnlink(UnlinkRequest request)
-
pushUp
protected void pushUp(Envelope envelope)
-
link
public void link()
-
sync
public void sync()
-
unlink
public void unlink()
-
command
public void command(float prio, Value body, Cont<CommandMessage> cont)
-
command
public void command(Value body, Cont<CommandMessage> cont)
-
command
public void command(float prio, Value body)
-
command
public void command(Value body)
-
linkRequest
protected LinkRequest linkRequest()
-
syncRequest
protected SyncRequest syncRequest()
-
unlinkRequest
protected UnlinkRequest unlinkRequest()
-
didAddDownlink
protected void didAddDownlink(View view)
- Overrides:
didAddDownlink
in classDownlinkModel<View extends DownlinkView>
-
didRemoveDownlink
protected void didRemoveDownlink(View view)
- Overrides:
didRemoveDownlink
in classDownlinkModel<View extends DownlinkView>
-
openDown
public void openDown()
- Specified by:
openDown
in interfaceLinkBinding
- Specified by:
openDown
in classAbstractDownlinkBinding
-
didOpen
protected void didOpen()
-
closeDown
public void closeDown()
- Specified by:
closeDown
in interfaceLinkBinding
- Specified by:
closeDown
in classAbstractDownlinkBinding
-
didClose
protected void didClose()
-
onEvent
protected void onEvent(EventMessage message)
-
onCommand
protected void onCommand(CommandMessage message)
-
willLink
protected void willLink(LinkRequest request)
-
didLink
protected void didLink(LinkedResponse response)
-
willSync
protected void willSync(SyncRequest request)
-
didSync
protected void didSync(SyncedResponse response)
-
willUnlink
protected void willUnlink(UnlinkRequest request)
-
didUnlink
protected void didUnlink(UnlinkedResponse response)
-
didConnect
public void didConnect()
- Specified by:
didConnect
in interfaceLinkBinding
- Overrides:
didConnect
in classDownlinkModel<View extends DownlinkView>
-
didDisconnect
public void didDisconnect()
- Specified by:
didDisconnect
in interfaceLinkBinding
- Overrides:
didDisconnect
in classDownlinkModel<View extends DownlinkView>
-
didCloseUp
public void didCloseUp()
- Specified by:
didCloseUp
in interfaceLinkBinding
- Overrides:
didCloseUp
in classDownlinkModel<View extends DownlinkView>
-
didFailUp
public void didFailUp(Throwable error)
- Specified by:
didFailUp
in interfaceLinkBinding
- Specified by:
didFailUp
in classAbstractDownlinkBinding
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceLinkBinding
- Overrides:
didFail
in classDownlinkModel<View extends DownlinkView>
-
openMetaDownlink
public void openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
- Specified by:
openMetaDownlink
in interfaceLinkBinding
-
accumulateExecTime
public void accumulateExecTime(long execDelta)
- Overrides:
accumulateExecTime
in classDownlinkModel<View extends DownlinkView>
-
didUpdateMetrics
protected void didUpdateMetrics()
-
flushMetrics
protected void flushMetrics()
-
reportMetrics
protected void reportMetrics(long dt)
-
collectProfile
protected WarpDownlinkProfile collectProfile(long dt)
-
-