- java.lang.Object
-
- swim.runtime.uplink.UplinkModem
-
- All Implemented Interfaces:
Link
,Uplink
,Observable<Object>
,LinkContext
,Log
- Direct Known Subclasses:
DemandUplinkModem
,ListUplinkModem
,PartialUplinkModem
,SupplyUplinkModem
public abstract class UplinkModem extends Object implements LinkContext, Uplink
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkBinding
linkBinding
protected Value
linkKey
protected Object
observers
protected int
status
-
Method Summary
-
-
-
Field Detail
-
linkBinding
protected final LinkBinding linkBinding
-
linkKey
protected final Value linkKey
-
status
protected volatile int status
-
observers
protected volatile Object observers
-
-
Method Detail
-
laneBinding
public abstract LaneBinding laneBinding()
-
linkWrapper
public final LinkBinding linkWrapper()
- Specified by:
linkWrapper
in interfaceLinkContext
-
linkBinding
public final LinkBinding linkBinding()
-
unwrapLink
public <T> T unwrapLink(Class<T> linkClass)
- Specified by:
unwrapLink
in interfaceLinkContext
-
stage
public abstract Stage stage()
-
hostUri
public final Uri hostUri()
-
nodeUri
public final Uri nodeUri()
-
laneUri
public final Uri laneUri()
-
linkKey
public final Value linkKey()
- Specified by:
linkKey
in interfaceLinkContext
-
isConnectedUp
public boolean isConnectedUp()
- Specified by:
isConnectedUp
in interfaceLinkContext
-
isRemoteUp
public boolean isRemoteUp()
- Specified by:
isRemoteUp
in interfaceLinkContext
-
isSecureUp
public boolean isSecureUp()
- Specified by:
isSecureUp
in interfaceLinkContext
-
securityProtocolUp
public String securityProtocolUp()
- Specified by:
securityProtocolUp
in interfaceLinkContext
-
cipherSuiteUp
public String cipherSuiteUp()
- Specified by:
cipherSuiteUp
in interfaceLinkContext
-
localAddressUp
public InetSocketAddress localAddressUp()
- Specified by:
localAddressUp
in interfaceLinkContext
-
localIdentityUp
public Identity localIdentityUp()
- Specified by:
localIdentityUp
in interfaceLinkContext
-
localPrincipalUp
public Principal localPrincipalUp()
- Specified by:
localPrincipalUp
in interfaceLinkContext
-
localCertificatesUp
public Collection<Certificate> localCertificatesUp()
- Specified by:
localCertificatesUp
in interfaceLinkContext
-
remoteAddressUp
public InetSocketAddress remoteAddressUp()
- Specified by:
remoteAddressUp
in interfaceLinkContext
-
remoteIdentityUp
public Identity remoteIdentityUp()
- Specified by:
remoteIdentityUp
in interfaceLinkContext
-
remotePrincipalUp
public Principal remotePrincipalUp()
- Specified by:
remotePrincipalUp
in interfaceLinkContext
-
remoteCertificatesUp
public Collection<Certificate> remoteCertificatesUp()
- Specified by:
remoteCertificatesUp
in interfaceLinkContext
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceLink
- Specified by:
isConnected
in interfaceUplink
-
isRemote
public boolean isRemote()
-
isSecure
public boolean isSecure()
-
securityProtocol
public String securityProtocol()
- Specified by:
securityProtocol
in interfaceLink
- Specified by:
securityProtocol
in interfaceUplink
-
cipherSuite
public String cipherSuite()
- Specified by:
cipherSuite
in interfaceLink
- Specified by:
cipherSuite
in interfaceUplink
-
localAddress
public InetSocketAddress localAddress()
- Specified by:
localAddress
in interfaceLink
- Specified by:
localAddress
in interfaceUplink
-
localIdentity
public Identity localIdentity()
- Specified by:
localIdentity
in interfaceLink
- Specified by:
localIdentity
in interfaceUplink
-
localPrincipal
public Principal localPrincipal()
- Specified by:
localPrincipal
in interfaceLink
- Specified by:
localPrincipal
in interfaceUplink
-
localCertificates
public Collection<Certificate> localCertificates()
- Specified by:
localCertificates
in interfaceLink
- Specified by:
localCertificates
in interfaceUplink
-
remoteAddress
public InetSocketAddress remoteAddress()
- Specified by:
remoteAddress
in interfaceLink
- Specified by:
remoteAddress
in interfaceUplink
-
remoteIdentity
public Identity remoteIdentity()
- Specified by:
remoteIdentity
in interfaceLink
- Specified by:
remoteIdentity
in interfaceUplink
-
remotePrincipal
public Principal remotePrincipal()
- Specified by:
remotePrincipal
in interfaceLink
- Specified by:
remotePrincipal
in interfaceUplink
-
remoteCertificates
public Collection<Certificate> remoteCertificates()
- Specified by:
remoteCertificates
in interfaceLink
- Specified by:
remoteCertificates
in interfaceUplink
-
observe
public UplinkModem observe(Object newObserver)
-
unobserve
public UplinkModem unobserve(Object oldObserver)
-
onEvent
public UplinkModem onEvent(OnEvent onEvent)
-
onCommand
public UplinkModem onCommand(OnCommand onCommand)
-
onLink
public UplinkModem onLink(OnLink onLink)
-
onLinked
public UplinkModem onLinked(OnLinked onLinked)
-
onSync
public UplinkModem onSync(OnSync onSync)
-
onSynced
public UplinkModem onSynced(OnSynced onSynced)
-
onUnlink
public UplinkModem onUnlink(OnUnlink onUnlink)
-
onUnlinked
public UplinkModem onUnlinked(OnUnlinked onUnlinked)
- Specified by:
onUnlinked
in interfaceUplink
-
didClose
public UplinkModem didClose(DidClose didClose)
-
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 interfaceLinkContext
-
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)
-
cueUp
public void cueUp()
-
feedUp
public void feedUp()
- Specified by:
feedUp
in interfaceLinkContext
-
pushUp
public void pushUp(Envelope envelope)
- Specified by:
pushUp
in interfaceLinkContext
-
pushUpCommand
protected void pushUpCommand(CommandMessage message)
-
runOnCommand
protected void runOnCommand(CommandMessage message)
-
pushUpLink
protected void pushUpLink(LinkRequest request)
-
runOnLink
protected void runOnLink(LinkRequest request)
-
pushUpSync
protected void pushUpSync(SyncRequest request)
-
runOnSync
protected void runOnSync(SyncRequest request)
-
pushUpUnlink
protected void pushUpUnlink(UnlinkRequest request)
-
runOnUnlink
protected void runOnUnlink(UnlinkRequest request)
-
pushUpEnvelope
protected void pushUpEnvelope(Envelope envelope)
-
skipUp
public void skipUp()
- Specified by:
skipUp
in interfaceLinkContext
-
unlink
public void unlink()
-
closeUp
public void closeUp()
- Specified by:
closeUp
in interfaceLinkContext
-
close
public void close()
-
didOpenDown
public void didOpenDown()
- Specified by:
didOpenDown
in interfaceLinkContext
-
didCloseDown
public void didCloseDown()
- Specified by:
didCloseDown
in interfaceLinkContext
-
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)
-
didFail
protected void didFail(Throwable error)
-
linkedResponse
protected LinkedResponse linkedResponse()
-
syncedResponse
protected SyncedResponse syncedResponse()
-
unlinkedResponse
protected UnlinkedResponse unlinkedResponse()
-
traceUp
public void traceUp(Object message)
- Specified by:
traceUp
in interfaceLinkContext
-
debugUp
public void debugUp(Object message)
- Specified by:
debugUp
in interfaceLinkContext
-
infoUp
public void infoUp(Object message)
- Specified by:
infoUp
in interfaceLinkContext
-
warnUp
public void warnUp(Object message)
- Specified by:
warnUp
in interfaceLinkContext
-
errorUp
public void errorUp(Object message)
- Specified by:
errorUp
in interfaceLinkContext
-
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.
-
-