org.opennms.netmgt.mock
Class PollAnticipator

java.lang.Object
  extended by org.opennms.netmgt.mock.PollAnticipator

public class PollAnticipator
extends Object

PollAnticipator class.

Version:
$Id: $
Author:
brozow

Constructor Summary
PollAnticipator()
           
 
Method Summary
 void anticipateAllServices(MockElement element)
          anticipateAllServices
 void anticipatePoll(MockService svc)
          anticipatePoll
 void poll(MockService service)
          poll
 void reset()
          reset
 Collection unanticipatedPolls()
          unanticipatedPolls
 Collection<MockService> waitForAnticipated(long millis)
          Waits for millis milliseconds for the anticipated polls to come.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollAnticipator

public PollAnticipator()
Method Detail

anticipateAllServices

public void anticipateAllServices(MockElement element)

anticipateAllServices

Parameters:
element - a MockElement object.

anticipatePoll

public void anticipatePoll(MockService svc)

anticipatePoll

Parameters:
svc - a MockService object.

poll

public void poll(MockService service)

poll

Parameters:
service - a MockService object.

reset

public void reset()

reset


unanticipatedPolls

public Collection 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 readonly list of the services that were anticipated but not received.

Parameters:
millis - a long.
Returns:
a Collection object.


Copyright © 2011. All Rights Reserved.