Package org.opennms.netmgt.mock
Class PollAnticipator
- java.lang.Object
-
- org.opennms.netmgt.mock.PollAnticipator
-
public class PollAnticipator extends Object
PollAnticipator class.
- Version:
- $Id: $
- Author:
- brozow
-
-
Constructor Summary
Constructors Constructor Description PollAnticipator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
anticipateAllServices(MockElement element)
anticipateAllServicesvoid
anticipatePoll(MockService svc)
anticipatePollvoid
poll(MockService service)
pollvoid
reset()
resetCollection<MockService>
unanticipatedPolls()
unanticipatedPollsCollection<MockService>
waitForAnticipated(long millis)
Waits for millis milliseconds for the anticipated polls to come.
-
-
-
Method Detail
-
anticipateAllServices
public void anticipateAllServices(MockElement element)
anticipateAllServices
- Parameters:
element
- aMockElement
object.
-
anticipatePoll
public void anticipatePoll(MockService svc)
anticipatePoll
- Parameters:
svc
- aMockService
object.
-
poll
public void poll(MockService service)
poll
- Parameters:
service
- aMockService
object.
-
reset
public void reset()
reset
-
unanticipatedPolls
public Collection<MockService> unanticipatedPolls()
unanticipatedPolls
- Returns:
- a
Collection
object.
-
waitForAnticipated
public Collection<MockService> waitForAnticipated(long millis)
Waits for millis milliseconds for the anticipated polls to come. If they all come in before the timeout return an empty list. Otherwise return a read-only list of the services that were anticipated but not received.- Parameters:
millis
- a long.- Returns:
- a
Collection
object.
-
-