|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectautohit.call.Call
The abstract class to all the callable functions. Every CALL should implement this. The call will get passed parameters by name out of core. IMPORTANT!!!! Calls should not have any fields! Those that are already provided are inherently thread safe. Calls are cached per VM and reused as often as possible. There will be no thread-safety issues with the VMCore or log, but the SystemContecxt and Universe may be shared.
EPG - Initial - 14May03
EPG - reorganize to make Call the base class - 10Sep03
Field Summary | |
static java.lang.String |
CALL_TEXT_HEADER
|
AutohitLogInjectorWrapper |
log
Primary Logger |
SystemContext |
sc
System Context |
Universe |
u
Our simple little universe. |
VMCore |
vmc
Core |
Constructor Summary | |
Call()
|
Method Summary | |
abstract java.lang.String |
call()
Execute it. |
abstract java.lang.String |
call(Universe uni)
Execute using the passed universe, rather than the loaded. |
void |
debug(java.lang.String text)
Log a debugging statement. |
java.lang.Object |
desired(java.lang.String item)
Get a desired parameter. |
java.lang.String |
desiredString(java.lang.String item)
Get a desired parameter. |
void |
error(java.lang.String text)
Log an error statement. |
java.lang.String |
format(java.lang.String text)
Return a formatted text. |
void |
info(java.lang.String text)
Log an info statement. |
abstract void |
load_chain()
Implement this to handle load time initialization. |
void |
load(VMCore core,
SystemContext sctx,
AutohitLogInjectorWrapper logger)
This will be called to set references to the environment and usable Universe. |
abstract java.lang.String |
name()
Implement this to return the name of the CALL |
java.lang.String |
optionalString(java.lang.String item)
Get a optional parameter. |
java.lang.Object |
required(java.lang.String item)
Get a required parameter. |
java.lang.Object |
required(java.lang.String item,
java.lang.Class classtype)
Get a required parameter. |
java.lang.Object |
requiredPersist(java.lang.String item,
java.lang.Class classtype)
Get a required persist object. |
java.lang.String |
requiredString(java.lang.String item)
Get a required parameter that must be a String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CALL_TEXT_HEADER
public VMCore vmc
public SystemContext sc
public AutohitLogInjectorWrapper log
public Universe u
Constructor Detail |
public Call()
Method Detail |
public abstract void load_chain() throws CallException
CallException
public abstract java.lang.String name()
public abstract java.lang.String call() throws CallException
CallException
public abstract java.lang.String call(Universe uni) throws CallException
uni
- a universe
CallException
Universe
public void load(VMCore core, SystemContext sctx, AutohitLogInjectorWrapper logger) throws CallException
core
- is a reference to the environment coresctx
- is a system contextlogger
- the log target
CallException
VMCore
,
SystemContext
public void debug(java.lang.String text)
text
- The text of the statement.public void error(java.lang.String text)
text
- The text of the statement.public void info(java.lang.String text)
text
- The text of the statement.public java.lang.String format(java.lang.String text)
text
- The text of the statement.
public java.lang.Object desired(java.lang.String item)
item
- Name of the parameter
public java.lang.String desiredString(java.lang.String item)
item
- Name of the parameter
public java.lang.String optionalString(java.lang.String item)
item
- Name of the parameter
public java.lang.Object required(java.lang.String item) throws CallException
item
- Name of the parameter
CallException
public java.lang.String requiredString(java.lang.String item) throws CallException
item
- Name of the parameter
CallException
public java.lang.Object required(java.lang.String item, java.lang.Class classtype) throws CallException
item
- Name of the parameterclasstype
- Class is should be.
CallException
public java.lang.Object requiredPersist(java.lang.String item, java.lang.Class classtype) throws CallException
item
- Name of the parameterclasstype
- Class is should be.
CallException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |