public class NavigationElement
extends java.lang.Object
implements java.io.Serializable
Also, the navigation element can contain the OperationStatistics
from the sender node.
However, the statistics are added only if requested.
Modifier and Type | Field and Description |
---|---|
protected OperationStatistics |
statistics
OperationStatistics gathered during this particular hop
|
Modifier | Constructor and Description |
---|---|
protected |
NavigationElement()
Create new instance of NavigationElement
|
protected |
NavigationElement(NavigationElement sourceElement)
Create new instance of NavigationElement and copy all attributes from sourceElement
|
Modifier and Type | Method and Description |
---|---|
protected void |
addNotWaitingDestination(NetworkNode destination)
Adds the node to the list of forwarded nodes at this particular hop.
|
protected void |
addWaitingDestination(NetworkNode destination)
Adds the node to the list of waiting nodes at this particular hop.
|
NetworkNode |
getDestination()
Returns the destination of the message for this particular hop.
|
NetworkNode |
getSender()
Returns the sender of the message for this particular hop.
|
OperationStatistics |
getStatistics()
Returns the OperationStatistics gathered during this particular hop.
|
boolean |
isReply()
Returns true if the node for this navigation element is replying.
|
boolean |
isSkipping()
Returns true if the node for this navigation element is skipping reply waiting.
|
boolean |
isWaiting()
Returns true if the node for this navigation element is waiting for reply.
|
protected void |
setReply(NetworkNode destination)
Sets this particular hop as a reply to the destination.
|
protected void |
setSender(NetworkNode sender)
Sets the sender of the message for this particular hop.
|
protected void |
setStatistics(OperationStatistics statistics)
Sets the reference to the OperationStatistics gathered during this particular hop.
|
protected void |
skipWaiting()
Flag that the sender of this particular hop will not reply.
|
java.lang.String |
toString()
Returns the string representation of this navigation element.
|
protected OperationStatistics statistics
protected NavigationElement()
protected NavigationElement(NavigationElement sourceElement)
sourceElement
- the source NavigationElement to copy attributes frompublic final OperationStatistics getStatistics()
public final NetworkNode getSender()
public final NetworkNode getDestination()
public final boolean isWaiting()
public final boolean isReply()
public final boolean isSkipping()
protected void setStatistics(OperationStatistics statistics)
statistics
- the reference to the OperationStatisticsprotected void setSender(NetworkNode sender) throws java.lang.IllegalArgumentException
sender
- the sender of the messagejava.lang.IllegalArgumentException
- if the message was already sent from another nodeprotected void setReply(NetworkNode destination)
destination
- the destination this reply is going toprotected void addWaitingDestination(NetworkNode destination)
destination
- the destination this message is going toprotected void addNotWaitingDestination(NetworkNode destination)
destination
- the destination this message is going toprotected void skipWaiting()
public java.lang.String toString()
toString
in class java.lang.Object