|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.drupal.project.async_command.GenericDrupalApp
public class GenericDrupalApp
This is the new DrupalApp class. A launcher has a field to launch DrupalApp, rather than DrupalApp has a field of launcher.
| Nested Class Summary | |
|---|---|
static class |
GenericDrupalApp.RunningMode
Various running mode of the DrupalApp |
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Class> |
acceptableCommandClass
Class name: the class object. |
protected DrupalConnection |
drupalConnection
|
protected static java.util.logging.Logger |
logger
|
| Constructor Summary | |
|---|---|
protected |
GenericDrupalApp()
This constructor requires manually set DrupalConnection. |
|
GenericDrupalApp(DrupalConnection drupalConnection)
Register acceptable AsyncCommand classes in constructor. |
| Method Summary | |
|---|---|
DrupalConnection |
getDrupalConnection()
|
java.lang.String |
getIdentifier()
Specifies the name this DrupalApp is known as. |
(package private) AsyncCommand |
parseCommand(CommandRecord record)
Create an object of AsyncCommand based on the CommandRecord. |
void |
registerCommandClass(java.lang.Class<? extends AsyncCommand> commandClass)
Register a command with the Drupal application. |
void |
registerCommandClass(java.lang.String identifier,
java.lang.Class commandClass)
Register a command with arbitrary identifier. |
void |
run()
|
protected void |
runSerial()
|
protected void |
setDrupalConnection(DrupalConnection drupalConnection)
Only derived class can change drupal connection. |
void |
setRunningMode(GenericDrupalApp.RunningMode runningMode)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DrupalConnection drupalConnection
protected static java.util.logging.Logger logger
protected java.util.Map<java.lang.String,java.lang.Class> acceptableCommandClass
| Constructor Detail |
|---|
public GenericDrupalApp(DrupalConnection drupalConnection)
drupalConnection - Connection to a Drupal database that has the {async_command} table.protected GenericDrupalApp()
| Method Detail |
|---|
public void setRunningMode(GenericDrupalApp.RunningMode runningMode)
protected void setDrupalConnection(DrupalConnection drupalConnection)
drupalConnection - public DrupalConnection getDrupalConnection()
public java.lang.String getIdentifier()
AsyncCommand parseCommand(CommandRecord record)
throws CommandParseException
record -
CommandParseExceptionpublic void registerCommandClass(java.lang.Class<? extends AsyncCommand> commandClass)
commandClass -
public void registerCommandClass(java.lang.String identifier,
java.lang.Class commandClass)
identifier - commandClass - public void run()
run in interface java.lang.Runnableprotected void runSerial()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||