Package org.opennms.netmgt.mock
Class MockContainer<P extends MockContainer<?,?>,C extends MockElement>
- java.lang.Object
-
- org.opennms.netmgt.mock.MockElement
-
- org.opennms.netmgt.mock.MockContainer<P,C>
-
- Direct Known Subclasses:
MockInterface
,MockNetwork
,MockNode
public abstract class MockContainer<P extends MockContainer<?,?>,C extends MockElement> extends MockElement
P
: Parent type of this containerC
: Child type of this container
- 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 Modifier Constructor Description protected
MockContainer(P parent)
Constructor for MockContainer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnticipator(PollAnticipator trigger)
addAnticipatorprotected C
addMember(C element)
addMemberprotected MockElement
getMember(java.lang.Object key)
getMemberprotected java.util.List<C>
getMembers()
getMembersint
getPollCount()
getPollCountPollStatus
getPollStatus()
getPollStatusvoid
removeAnticipator(PollAnticipator trigger)
removeAnticipatorprotected void
removeMember(MockElement element)
removeMembervoid
resetPollCount()
resetPollCountvoid
visit(MockVisitor v)
visitprotected void
visitMembers(MockVisitor v)
visitMembers-
Methods inherited from class org.opennms.netmgt.mock.MockElement
bringDown, bringUnresponsive, bringUp, createDeleteEvent, createDownEvent, createDownEvent, createNewEvent, createUpEvent, createUpEvent, getNetwork, getParent, moveTo, setServicePollStatus
-
-
-
-
Constructor Detail
-
MockContainer
protected MockContainer(P parent)
Constructor for MockContainer.
- Parameters:
parent
- a P object.
-
-
Method Detail
-
addAnticipator
public void addAnticipator(PollAnticipator trigger)
addAnticipator
- Specified by:
addAnticipator
in classMockElement
- Parameters:
trigger
- aPollAnticipator
object.
-
addMember
protected C addMember(C element)
addMember
- Parameters:
element
- a C object.- Returns:
- a C object.
-
getMember
protected MockElement getMember(java.lang.Object key)
getMember
- Parameters:
key
- aObject
object.- Returns:
- a
MockElement
object.
-
getMembers
protected java.util.List<C> getMembers()
getMembers
- Returns:
- a
List
object.
-
getPollCount
public int getPollCount()
getPollCount
- Specified by:
getPollCount
in classMockElement
- Returns:
- a int.
-
getPollStatus
public PollStatus getPollStatus()
getPollStatus
- Specified by:
getPollStatus
in classMockElement
- Returns:
- a
PollStatus
object.
-
removeAnticipator
public void removeAnticipator(PollAnticipator trigger)
removeAnticipator
- Specified by:
removeAnticipator
in classMockElement
- Parameters:
trigger
- aPollAnticipator
object.
-
removeMember
protected void removeMember(MockElement element)
removeMember
- Parameters:
element
- aMockElement
object.
-
resetPollCount
public void resetPollCount()
resetPollCount
- Specified by:
resetPollCount
in classMockElement
-
visit
public void visit(MockVisitor v)
visit
- Overrides:
visit
in classMockElement
- Parameters:
v
- aMockVisitor
object.
-
visitMembers
protected void visitMembers(MockVisitor v)
visitMembers
- Parameters:
v
- aMockVisitor
object.
-
-