public class DialogPriorityQueue extends Object implements IUIRequestPool
IUIRequestPool
will manage active dialogs in a
PriorityQueue
while keeping suspended dialogs in a Map
.Constructor and Description |
---|
DialogPriorityQueue() |
Modifier and Type | Method and Description |
---|---|
void |
add(UIRequest UIReq)
Add a new
UIRequest . |
void |
close(String UIReqID)
Remove the
UIRequest corresponding with UIReqID from any set it
belongs to. |
UIRequest |
get(String UIReqID)
get the
UIRequest corresponding to the UIReqID. |
UIRequest |
getCurrent()
Get the currently selected
UIRequest . |
UIRequest |
getNextUIRequest()
If
IUIRequestPool.hasToChange() then get the next
UIRequest , updating the current. |
boolean |
hasToChange()
Whether the current
UIRequest has to change. |
Collection<UIRequest> |
listAllActive()
Get the Active
UIRequest set. |
Collection<UIRequest> |
listAllSuspended()
Get the Suspended
UIRequest set. |
void |
removeAll()
Remove all entries in all sets.
|
void |
suspend(String UIReqID)
Move a
UIRequest from the active set to the suspendend one. |
void |
unsuspend(String UIReqID)
Move a
UIRequest from the suspendend set to the active one. |
public void add(UIRequest UIReq)
UIRequest
. Directly to the active set.add
in interface IUIRequestPool
public void close(String UIReqID)
UIRequest
corresponding with UIReqID from any set it
belongs to. if the UIRequest
is the current request, then after
this call IUIRequestPool.getCurrent()
== null.close
in interface IUIRequestPool
public UIRequest getCurrent()
UIRequest
.getCurrent
in interface IUIRequestPool
UIRequest
null if sets are empty.public UIRequest getNextUIRequest()
IUIRequestPool.hasToChange()
then get the next
UIRequest
, updating the current. After this call
IUIRequestPool.getNextUIRequest()
==
IUIRequestPool.getCurrent()
getNextUIRequest
in interface IUIRequestPool
UIRequest
to be current.public boolean hasToChange()
UIRequest
has to change.hasToChange
in interface IUIRequestPool
public Collection<UIRequest> listAllActive()
UIRequest
set.listAllActive
in interface IUIRequestPool
UIRequest
spublic Collection<UIRequest> listAllSuspended()
UIRequest
set.listAllSuspended
in interface IUIRequestPool
UIRequest
public void removeAll()
removeAll
in interface IUIRequestPool
public void suspend(String UIReqID)
UIRequest
from the active set to the suspendend one. If
current is suspended then IUIRequestPool.getCurrent()
== nullsuspend
in interface IUIRequestPool
public void unsuspend(String UIReqID)
UIRequest
from the suspendend set to the active one.unsuspend
in interface IUIRequestPool
Copyright © 2018 universAAL Consortium. All rights reserved.