|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drupal.project.async_command.AsyncCommand
public abstract class AsyncCommand
Individual command to be executed. Each command is also registered with a DrupalApp. A command doesn't necessarily know a DrupalConnection. If needed, it can get from DrupalApp. The Record inner class needs to know a DrupalConnection in order to do database operations.
Nested Class Summary | |
---|---|
static class |
AsyncCommand.Status
|
Field Summary | |
---|---|
protected GenericDrupalApp |
drupalApp
The drupal application this command is associated with. |
protected static java.util.logging.Logger |
logger
|
protected CommandRecord |
record
The database record this command is associated with. |
Constructor Summary | |
---|---|
protected |
AsyncCommand()
|
|
AsyncCommand(CommandRecord record,
GenericDrupalApp drupalApp)
Constructor should prepare the command to run "run()". |
Method Summary | |
---|---|
AsyncCommand |
evaluate(java.lang.String... params)
Override this if you want to evaluate the command from CLI or other ad-hoc approach. |
protected DrupalConnection |
getDrupalConnection()
|
java.lang.String |
getIdentifier()
Specifies the name this command is known as. |
abstract void |
run()
Run this command. |
protected void |
setDrupalApp(GenericDrupalApp drupalApp)
|
protected void |
setRecord(CommandRecord record)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.logging.Logger logger
protected GenericDrupalApp drupalApp
protected CommandRecord record
Constructor Detail |
---|
public AsyncCommand(CommandRecord record, GenericDrupalApp drupalApp)
record
- drupalApp
- protected AsyncCommand()
Method Detail |
---|
protected DrupalConnection getDrupalConnection()
protected void setRecord(CommandRecord record)
protected void setDrupalApp(GenericDrupalApp drupalApp)
public java.lang.String getIdentifier()
public abstract void run()
run
in interface java.lang.Runnable
public AsyncCommand evaluate(java.lang.String... params)
params
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |