|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.fenyo.gnetwatch.activities.Background
public class Background
This class creates queues at startup and manages them through a background thread: long active actions in a queue are interrupted after a timeout.
| Field Summary | |
|---|---|
private Config |
config
|
private java.lang.Thread |
interrupt_thread
|
private static Log |
log
|
private java.util.Map<java.lang.String,Queue> |
queues
|
| Constructor Summary | |
|---|---|
Background(Config config)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addActionQueue(Action action)
Adds an action to a running queue. |
void |
createBackgroundThread()
Starts the background thread. |
void |
end()
Terminates background threads. |
java.util.Map<java.lang.String,Queue> |
getQueues()
Returns the list of background queues. |
void |
informQueue(java.lang.String name,
java.lang.Object obj)
|
void |
removeActionQueue(Action action)
Removes an action from a running queue. |
void |
run()
Interrupts long actions. |
| 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 Config config
private java.lang.Thread interrupt_thread
private final java.util.Map<java.lang.String,Queue> queues
| Constructor Detail |
|---|
public Background(Config config)
config - configuration.| Method Detail |
|---|
public void informQueue(java.lang.String name,
java.lang.Object obj)
public void end()
throws java.lang.InterruptedException
none. -
java.lang.InterruptedException - exception.public java.util.Map<java.lang.String,Queue> getQueues()
none. -
public void addActionQueue(Action action)
throws GeneralException
action - action to add.
GeneralException - queue does not exist.
public void removeActionQueue(Action action)
throws GeneralException
action - action to remove.
GeneralException - queue does not exist.public void createBackgroundThread()
none. - public void run()
run in interface java.lang.Runnablenone. -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||