- java.lang.Object
-
- swim.system.AbstractUplinkContext
-
- swim.system.warp.WarpUplinkModem
-
- All Implemented Interfaces:
Link
,Uplink
,WarpLink
,WarpUplink
,Observable<Object>
,LinkContext
,WarpContext
,Log
- Direct Known Subclasses:
DemandUplinkModem
,ListUplinkModem
,MapUplinkModem
,SupplyUplinkModem
public abstract class WarpUplinkModem extends AbstractUplinkContext implements WarpContext, WarpUplink
-
-
Field Summary
Fields Modifier and Type Field Description protected WarpBinding
linkBinding
protected int
status
protected UplinkAddress
uplinkAddress
-
Fields inherited from class swim.system.AbstractUplinkContext
observers
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WarpUplinkModem(WarpBinding linkBinding, UplinkAddress uplinkAddress)
-
Method Summary
-
Methods inherited from class swim.system.AbstractUplinkContext
bottomLink, cipherSuite, cipherSuiteUp, close, closeUp, debug, debugUp, didCloseDown, didFail, didFailDown, didOpenDown, error, errorUp, fail, failUp, info, infoUp, isConnected, isConnectedUp, isRemote, isRemoteUp, isSecure, isSecureUp, laneBinding, localAddress, localAddressUp, localCertificates, localCertificatesUp, localIdentity, localIdentityUp, localPrincipal, localPrincipalUp, remoteAddress, remoteAddressUp, remoteCertificates, remoteCertificatesUp, remoteIdentity, remoteIdentityUp, remotePrincipal, remotePrincipalUp, securityProtocol, securityProtocolUp, stage, trace, traceUp, unwrapLink, warn, warnUp
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.api.Link
cipherSuite, close, isConnected, isRemote, isSecure, localAddress, localCertificates, localIdentity, localPrincipal, remoteAddress, remoteCertificates, remoteIdentity, remotePrincipal, securityProtocol
-
Methods inherited from interface swim.system.LinkContext
bottomLink, cipherSuiteUp, closeUp, debugUp, didCloseDown, didFailDown, didOpenDown, errorUp, failUp, infoUp, isConnectedUp, isRemoteUp, isSecureUp, localAddressUp, localCertificatesUp, localIdentityUp, localPrincipalUp, remoteAddressUp, remoteCertificatesUp, remoteIdentityUp, remotePrincipalUp, securityProtocolUp, traceUp, unwrapLink, warnUp
-
-
-
-
Field Detail
-
linkBinding
protected final WarpBinding linkBinding
-
uplinkAddress
protected final UplinkAddress uplinkAddress
-
status
protected volatile int status
-
-
Constructor Detail
-
WarpUplinkModem
protected WarpUplinkModem(WarpBinding linkBinding, UplinkAddress uplinkAddress)
-
-
Method Detail
-
linkWrapper
public final WarpBinding linkWrapper()
- Specified by:
linkWrapper
in interfaceLinkContext
- Specified by:
linkWrapper
in interfaceWarpContext
- Specified by:
linkWrapper
in classAbstractUplinkContext
-
linkBinding
public final WarpBinding linkBinding()
- Specified by:
linkBinding
in classAbstractUplinkContext
-
hostUri
public final Uri hostUri()
- Specified by:
hostUri
in interfaceLink
- Specified by:
hostUri
in classAbstractUplinkContext
-
nodeUri
public final Uri nodeUri()
- Specified by:
nodeUri
in interfaceLink
- Specified by:
nodeUri
in classAbstractUplinkContext
-
laneUri
public final Uri laneUri()
- Specified by:
laneUri
in interfaceLink
- Specified by:
laneUri
in classAbstractUplinkContext
-
linkKey
public final Value linkKey()
- Specified by:
linkKey
in interfaceLinkContext
- Specified by:
linkKey
in classAbstractUplinkContext
-
cellAddressUp
public final UplinkAddress cellAddressUp()
- Specified by:
cellAddressUp
in interfaceLinkContext
- Overrides:
cellAddressUp
in classAbstractUplinkContext
-
prio
public final float prio()
- Specified by:
prio
in interfaceWarpUplink
-
rate
public final float rate()
- Specified by:
rate
in interfaceWarpUplink
-
body
public final Value body()
- Specified by:
body
in interfaceWarpUplink
-
observe
public WarpUplinkModem observe(Object observer)
- Specified by:
observe
in interfaceLink
- Specified by:
observe
in interfaceObservable<Object>
- Specified by:
observe
in interfaceUplink
- Specified by:
observe
in interfaceWarpUplink
- Overrides:
observe
in classAbstractUplinkContext
-
unobserve
public WarpUplinkModem unobserve(Object observer)
- Specified by:
unobserve
in interfaceLink
- Specified by:
unobserve
in interfaceObservable<Object>
- Specified by:
unobserve
in interfaceUplink
- Specified by:
unobserve
in interfaceWarpUplink
- Overrides:
unobserve
in classAbstractUplinkContext
-
onEvent
public WarpUplinkModem onEvent(OnEventMessage onEvent)
- Specified by:
onEvent
in interfaceWarpUplink
-
onCommand
public WarpUplinkModem onCommand(OnCommandMessage onCommand)
- Specified by:
onCommand
in interfaceWarpUplink
-
onLink
public WarpUplinkModem onLink(OnLinkRequest onLink)
- Specified by:
onLink
in interfaceWarpUplink
-
onLinked
public WarpUplinkModem onLinked(OnLinkedResponse onLinked)
- Specified by:
onLinked
in interfaceWarpUplink
-
onSync
public WarpUplinkModem onSync(OnSyncRequest onSync)
- Specified by:
onSync
in interfaceWarpUplink
-
onSynced
public WarpUplinkModem onSynced(OnSyncedResponse onSynced)
- Specified by:
onSynced
in interfaceWarpUplink
-
onUnlink
public WarpUplinkModem onUnlink(OnUnlinkRequest onUnlink)
- Specified by:
onUnlink
in interfaceWarpUplink
-
onUnlinked
public WarpUplinkModem onUnlinked(OnUnlinkedResponse onUnlinked)
- Specified by:
onUnlinked
in interfaceWarpUplink
-
didClose
public WarpUplinkModem didClose(DidClose didClose)
- Specified by:
didClose
in interfaceWarpUplink
-
dispatchOnEvent
protected void dispatchOnEvent(EventMessage message)
-
dispatchOnCommand
protected boolean dispatchOnCommand(CommandMessage message, boolean preemptive)
-
dispatchOnLink
protected boolean dispatchOnLink(LinkRequest request, boolean preemptive)
-
dispatchOnLinked
protected void dispatchOnLinked(LinkedResponse response)
-
dispatchOnSync
protected boolean dispatchOnSync(SyncRequest request, boolean preemptive)
-
dispatchOnSynced
protected void dispatchOnSynced(SyncedResponse response)
-
dispatchOnUnlink
protected boolean dispatchOnUnlink(UnlinkRequest request, boolean preemptive)
-
dispatchOnUnlinked
protected void dispatchOnUnlinked(UnlinkedResponse response)
-
dispatchDidClose
protected void dispatchDidClose()
-
downQueueIsEmpty
protected boolean downQueueIsEmpty()
-
queueDown
protected void queueDown(Value body)
-
nextDownQueue
protected Value nextDownQueue()
-
nextDownQueueEvent
protected EventMessage nextDownQueueEvent()
-
nextDownCue
protected Value nextDownCue()
-
nextDownCueEvent
protected EventMessage nextDownCueEvent()
-
sendDown
public void sendDown(Value body)
-
cueDown
public void cueDown()
-
pullDown
public void pullDown()
- Specified by:
pullDown
in interfaceWarpContext
-
runPullDown
protected void runPullDown()
-
pullDownEnvelope
protected void pullDownEnvelope()
-
pullDownEvent
protected void pullDownEvent(EventMessage message)
-
pullDownLinked
protected void pullDownLinked(LinkedResponse response)
-
pullDownSynced
protected void pullDownSynced(SyncedResponse response)
-
pullDownUnlinked
protected void pullDownUnlinked(UnlinkedResponse response)
-
pushDown
protected void pushDown(Envelope envelope)
-
cueUp
public void cueUp()
-
feedUp
public void feedUp()
- Specified by:
feedUp
in interfaceWarpContext
-
pushUp
public void pushUp(Push<?> push)
- Specified by:
pushUp
in interfaceWarpContext
-
pushUpCommand
protected void pushUpCommand(Push<CommandMessage> push)
-
runOnCommand
protected void runOnCommand(Push<CommandMessage> push)
-
pushUpLink
protected void pushUpLink(Push<LinkRequest> push)
-
runOnLink
protected void runOnLink(Push<LinkRequest> push)
-
pushUpSync
protected void pushUpSync(Push<SyncRequest> push)
-
runOnSync
protected void runOnSync(Push<SyncRequest> push)
-
pushUpUnlink
protected void pushUpUnlink(Push<UnlinkRequest> push)
-
runOnUnlink
protected void runOnUnlink(Push<UnlinkRequest> push)
-
pushUpUnknown
protected void pushUpUnknown(Push<?> push)
-
skipUp
public void skipUp()
- Specified by:
skipUp
in interfaceWarpContext
-
unlink
public void unlink()
-
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)
-
linkedResponse
protected LinkedResponse linkedResponse()
-
syncedResponse
protected SyncedResponse syncedResponse()
-
unlinkedResponse
protected UnlinkedResponse unlinkedResponse()
-
didClose
protected void didClose()
- Overrides:
didClose
in classAbstractUplinkContext
-
openMetaUplink
public void openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
- Specified by:
openMetaUplink
in interfaceLinkContext
-
didUpdateMetrics
protected void didUpdateMetrics()
-
flushMetrics
protected void flushMetrics()
-
reportMetrics
protected void reportMetrics(long dt)
-
collectProfile
protected WarpUplinkProfile collectProfile(long dt)
-
-