- java.lang.Object
-
- swim.system.AbstractWarpRef
-
- swim.system.AbstractTierBinding
-
- swim.remote.RemoteHost
-
- All Implemented Interfaces:
DownlinkFactory
,WarpRef
,StayContext
,WarpSocket
,CellBinding
,CellContext
,HostBinding
,TierBinding
,Log
- Direct Known Subclasses:
RemoteHostClient
public class RemoteHost extends AbstractTierBinding implements HostBinding, WarpSocket, StayContext
-
-
Field Summary
Fields Modifier and Type Field Description protected HostContext
hostContext
protected WarpSocketContext
warpSocketContext
-
Fields inherited from class swim.system.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 RemoteHost(Uri baseUri)
RemoteHost(Uri requestUri, Uri baseUri)
-
Method Summary
-
Methods inherited from class swim.system.AbstractTierBinding
activate, awaitStart, close, didLoad, didOpen, didStart, didStop, didUnload, isClosed, isLoaded, isOpened, isStarted, load, open, start, stop, unload, willLoad, willOpen, willStart, willStop, willUnload
-
Methods inherited from class swim.system.AbstractWarpRef
command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, command, downlink, downlinkHttp, downlinkList, downlinkMap, downlinkValue, downlinkWs, hostRef, hostRef, laneRef, laneRef, laneRef, laneRef, nodeRef, nodeRef, nodeRef, nodeRef
-
-
-
-
Field Detail
-
hostContext
protected HostContext hostContext
-
warpSocketContext
protected WarpSocketContext warpSocketContext
-
-
Method Detail
-
tierContext
public final TierContext tierContext()
- Specified by:
tierContext
in interfaceTierBinding
- Specified by:
tierContext
in classAbstractTierBinding
-
part
public final PartBinding part()
- Specified by:
part
in interfaceHostBinding
-
hostWrapper
public final HostBinding hostWrapper()
- Specified by:
hostWrapper
in interfaceHostBinding
-
unwrapHost
public <T> T unwrapHost(Class<T> hostClass)
- Specified by:
unwrapHost
in interfaceHostBinding
-
bottomHost
public <T> T bottomHost(Class<T> hostClass)
- Specified by:
bottomHost
in interfaceHostBinding
-
hostContext
public final HostContext hostContext()
- Specified by:
hostContext
in interfaceHostBinding
-
setHostContext
public void setHostContext(HostContext hostContext)
- Specified by:
setHostContext
in interfaceHostBinding
-
warpSocketContext
public WarpSocketContext warpSocketContext()
- Specified by:
warpSocketContext
in interfaceWarpSocket
-
setWarpSocketContext
public void setWarpSocketContext(WarpSocketContext warpSocketContext)
- Specified by:
setWarpSocketContext
in interfaceWarpSocket
-
idleTimeout
public long idleTimeout()
- Specified by:
idleTimeout
in interfaceWarpSocket
-
cellAddress
public HostAddress cellAddress()
- Specified by:
cellAddress
in interfaceCellContext
- Specified by:
cellAddress
in interfaceHostBinding
-
edgeName
public String edgeName()
- Specified by:
edgeName
in interfaceCellContext
-
meshUri
public Uri meshUri()
- Specified by:
meshUri
in interfaceCellContext
- Specified by:
meshUri
in interfaceHostBinding
-
partKey
public Value partKey()
- Specified by:
partKey
in interfaceHostBinding
-
hostUri
public Uri hostUri()
- Specified by:
hostUri
in interfaceHostBinding
-
policy
public Policy policy()
- Specified by:
policy
in interfaceCellContext
-
schedule
public Schedule schedule()
- Specified by:
schedule
in interfaceCellContext
-
stage
public Stage stage()
- Specified by:
stage
in interfaceCellContext
-
store
public StoreBinding store()
- Specified by:
store
in interfaceCellContext
-
isConnected
public boolean isConnected()
- Specified by:
isConnected
in interfaceHostBinding
-
isRemote
public boolean isRemote()
- Specified by:
isRemote
in interfaceHostBinding
-
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interfaceHostBinding
-
securityProtocol
public String securityProtocol()
-
cipherSuite
public String cipherSuite()
-
localAddress
public InetSocketAddress localAddress()
-
localIdentity
public Identity localIdentity()
-
localPrincipal
public Principal localPrincipal()
-
localCertificates
public Collection<Certificate> localCertificates()
-
remoteAddress
public InetSocketAddress remoteAddress()
-
remoteIdentity
public Identity remoteIdentity()
-
remotePrincipal
public Principal remotePrincipal()
-
remoteCertificates
public Collection<Certificate> remoteCertificates()
-
isPrimary
public boolean isPrimary()
- Specified by:
isPrimary
in interfaceHostBinding
-
setPrimary
public void setPrimary(boolean isPrimary)
- Specified by:
setPrimary
in interfaceHostBinding
-
isReplica
public boolean isReplica()
- Specified by:
isReplica
in interfaceHostBinding
-
setReplica
public void setReplica(boolean isReplica)
- Specified by:
setReplica
in interfaceHostBinding
-
isMaster
public boolean isMaster()
- Specified by:
isMaster
in interfaceHostBinding
-
isSlave
public boolean isSlave()
- Specified by:
isSlave
in interfaceHostBinding
-
didBecomeMaster
public void didBecomeMaster()
- Specified by:
didBecomeMaster
in interfaceHostBinding
-
didBecomeSlave
public void didBecomeSlave()
- Specified by:
didBecomeSlave
in interfaceHostBinding
-
nodes
public UriMapper<NodeBinding> nodes()
- Specified by:
nodes
in interfaceHostBinding
-
getNode
public NodeBinding getNode(Uri nodeUri)
- Specified by:
getNode
in interfaceHostBinding
-
openNode
public NodeBinding openNode(Uri nodeUri)
- Specified by:
openNode
in interfaceHostBinding
-
openNode
public NodeBinding openNode(Uri nodeUri, NodeBinding node)
- Specified by:
openNode
in interfaceHostBinding
-
openUplink
public void openUplink(LinkBinding link)
- Specified by:
openUplink
in interfaceCellBinding
-
openWarpUplink
protected void openWarpUplink(WarpBinding link)
-
pushUp
public void pushUp(Push<?> push)
- Specified by:
pushUp
in interfaceCellBinding
-
willConnect
public void willConnect()
- Specified by:
willConnect
in interfaceWarpSocket
-
didConnect
public void didConnect()
- Specified by:
didConnect
in interfaceWarpSocket
-
willSecure
public void willSecure()
- Specified by:
willSecure
in interfaceWarpSocket
-
didSecure
public void didSecure()
- Specified by:
didSecure
in interfaceWarpSocket
-
willBecome
public void willBecome(IpSocket socket)
- Specified by:
willBecome
in interfaceWarpSocket
-
didBecome
public void didBecome(IpSocket socket)
- Specified by:
didBecome
in interfaceWarpSocket
-
didUpgrade
public void didUpgrade(HttpRequest<?> request, HttpResponse<?> response)
- Specified by:
didUpgrade
in interfaceWarpSocket
-
doRead
public void doRead()
- Specified by:
doRead
in interfaceWarpSocket
-
didRead
public void didRead(Envelope envelope)
- Specified by:
didRead
in interfaceWarpSocket
-
didRead
public void didRead(WsControlFrame<?,?> frame)
- Specified by:
didRead
in interfaceWarpSocket
-
didReadClose
protected void didReadClose(WsCloseFrame<?,?> frame)
-
onEventMessage
protected void onEventMessage(EventMessage message)
-
onCommandMessage
protected void onCommandMessage(CommandMessage message)
-
willPushMessage
protected void willPushMessage(Envelope envelope)
-
didPushMessage
protected void didPushMessage(Envelope envelope)
-
reconcileReceiveBacklog
protected void reconcileReceiveBacklog()
-
routeDownlink
protected void routeDownlink(LinkAddressed envelope)
-
didOpenDownlink
protected void didOpenDownlink(WarpBinding downlink)
-
didCloseDownlink
protected void didCloseDownlink(WarpBinding downlink)
-
routeUplink
protected void routeUplink(LaneAddressed envelope)
-
didOpenUplink
protected void didOpenUplink(WarpContext uplink)
-
didCloseUplink
protected void didCloseUplink(WarpContext uplink)
-
onLinkRequest
protected void onLinkRequest(LinkRequest request)
-
onLinkedResponse
protected void onLinkedResponse(LinkedResponse response)
-
onSyncRequest
protected void onSyncRequest(SyncRequest request)
-
onSyncedResponse
protected void onSyncedResponse(SyncedResponse response)
-
onUnlinkRequest
protected void onUnlinkRequest(UnlinkRequest request)
-
onUnlinkedResponse
protected void onUnlinkedResponse(UnlinkedResponse response)
-
onAuthRequest
protected void onAuthRequest(AuthRequest request)
-
onAuthedResponse
protected void onAuthedResponse(AuthedResponse response)
-
onDeauthRequest
protected void onDeauthRequest(DeauthRequest request)
-
onDeauthedResponse
protected void onDeauthedResponse(DeauthedResponse response)
-
onUnknownEnvelope
protected void onUnknownEnvelope(Envelope envelope)
-
forbid
protected void forbid()
-
doWrite
public void doWrite()
- Specified by:
doWrite
in interfaceWarpSocket
-
didWrite
public void didWrite(Envelope envelope)
- Specified by:
didWrite
in interfaceWarpSocket
-
didWrite
public void didWrite(WsControlFrame<?,?> frame)
- Specified by:
didWrite
in interfaceWarpSocket
-
didTimeout
public void didTimeout()
- Specified by:
didTimeout
in interfaceWarpSocket
-
didDisconnect
public void didDisconnect()
- Specified by:
didDisconnect
in interfaceWarpSocket
-
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
- Specified by:
didFail
in interfaceWarpSocket
- Overrides:
didFail
in classAbstractTierBinding
-
openMetaHost
public void openMetaHost(HostBinding host, NodeBinding metaHost)
- Specified by:
openMetaHost
in interfaceHostBinding
-
openMetaLanes
protected void openMetaLanes(HostBinding host, AgentNode metaHost)
-
openReflectLanes
protected void openReflectLanes(HostBinding host, AgentNode metaHost)
-
openMetaNode
public void openMetaNode(NodeBinding node, NodeBinding metaNode)
- Specified by:
openMetaNode
in interfaceHostBinding
-
openMetaLane
public void openMetaLane(LaneBinding lane, NodeBinding metaLane)
- Specified by:
openMetaLane
in interfaceHostBinding
-
openMetaUplink
public void openMetaUplink(LinkBinding uplink, NodeBinding metaUplink)
- Specified by:
openMetaUplink
in interfaceHostBinding
-
openMetaDownlink
public void openMetaDownlink(LinkBinding downlink, NodeBinding metaDownlink)
- Specified by:
openMetaDownlink
in interfaceCellContext
-
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
-
pushDown
public void pushDown(Push<?> push)
- Specified by:
pushDown
in interfaceCellContext
-
reportDown
public void reportDown(Metric metric)
- Specified by:
reportDown
in interfaceCellContext
-
reconnect
protected void reconnect()
-
closeDownlinks
protected void closeDownlinks()
-
closeUplinks
protected void closeUplinks()
-
connectUplinks
protected void connectUplinks()
-
disconnectUplinks
protected void disconnectUplinks()
-
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.
-
fail
public void fail(Object message)
Description copied from interface:Log
Logs an fail-level message.
-
didUpdateMetrics
protected void didUpdateMetrics()
-
flushMetrics
protected void flushMetrics()
-
reportMetrics
protected void reportMetrics(long dt)
-
collectProfile
protected HostProfile collectProfile(long dt)
-
-