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 voidanticipateAllServices(MockElement element)anticipateAllServicesvoidanticipatePoll(MockService svc)anticipatePollvoidpoll(MockService service)pollvoidreset()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- aMockElementobject.
-
anticipatePoll
public void anticipatePoll(MockService svc)
anticipatePoll
- Parameters:
svc- aMockServiceobject.
-
poll
public void poll(MockService service)
poll
- Parameters:
service- aMockServiceobject.
-
reset
public void reset()
reset
-
unanticipatedPolls
public Collection<MockService> unanticipatedPolls()
unanticipatedPolls
- Returns:
- a
Collectionobject.
-
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
Collectionobject.
-
-