- java.lang.Object
-
- swim.runtime.downlink.DownlinkModem
-
- All Implemented Interfaces:
LinkBinding,swim.util.Log
- Direct Known Subclasses:
DownlinkModel
public abstract class DownlinkModem extends Object implements LinkBinding, swim.util.Log
-
-
Field Summary
Fields Modifier and Type Field Description protected swim.structure.Valuebodyprotected CellContextcellContextprotected swim.uri.UrihostUriprotected swim.uri.UrilaneUriprotected LinkContextlinkContextprotected swim.uri.UrimeshUriprotected swim.uri.UrinodeUriprotected floatprioprotected floatrateprotected intstatus
-
Constructor Summary
Constructors Constructor Description DownlinkModem(swim.uri.Uri meshUri, swim.uri.Uri hostUri, swim.uri.Uri nodeUri, swim.uri.Uri laneUri, float prio, float rate, swim.structure.Value body)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description swim.structure.Valuebody()CellContextcellContext()StringcipherSuite()StringcipherSuiteDown()voidcloseDown()voidcommand(float prio, swim.structure.Value body)voidcommand(swim.structure.Value body)voidcueDown()voidcueUp()voiddebug(Object message)voiddebugDown(Object message)protected voiddidClose()voiddidCloseUp()voiddidConnect()voiddidDisconnect()voiddidFail(Throwable error)protected voiddidLink(swim.warp.LinkedResponse response)protected voiddidOpen()protected voiddidSync(swim.warp.SyncedResponse response)protected voiddidUnlink(swim.warp.UnlinkedResponse response)voiderror(Object message)voiderrorDown(Object message)voidfeedDown()protected voidfeedUp()swim.uri.UrihostUri()voidinfo(Object message)voidinfoDown(Object message)booleanisConnected()booleanisConnectedDown()booleanisRemote()booleanisRemoteDown()booleanisSecure()booleanisSecureDown()abstract booleankeepLinked()abstract booleankeepSynced()swim.uri.UrilaneUri()voidlink()LinkContextlinkContext()protected swim.warp.LinkRequestlinkRequest()InetSocketAddresslocalAddress()InetSocketAddresslocalAddressDown()Collection<Certificate>localCertificates()Collection<Certificate>localCertificatesDown()swim.api.auth.IdentitylocalIdentity()swim.api.auth.IdentitylocalIdentityDown()PrincipallocalPrincipal()PrincipallocalPrincipalDown()swim.uri.UrimeshUri()protected swim.structure.ValuenextUpCue()protected swim.warp.CommandMessagenextUpCueCommand()protected swim.structure.ValuenextUpQueue()protected swim.warp.CommandMessagenextUpQueueCommand()swim.uri.UrinodeUri()protected voidonCommand(swim.warp.CommandMessage message)protected voidonEvent(swim.warp.EventMessage message)voidopenDown()floatprio()voidpullUp()protected voidpullUpCommand(swim.warp.CommandMessage message)protected voidpullUpLink(swim.warp.LinkRequest request)protected voidpullUpSync(swim.warp.SyncRequest request)protected voidpullUpUnlink(swim.warp.UnlinkRequest request)voidpushDown(swim.warp.Envelope envelope)protected voidpushDownEnvelope(swim.warp.Envelope envelope)protected voidpushDownEvent(swim.warp.EventMessage message)protected voidpushDownLinked(swim.warp.LinkedResponse response)protected voidpushDownSynced(swim.warp.SyncedResponse response)protected voidpushDownUnlinked(swim.warp.UnlinkedResponse response)voidpushUp(swim.structure.Value body)protected voidqueueUp(swim.structure.Value body)floatrate()InetSocketAddressremoteAddress()InetSocketAddressremoteAddressDown()Collection<Certificate>remoteCertificates()Collection<Certificate>remoteCertificatesDown()swim.api.auth.IdentityremoteIdentity()swim.api.auth.IdentityremoteIdentityDown()PrincipalremotePrincipal()PrincipalremotePrincipalDown()voidreopen()StringsecurityProtocol()StringsecurityProtocolDown()voidsetCellContext(CellContext cellContext)voidsetLinkContext(LinkContext linkContext)voidskipDown()voidsync()protected swim.warp.SyncRequestsyncRequest()voidtrace(Object message)voidtraceDown(Object message)voidunlink()protected swim.warp.UnlinkRequestunlinkRequest()<T> TunwrapLink(Class<T> linkClass)protected booleanupQueueIsEmpty()voidwarn(Object message)voidwarnDown(Object message)protected voidwillLink(swim.warp.LinkRequest request)protected voidwillSync(swim.warp.SyncRequest request)protected voidwillUnlink(swim.warp.UnlinkRequest request)
-
-
-
Field Detail
-
linkContext
protected LinkContext linkContext
-
cellContext
protected CellContext cellContext
-
meshUri
protected final swim.uri.Uri meshUri
-
hostUri
protected final swim.uri.Uri hostUri
-
nodeUri
protected final swim.uri.Uri nodeUri
-
laneUri
protected final swim.uri.Uri laneUri
-
prio
protected final float prio
-
rate
protected final float rate
-
body
protected final swim.structure.Value body
-
status
protected volatile int status
-
-
Method Detail
-
linkContext
public final LinkContext linkContext()
- Specified by:
linkContextin interfaceLinkBinding
-
setLinkContext
public void setLinkContext(LinkContext linkContext)
- Specified by:
setLinkContextin interfaceLinkBinding
-
cellContext
public final CellContext cellContext()
- Specified by:
cellContextin interfaceLinkBinding
-
setCellContext
public void setCellContext(CellContext cellContext)
- Specified by:
setCellContextin interfaceLinkBinding
-
unwrapLink
public <T> T unwrapLink(Class<T> linkClass)
- Specified by:
unwrapLinkin interfaceLinkBinding
-
meshUri
public final swim.uri.Uri meshUri()
- Specified by:
meshUriin interfaceLinkBinding
-
hostUri
public final swim.uri.Uri hostUri()
- Specified by:
hostUriin interfaceLinkBinding
-
nodeUri
public final swim.uri.Uri nodeUri()
- Specified by:
nodeUriin interfaceLinkBinding
-
laneUri
public final swim.uri.Uri laneUri()
- Specified by:
laneUriin interfaceLinkBinding
-
prio
public final float prio()
- Specified by:
prioin interfaceLinkBinding
-
rate
public final float rate()
- Specified by:
ratein interfaceLinkBinding
-
body
public final swim.structure.Value body()
- Specified by:
bodyin interfaceLinkBinding
-
keepLinked
public abstract boolean keepLinked()
- Specified by:
keepLinkedin interfaceLinkBinding
-
keepSynced
public abstract boolean keepSynced()
- Specified by:
keepSyncedin interfaceLinkBinding
-
isConnectedDown
public boolean isConnectedDown()
- Specified by:
isConnectedDownin interfaceLinkBinding
-
isRemoteDown
public boolean isRemoteDown()
- Specified by:
isRemoteDownin interfaceLinkBinding
-
isSecureDown
public boolean isSecureDown()
- Specified by:
isSecureDownin interfaceLinkBinding
-
securityProtocolDown
public String securityProtocolDown()
- Specified by:
securityProtocolDownin interfaceLinkBinding
-
cipherSuiteDown
public String cipherSuiteDown()
- Specified by:
cipherSuiteDownin interfaceLinkBinding
-
localAddressDown
public InetSocketAddress localAddressDown()
- Specified by:
localAddressDownin interfaceLinkBinding
-
localIdentityDown
public final swim.api.auth.Identity localIdentityDown()
- Specified by:
localIdentityDownin interfaceLinkBinding
-
localPrincipalDown
public Principal localPrincipalDown()
- Specified by:
localPrincipalDownin interfaceLinkBinding
-
localCertificatesDown
public Collection<Certificate> localCertificatesDown()
- Specified by:
localCertificatesDownin interfaceLinkBinding
-
remoteAddressDown
public InetSocketAddress remoteAddressDown()
- Specified by:
remoteAddressDownin interfaceLinkBinding
-
remoteIdentityDown
public final swim.api.auth.Identity remoteIdentityDown()
- Specified by:
remoteIdentityDownin interfaceLinkBinding
-
remotePrincipalDown
public Principal remotePrincipalDown()
- Specified by:
remotePrincipalDownin interfaceLinkBinding
-
remoteCertificatesDown
public Collection<Certificate> remoteCertificatesDown()
- Specified by:
remoteCertificatesDownin interfaceLinkBinding
-
isConnected
public boolean isConnected()
-
isRemote
public boolean isRemote()
-
isSecure
public boolean isSecure()
-
securityProtocol
public String securityProtocol()
-
cipherSuite
public String cipherSuite()
-
localAddress
public InetSocketAddress localAddress()
-
localIdentity
public swim.api.auth.Identity localIdentity()
-
localPrincipal
public Principal localPrincipal()
-
localCertificates
public Collection<Certificate> localCertificates()
-
remoteAddress
public InetSocketAddress remoteAddress()
-
remoteIdentity
public swim.api.auth.Identity remoteIdentity()
-
remotePrincipal
public Principal remotePrincipal()
-
remoteCertificates
public Collection<Certificate> remoteCertificates()
-
cueDown
public void cueDown()
-
feedDown
public void feedDown()
- Specified by:
feedDownin interfaceLinkBinding
-
pushDown
public void pushDown(swim.warp.Envelope envelope)
- Specified by:
pushDownin interfaceLinkBinding
-
pushDownEvent
protected void pushDownEvent(swim.warp.EventMessage message)
-
pushDownLinked
protected void pushDownLinked(swim.warp.LinkedResponse response)
-
pushDownSynced
protected void pushDownSynced(swim.warp.SyncedResponse response)
-
pushDownUnlinked
protected void pushDownUnlinked(swim.warp.UnlinkedResponse response)
-
pushDownEnvelope
protected void pushDownEnvelope(swim.warp.Envelope envelope)
-
skipDown
public void skipDown()
- Specified by:
skipDownin interfaceLinkBinding
-
upQueueIsEmpty
protected boolean upQueueIsEmpty()
-
queueUp
protected void queueUp(swim.structure.Value body)
-
nextUpQueue
protected swim.structure.Value nextUpQueue()
-
nextUpQueueCommand
protected swim.warp.CommandMessage nextUpQueueCommand()
-
nextUpCue
protected swim.structure.Value nextUpCue()
-
nextUpCueCommand
protected swim.warp.CommandMessage nextUpCueCommand()
-
pushUp
public void pushUp(swim.structure.Value body)
-
cueUp
public void cueUp()
-
feedUp
protected void feedUp()
-
pullUp
public void pullUp()
- Specified by:
pullUpin interfaceLinkBinding
-
pullUpCommand
protected void pullUpCommand(swim.warp.CommandMessage message)
-
pullUpLink
protected void pullUpLink(swim.warp.LinkRequest request)
-
pullUpSync
protected void pullUpSync(swim.warp.SyncRequest request)
-
pullUpUnlink
protected void pullUpUnlink(swim.warp.UnlinkRequest request)
-
link
public void link()
-
sync
public void sync()
-
unlink
public void unlink()
-
command
public void command(float prio, swim.structure.Value body)
-
command
public void command(swim.structure.Value body)
-
linkRequest
protected swim.warp.LinkRequest linkRequest()
-
syncRequest
protected swim.warp.SyncRequest syncRequest()
-
unlinkRequest
protected swim.warp.UnlinkRequest unlinkRequest()
-
reopen
public void reopen()
- Specified by:
reopenin interfaceLinkBinding
-
openDown
public void openDown()
- Specified by:
openDownin interfaceLinkBinding
-
didOpen
protected void didOpen()
-
closeDown
public void closeDown()
- Specified by:
closeDownin interfaceLinkBinding
-
didClose
protected void didClose()
-
onEvent
protected void onEvent(swim.warp.EventMessage message)
-
onCommand
protected void onCommand(swim.warp.CommandMessage message)
-
willLink
protected void willLink(swim.warp.LinkRequest request)
-
didLink
protected void didLink(swim.warp.LinkedResponse response)
-
willSync
protected void willSync(swim.warp.SyncRequest request)
-
didSync
protected void didSync(swim.warp.SyncedResponse response)
-
willUnlink
protected void willUnlink(swim.warp.UnlinkRequest request)
-
didUnlink
protected void didUnlink(swim.warp.UnlinkedResponse response)
-
didConnect
public void didConnect()
- Specified by:
didConnectin interfaceLinkBinding
-
didDisconnect
public void didDisconnect()
- Specified by:
didDisconnectin interfaceLinkBinding
-
didCloseUp
public void didCloseUp()
- Specified by:
didCloseUpin interfaceLinkBinding
-
didFail
public void didFail(Throwable error)
- Specified by:
didFailin interfaceLinkBinding
-
traceDown
public void traceDown(Object message)
- Specified by:
traceDownin interfaceLinkBinding
-
debugDown
public void debugDown(Object message)
- Specified by:
debugDownin interfaceLinkBinding
-
infoDown
public void infoDown(Object message)
- Specified by:
infoDownin interfaceLinkBinding
-
warnDown
public void warnDown(Object message)
- Specified by:
warnDownin interfaceLinkBinding
-
errorDown
public void errorDown(Object message)
- Specified by:
errorDownin interfaceLinkBinding
-
trace
public void trace(Object message)
- Specified by:
tracein interfaceswim.util.Log
-
debug
public void debug(Object message)
- Specified by:
debugin interfaceswim.util.Log
-
info
public void info(Object message)
- Specified by:
infoin interfaceswim.util.Log
-
warn
public void warn(Object message)
- Specified by:
warnin interfaceswim.util.Log
-
error
public void error(Object message)
- Specified by:
errorin interfaceswim.util.Log
-
-