Package org.opennms.netmgt.mock
Class MockInterface
- java.lang.Object
-
- org.opennms.netmgt.mock.MockElement
-
- org.opennms.netmgt.mock.MockContainer<MockNode,MockService>
-
- org.opennms.netmgt.mock.MockInterface
-
public class MockInterface extends MockContainer<MockNode,MockService>
MockInterface class.
- Version:
- $Id: $
- Author:
- brozow TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
-
-
Constructor Summary
Constructors Constructor Description MockInterface(MockNode node, java.lang.String ipAddr)
Constructor for MockInterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockService
addService(java.lang.String svcName, int serviceId)
addServiceEvent
createDeleteEvent()
createDeleteEventEvent
createDownEvent()
createDownEventEvent
createNewEvent()
createNewEventEvent
createUpEvent()
createUpEventjava.net.InetAddress
getAddress()
getAddressint
getId()
getIpAddrjava.lang.String
getIfAlias()
getIfAliasint
getIfIndex()
getIfIndexjava.lang.String
getIpAddr()
getIpAddrMockNetwork
getNetwork()
getNetworkMockNode
getNode()
getNodeint
getNodeId()
getNodeIdjava.lang.String
getNodeLabel()
getNodeLabelPollStatus
getPollStatus()
getPollStatusMockService
getService(java.lang.String svcName)
getServicejava.util.List<MockService>
getServices()
getServicesvoid
removeService(MockService svc)
removeServicevoid
setIfAlias(java.lang.String ifAlias)
setIfAliasvoid
setIfIndex(int ifIndex)
setIfIndexjava.lang.String
toString()
toStringvoid
visit(MockVisitor v)
visit-
Methods inherited from class org.opennms.netmgt.mock.MockContainer
addAnticipator, addMember, getMember, getMembers, getPollCount, removeAnticipator, removeMember, resetPollCount, visitMembers
-
Methods inherited from class org.opennms.netmgt.mock.MockElement
bringDown, bringUnresponsive, bringUp, createDownEvent, createUpEvent, getParent, moveTo, setServicePollStatus
-
-
-
-
Method Detail
-
addService
public MockService addService(java.lang.String svcName, int serviceId)
addService
- Parameters:
svcName
- aString
object.serviceId
- a int.- Returns:
- a
MockService
object.
-
getId
public int getId()
getIpAddr
- Returns:
- a
String
object.
-
getIpAddr
public java.lang.String getIpAddr()
getIpAddr
- Returns:
- a
String
object.
-
getNetwork
public MockNetwork getNetwork()
getNetwork
- Overrides:
getNetwork
in classMockElement
- Returns:
- a
MockNetwork
object.
-
getNodeId
public int getNodeId()
getNodeId
- Returns:
- a int.
-
getNodeLabel
public java.lang.String getNodeLabel()
getNodeLabel
- Returns:
- a
String
object.
-
getPollStatus
public PollStatus getPollStatus()
getPollStatus
- Overrides:
getPollStatus
in classMockContainer<MockNode,MockService>
- Returns:
- a
PollStatus
object.
-
getService
public MockService getService(java.lang.String svcName)
getService
- Parameters:
svcName
- aString
object.- Returns:
- a
MockService
object.
-
getServices
public java.util.List<MockService> getServices()
getServices
- Returns:
- a
List
object.
-
removeService
public void removeService(MockService svc)
removeService
- Parameters:
svc
- aMockService
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
visit
public void visit(MockVisitor v)
visit
- Overrides:
visit
in classMockContainer<MockNode,MockService>
- Parameters:
v
- aMockVisitor
object.
-
createDownEvent
public Event createDownEvent()
createDownEvent
- Specified by:
createDownEvent
in classMockElement
- Returns:
- a
Event
object.
-
createUpEvent
public Event createUpEvent()
createUpEvent
- Specified by:
createUpEvent
in classMockElement
- Returns:
- a
Event
object.
-
createNewEvent
public Event createNewEvent()
createNewEvent
- Specified by:
createNewEvent
in classMockElement
- Returns:
- a
Event
object.
-
createDeleteEvent
public Event createDeleteEvent()
createDeleteEvent
- Specified by:
createDeleteEvent
in classMockElement
- Returns:
- a
Event
object.
-
setIfAlias
public void setIfAlias(java.lang.String ifAlias)
setIfAlias
- Parameters:
ifAlias
- aString
object.
-
getIfAlias
public java.lang.String getIfAlias()
getIfAlias
- Returns:
- Returns the ifAlias.
-
getAddress
public java.net.InetAddress getAddress()
getAddress
- Returns:
- a
InetAddress
object.
-
getIfIndex
public int getIfIndex()
getIfIndex
- Returns:
- a int.
-
setIfIndex
public void setIfIndex(int ifIndex)
setIfIndex
- Parameters:
ifIndex
-
-
-