public class OverlayLinkImpl extends java.lang.Object implements OverlayLink
OverlayLink.LinkState| Constructor and Description |
|---|
OverlayLinkImpl(OverlayManagerImpl inManager,
OverlayVersionImpl inOverlay,
MessageLink inLink,
boolean inPrimary) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection used by this message handler.
|
EventDispatcher |
getDispatcher()
Deprecated.
|
EventHandler<? super MessageEvent> |
getEventHandler()
Deprecated.
|
EventProcessor<MessageEvent> |
getEventProcessor()
Deprecated.
|
OverlayPath |
getLinkedLoc() |
NodeDetails |
getLinkedTo() |
long |
getOverlayVer() |
LinkStatistics |
getRecvStats() |
long |
getRedirectVer() |
LinkStatistics |
getSendStats() |
boolean |
isAlive() |
boolean |
isClient() |
boolean |
isDataOut() |
boolean |
isPrimary() |
void |
sendMessage(MessageEvent inMessage)
Send a message to the connected destination.
|
<M extends MessageEvent> |
sendMessage(MessageEvent inMessage,
java.lang.Class<M> respType)
Send a message to the connected destination, and get a reply task.
|
void |
sendMessage(TopicEvent inMessage,
java.util.List<OverlayPath> inDests)
Send a message to the connected destination.
|
void |
setEventHandler(EventHandler<? super MessageEvent> inHandler)
Set the event handler that incoming events are passed to.
|
void |
setEventProcessor(EventProcessor<MessageEvent> inProcess)
Set the event handler that incoming events are passed to.
|
boolean |
setPrimary(boolean inPrimary)
Set the primary status of this link.
|
java.lang.String |
toString() |
public OverlayLinkImpl(OverlayManagerImpl inManager, OverlayVersionImpl inOverlay, MessageLink inLink, boolean inPrimary)
public boolean isAlive()
isAlive in interface MessageLinkpublic boolean isClient()
isClient in interface MessageLinkpublic boolean isPrimary()
isPrimary in interface OverlayLinkpublic boolean isDataOut()
isDataOut in interface OverlayLinkpublic NodeDetails getLinkedTo()
getLinkedTo in interface MessageLinkpublic LinkStatistics getRecvStats()
getRecvStats in interface MessageLinkpublic LinkStatistics getSendStats()
getSendStats in interface MessageLinkpublic long getOverlayVer()
getOverlayVer in interface OverlayLinkpublic long getRedirectVer()
public OverlayPath getLinkedLoc()
getLinkedLoc in interface OverlayLink@Deprecated public EventDispatcher getDispatcher()
getDispatcher in interface MessageLink@Deprecated public EventHandler<? super MessageEvent> getEventHandler()
getEventHandler in interface MessageLink@Deprecated public EventProcessor<MessageEvent> getEventProcessor()
getEventProcessor in interface MessageLinkpublic void setEventHandler(EventHandler<? super MessageEvent> inHandler) throws LinkException
MessageLinksetEventHandler in interface MessageLinkLinkExceptionpublic void setEventProcessor(EventProcessor<MessageEvent> inProcess) throws LinkException
MessageLinksetEventProcessor in interface MessageLinkLinkExceptionpublic void sendMessage(MessageEvent inMessage) throws LinkException
MessageLinksendMessage in interface MessageLinkinMessage - - The message to send.LinkExceptionpublic <M extends MessageEvent> Task<M> sendMessage(MessageEvent inMessage, java.lang.Class<M> respType) throws LinkException
MessageLinksendMessage in interface MessageLinkinMessage - - The message to send.respType - - The class of the expected response message.LinkExceptionpublic void sendMessage(TopicEvent inMessage, java.util.List<OverlayPath> inDests) throws LinkException
OverlayLinksendMessage in interface OverlayLinkinMessage - - The message to send.inDests - - A list of overlay locations to send the message to.LinkExceptionpublic boolean setPrimary(boolean inPrimary)
throws OverlayException
OverlayLinksetPrimary in interface OverlayLinkinPrimary - - True if this link should be primary.OverlayExceptionpublic void close()
MessageLinkclose in interface MessageLinkclose in interface java.lang.AutoCloseablepublic java.lang.String toString()
toString in class java.lang.Object