public class MockNode extends MockContainer<MockNetwork,MockElement>
MockNode class.
| Constructor and Description |
|---|
MockNode(MockNetwork network,
int nodeid,
String label)
Constructor for MockNode.
|
| Modifier and Type | Method and Description |
|---|---|
MockInterface |
addInterface(String ipAddr)
addInterface
|
Event |
createDeleteEvent()
createDeleteEvent
|
Event |
createDownEvent()
createDownEvent
|
Event |
createDownEventWithReason(String reason)
createDownEventWithReason
|
Event |
createNewEvent()
createNewEvent
|
Event |
createNodeLabelChangedEvent(String newLabel)
createNodeLabelChangedEvent
|
Event |
createUpEvent()
createUpEvent
|
MockInterface |
getInterface(String ipAddr)
getInterface
|
String |
getLabel()
getLabel
|
String |
getLocation()
getLocation
|
MockNetwork |
getNetwork()
getNetwork
|
int |
getNextIfIndex()
getNextIfIndex
|
int |
getNodeId()
getNodeId
|
void |
removeInterface(MockInterface iface)
removeInterface
|
void |
setLabel(String label)
setLabel
|
void |
setLocation(String location)
setLocation
|
String |
toString()
toString
|
void |
visit(MockVisitor v)
visit
|
addAnticipator, addMember, getMember, getMembers, getPollCount, getPollStatus, removeAnticipator, removeMember, resetPollCount, visitMembersbringDown, bringUnresponsive, bringUp, createDownEvent, createUpEvent, getParent, moveTo, setServicePollStatuspublic MockNode(MockNetwork network, int nodeid, String label)
Constructor for MockNode.
network - a MockNetwork object.nodeid - a int.label - a String object.public MockInterface addInterface(String ipAddr)
addInterface
ipAddr - a String object.MockInterface object.public MockInterface getInterface(String ipAddr)
getInterface
ipAddr - a String object.MockInterface object.public void setLocation(String location)
setLocation
label - a String object.public MockNetwork getNetwork()
getNetwork
getNetwork in class MockElementMockNetwork object.public int getNodeId()
getNodeId
public int getNextIfIndex()
getNextIfIndex
public void removeInterface(MockInterface iface)
removeInterface
iface - a MockInterface object.public String toString()
toString
public void visit(MockVisitor v)
visit
visit in class MockContainer<MockNetwork,MockElement>v - a MockVisitor object.public Event createUpEvent()
createUpEvent
createUpEvent in class MockElementEvent object.public Event createDownEvent()
createDownEvent
createDownEvent in class MockElementEvent object.public Event createDownEventWithReason(String reason)
createDownEventWithReason
public Event createNewEvent()
createNewEvent
createNewEvent in class MockElementEvent object.public Event createDeleteEvent()
createDeleteEvent
createDeleteEvent in class MockElementEvent object.Copyright © 2020. All rights reserved.