public class DefaultNodeInfo extends AbstractModelInfo<NodeInfo.Field> implements NodeInfo
NodeInfo
. Any data which is not explicitly
specified (even if null) will be considered unspecified.NodeInfo.Field
Constructor and Description |
---|
DefaultNodeInfo()
Constructs a default node info object with all fields unspecified.
|
DefaultNodeInfo(Node node)
Constructs a default node info object from the given node.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
NodeLocation |
location()
Returns the most recent node location.
|
DefaultNodeInfo |
location(NodeLocation location)
Modifies the current info by specifying the node location.
|
MacAddress |
mac()
Returns the node's MAC address.
|
DefaultNodeInfo |
mac(MacAddress mac)
Modifies the current info by specifying the node MAC address.
|
Interface |
netInterface()
Returns the network interface through which the node attaches to the
network.
|
DefaultNodeInfo |
netInterface(Interface intf)
Modifies the current info by specifying the node interface.
|
long |
timeout()
Returns the time offset (in seconds) at which the node will be
removed.
|
DefaultNodeInfo |
timeout(long timeout)
Modifies the current info by specifying the node timeout.
|
String |
toString() |
NetworkElement.Type |
type()
Returns the node type.
|
dirtyFields, markDirty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
dirtyFields
public DefaultNodeInfo()
public DefaultNodeInfo(Node node)
node
- the given nodepublic DefaultNodeInfo netInterface(Interface intf)
intf
- node interfacepublic DefaultNodeInfo mac(MacAddress mac)
mac
- node macpublic DefaultNodeInfo timeout(long timeout)
timeout
- node timeout in secondspublic DefaultNodeInfo location(NodeLocation location)
location
- node locationpublic NetworkElement.Type type()
NodeInfo
public Interface netInterface()
NodeInfo
Device
to which the node is attached.netInterface
in interface NodeInfo
public MacAddress mac()
NodeInfo
public NodeLocation location()
NodeInfo
public long timeout()
NodeInfo
Long.MAX_VALUE
indicates an infinite offset,
which means the node will never be automatically removed. A value of
0 indicates that the value has not been specified.Copyright © 2015. All Rights Reserved.