|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectautohit.call.modules.Module
The abstract base class for modules. Every module must implement this.
An implemented module needs to complete the following abstract methods:
execute_chain - run a named method.
instantiation_chain() - called at module instantiation
free_chain() - called at module destruction
All protected methods are helpers for the execute.
Modules are not allowed to have methods called "name"
EPG - Initial - 14Jun03
EPG - make SC visible - 3 Sep03
Field Summary | |
protected java.lang.String |
myName
|
protected VMCore |
visCore
|
protected AutohitLogInjectorWrapper |
visLogger
|
protected SystemContext |
visSC
|
protected Universe |
visUniverse
|
Constructor Summary | |
Module()
|
Method Summary | |
protected CallException |
buildException(java.lang.String message,
int code)
Build a call exception with our formatting |
protected CallException |
buildException(java.lang.String message,
int code,
java.lang.Throwable iec)
Build a call exception with our formatting - chained |
protected void |
debug(java.lang.String msg)
Local method for logging debug information |
protected java.lang.String |
desired(java.lang.String param,
java.lang.String method)
Desired parameter. |
protected java.lang.Object |
desiredType(java.lang.String param,
java.lang.Class type,
java.lang.String method)
Desired parameter. |
protected void |
error(java.lang.String msg)
Local method for logging an error |
protected void |
errorparam(java.lang.String missing,
java.lang.String method)
Local method for logging an error for a missing param. |
abstract java.lang.Object |
execute_chain(java.lang.String name)
Execute a named method. |
java.lang.String |
execute(java.lang.String methodName)
Execute a method |
protected void |
fault(java.lang.String message)
Cause a fault |
protected void |
fault(java.lang.String message,
java.lang.Throwable t)
Cause a fault with CHAIN |
protected abstract void |
free_chain()
Allow the subclass a chance to cleanup on free. |
void |
free()
Remove an instance |
protected java.lang.Object |
getParam(java.lang.String name)
Get a parameter |
protected java.lang.Object |
getPersist(java.lang.String name)
Get a persisted object |
void |
instance(VMCore core,
Universe uni,
AutohitLogInjectorWrapper logger,
SystemContext sctx)
Instantiate |
protected abstract java.lang.String |
instantiation_chain()
Allow the subclass a chance to initialize. |
protected boolean |
isDebugging()
report if we are debugging (as an accellerator) |
protected void |
log(java.lang.String msg)
Local method for logging an event |
protected java.lang.String |
optional(java.lang.String param)
Optional parameter. |
protected java.lang.Object |
optionalType(java.lang.String param,
java.lang.Class type)
Optional parameter. |
protected java.lang.String |
required(java.lang.String param,
java.lang.String method)
Required parameter. |
protected java.lang.Object |
requiredType(java.lang.String param,
java.lang.Class type,
java.lang.String method)
Required parameter. |
protected void |
warning(java.lang.String msg)
Local method for logging an warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected VMCore visCore
protected Universe visUniverse
protected AutohitLogInjectorWrapper visLogger
protected java.lang.String myName
protected SystemContext visSC
Constructor Detail |
public Module()
Method Detail |
public void instance(VMCore core, Universe uni, AutohitLogInjectorWrapper logger, SystemContext sctx) throws CallException
core
- is a reference to the environment coreuni
- is the default universelogger
- is the default logger
CallException
VMCore
,
Universe
,
AutohitLogInjectorWrapper
public void free() throws CallException
CallException
public java.lang.String execute(java.lang.String methodName) throws CallException
methodName
- the name of the method
CallException
protected boolean isDebugging()
protected java.lang.Object getParam(java.lang.String name)
name
- of the parameter
protected java.lang.Object getPersist(java.lang.String name)
name
- of the object in the persist
protected void log(java.lang.String msg)
msg
- event messageprotected void error(java.lang.String msg)
msg
- event messageprotected void errorparam(java.lang.String missing, java.lang.String method)
missing
- name of paramater missingmethod
- name of method calledprotected void warning(java.lang.String msg)
msg
- event messageprotected void debug(java.lang.String msg)
msg
- event messageprotected CallException buildException(java.lang.String message, int code)
message
- text of the messagecode
- the autohit error code (also available in CallException)
CallException
,
AutohitErrorCodes
protected void fault(java.lang.String message) throws CallException
message
- text of the message
a
- CallException
CallException
CallException
protected void fault(java.lang.String message, java.lang.Throwable t) throws CallException
message
- text of the message
a
- CallException
CallException
CallException
protected CallException buildException(java.lang.String message, int code, java.lang.Throwable iec)
message
- text of the messagecode
- the autohit error code (also available in CallException)iec
- initiating exception
CallException
,
AutohitErrorCodes
protected java.lang.String required(java.lang.String param, java.lang.String method) throws CallException
param
- parameter namemethod
- method being called. Used for error reporting.
CallException
protected java.lang.Object requiredType(java.lang.String param, java.lang.Class type, java.lang.String method) throws CallException
param
- parameter nametype
- the class of the type requiredmethod
- method being called. Used for error reporting.
CallException
protected java.lang.String desired(java.lang.String param, java.lang.String method)
param
- parameter namemethod
- method being called. Used for error reporting.
protected java.lang.Object desiredType(java.lang.String param, java.lang.Class type, java.lang.String method)
param
- parameter nametype
- the class of the type desiredmethod
- method being called. Used for error reporting.
protected java.lang.String optional(java.lang.String param)
param
- parameter name
protected java.lang.Object optionalType(java.lang.String param, java.lang.Class type)
param
- parameter nametype
- the class of the type optional
public abstract java.lang.Object execute_chain(java.lang.String name) throws CallException
name
- name of the method
CallException
NOPair
protected abstract java.lang.String instantiation_chain() throws CallException
CallException
protected abstract void free_chain() throws CallException
CallException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |