|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.conditionModel.ObserverManager
public class ObserverManager
Class for create and handle condition observers.
| Constructor Summary | |
|---|---|
ObserverManager()
|
|
| Method Summary | |
|---|---|
ConditionObserver |
createAndEnableConditionObserver(ICondition condition,
NotificationType notificationType,
IAnyEdgeListener anyEdgeListener)
Create a new condition observer and start observing any edge of a condition, i.e. the observer is immediately enabled and events are sent for each change of the condition between true and false according to the notification type. |
ConditionObserver |
createAndEnableConditionObserver(ICondition condition,
NotificationType notificationType,
IFallingEdgeListener fallingEdgeListener)
Create a new condition observer and start observing the falling edge of a condition, i.e. the observer is immediately enabled and events are sent for each change of the condition from true to false according to the notification type. |
ConditionObserver |
createAndEnableConditionObserver(ICondition condition,
NotificationType notificationType,
IRisingEdgeListener risingEdgeListener)
Create a new condition observer and start observing rising edge of a condition, i.e. the observer is immediately enabled and events are sent for each change of the condition from false to true according to the notification type. |
ConditionObserver |
createConditionObserver(ICondition condition,
NotificationType notificationType,
IAnyEdgeListener anyEdgeListener)
Creates a new condition observer to observe any edge of a condition. |
ConditionObserver |
createConditionObserver(ICondition condition,
NotificationType notificationType,
IFallingEdgeListener fallingEdgeListener)
Creates a new condition observer to observe the falling edge of a condition. |
ConditionObserver |
createConditionObserver(ICondition condition,
NotificationType notificationType,
IRisingEdgeListener risingEdgeListener)
Creates a new condition observer to observe the rising edge of a condition. |
boolean |
evaluate(ICondition condition)
Evaluates a condition. |
List<ConditionObserver> |
getRegisteredConditionObservers(Controller controller)
Get a list of all registered condition observers. |
void |
removeConditionObserver(ConditionObserver conditionObserver)
Remove the selected condition observer. |
void |
waitFor(ICondition condition)
Blocks the calling thread until the condition is true. |
boolean |
waitFor(ICondition condition,
long timeout,
TimeUnit timeUnit)
Blocks the calling thread until the condition is true or the timeout has elapsed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObserverManager()
| Method Detail |
|---|
public ConditionObserver createConditionObserver(ICondition condition,
NotificationType notificationType,
IRisingEdgeListener risingEdgeListener)
Note: To start observing, the ConditionObserver has to be enabled.
condition - The condition to observe.notificationType - Notification options of the ConditionObserverrisingEdgeListener - The listener for observing the rising edge of the condition.
IllegalArgumentException - if an invalid argument is given
public ConditionObserver createConditionObserver(ICondition condition,
NotificationType notificationType,
IFallingEdgeListener fallingEdgeListener)
Note: To start observing, the ConditionObserver has to be enabled.
condition - The condition to observe.notificationType - Notification options of the ConditionObserverfallingEdgeListener - The listener for observing the falling edge of the condition.
IllegalArgumentException - if an invalid argument is given
public ConditionObserver createConditionObserver(ICondition condition,
NotificationType notificationType,
IAnyEdgeListener anyEdgeListener)
Note: To start observing, the ConditionObserver has to be enabled.
condition - The condition to observe.notificationType - Notification options of the ConditionObserveranyEdgeListener - The listener for observing any edge of the condition.
IllegalArgumentException - if an invalid argument is given
public ConditionObserver createAndEnableConditionObserver(ICondition condition,
NotificationType notificationType,
IRisingEdgeListener risingEdgeListener)
condition - The condition to observe.notificationType - Notification options of the ConditionObserverrisingEdgeListener - The listener for observing rising edge of the condition.
IllegalArgumentException - if an invalid argument is givenConditionObserver.enable(),
ConditionObserver.disable()
public ConditionObserver createAndEnableConditionObserver(ICondition condition,
NotificationType notificationType,
IFallingEdgeListener fallingEdgeListener)
condition - The condition to observe.notificationType - Notification options of the ConditionObserverfallingEdgeListener - The listener for observing the falling edge of the condition.
IllegalArgumentException - if an invalid argument is givenConditionObserver.enable(),
ConditionObserver.disable()
public ConditionObserver createAndEnableConditionObserver(ICondition condition,
NotificationType notificationType,
IAnyEdgeListener anyEdgeListener)
condition - The condition to observe.notificationType - Notification options of the ConditionObserveranyEdgeListener - The listener for observing any edge of the condition.
IllegalArgumentException - if an invalid argument is givenConditionObserver.enable(),
ConditionObserver.disable()public void removeConditionObserver(ConditionObserver conditionObserver)
conditionObserver - The condition observer to remove.
IllegalArgumentException - if an invalid argument is givenpublic List<ConditionObserver> getRegisteredConditionObservers(Controller controller)
controller - The controller
IllegalArgumentException - if an invalid argument is given
public boolean waitFor(ICondition condition,
long timeout,
TimeUnit timeUnit)
condition - The condition to wait for.timeout - The maximum time the calling thread is blocked. A negative
value means that no timeout will be used. In this case, the
method waitFor(ICondition) may also be used.timeUnit - The unit of the timeout.
IllegalArgumentException - if an invalid argument is givenpublic void waitFor(ICondition condition)
condition - The condition to wait for.public boolean evaluate(ICondition condition)
condition - The condition to evaluate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||