|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.fenyo.gnetwatch.GUI.VisualElement
net.fenyo.gnetwatch.activities.Queue
public abstract class Queue
Queue is the base class for any queue. It implements the main queueing process.
| Field Summary | |
|---|---|
private java.util.List<Action> |
actions
|
private java.util.Vector<Action> |
actions_copy
|
private Config |
config
|
private Action |
current_action
|
private static Log |
log
|
private long |
max_time
|
private java.lang.String |
name
|
private java.lang.Thread |
thread
|
| Constructor Summary | |
|---|---|
protected |
Queue(java.lang.String name,
Config config)
Constructor. |
| Method Summary | |
|---|---|
void |
addAction(Action action)
Adds a new action to this queue. |
void |
end()
Stops this queue thread. |
protected abstract int |
getActionDelay()
Returns the time to wait between two actions. |
protected Config |
getConfig()
|
protected abstract int |
getCycleDelay()
Returns the time to wait after each cycle. |
protected abstract int |
getEmptyCycleDelay()
Returns the time to wait between empty cycles. |
void |
inform(java.lang.Object obj)
|
protected void |
informCycle()
Called after each cycle. |
protected void |
initialize(GUI gui)
Sets the current GUI instance. |
void |
interrupt(Action.InterruptCause cause)
Stops this queue thread. |
boolean |
isExhausted()
Checks that the timeout occured. |
void |
removeAction(Action action)
Removes an action from this queue. |
void |
removeVisualElements(VisualElement visual_parent)
Detaches this queue from the selected parent. |
void |
run()
Loops among the actions currently in this queue. |
int |
size()
Returns the size of the queue. |
| Methods inherited from class net.fenyo.gnetwatch.GUI.VisualElement |
|---|
addParent, canManageThisChild, contains, disposed, duplicateTreeItemOnce, expandTreeItems, getAllParents, getChildren, getDescription, getGUI, getId, getItem, getParents, getProgress, getSubElements, getSubElements, getTreeItems, getType, informSelected, isDisposed, isThisOurTreeItem, selected, setChildren, setDescription, setGUI, setId, setImage, setImageExec, setImageFolder, setImageHost, setImageHost6, setImageHost6SNMP, setImageHostSNMP, setImageInterface, setImageMultiRow, setImageNetwork, setImageOscillo, setImageQueue, setImageWatch, setItem, setParent, setParent, setProgress, setType, unselected |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static Log log
private final java.lang.String name
private final Config config
private final java.lang.Thread thread
private long max_time
private final java.util.List<Action> actions
private java.util.Vector<Action> actions_copy
private Action current_action
| Constructor Detail |
|---|
protected Queue(java.lang.String name,
Config config)
name - queue name.config - configuration.| Method Detail |
|---|
protected final void initialize(GUI gui)
initialize in class VisualElementGUI - current GUI instance.public int size()
none. -
public void addAction(Action action)
action - new action to add.public void removeAction(Action action)
action - action to remove.protected void informCycle()
none. - public void inform(java.lang.Object obj)
protected abstract int getCycleDelay()
none. -
protected abstract int getEmptyCycleDelay()
none. -
protected abstract int getActionDelay()
none. -
public void run()
run in interface java.lang.Runnablenone. - public boolean isExhausted()
none. -
public void end()
throws java.lang.InterruptedException
none. -
java.lang.InterruptedException - exception.
public void interrupt(Action.InterruptCause cause)
throws java.io.IOException
cause - cause.
java.lang.InterruptedException - exception.
java.io.IOExceptionpublic void removeVisualElements(VisualElement visual_parent)
removeVisualElements in class VisualElementvisual_parent - selected parent.protected Config getConfig()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||