|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--context.arch.BaseObject
|
+--context.arch.interpreter.Interpreter
This class is the basic interpreter.
BaseObject| Field Summary | |
static int |
DEFAULT_PORT
Default port to use for interpreters |
protected Attributes |
inAttributes
|
protected java.util.Hashtable |
inAttributeTypes
|
static java.lang.String |
INTERPRET
Tag for interpreter |
static java.lang.String |
INTERPRET_REPLY
Tag for interpreterReply |
protected Attributes |
outAttributes
|
protected java.util.Hashtable |
outAttributeTypes
|
| Fields inherited from class context.arch.BaseObject |
communications,
EXIT_OK,
handlers,
ID,
parser,
PING,
PING_REPLY,
serviceHandlers |
| Constructor Summary | |
Interpreter(int port)
Constructor that creates a BaseObject with the given port and sets the incoming and outgoing attributes. |
|
| Method Summary | |
protected java.lang.String |
getInAttributeType(java.lang.String name)
Returns the attribute type with the given name for incoming attributes |
protected java.lang.String |
getOutAttributeType(java.lang.String name)
Returns the attribute type with the given name for outgoing attributes |
protected abstract AttributeNameValues |
interpretData(AttributeNameValues data)
This abstract method interprets the given data and returns it. |
protected boolean |
isInAttribute(java.lang.String name)
Checks if the given incoming attribute is an attribute of this interpreter |
protected boolean |
isOutAttribute(java.lang.String name)
Checks if the given outgoing attribute is an attribute of this interpreter |
protected DataObject |
runInterpreterMethod(DataObject data,
java.lang.String error)
This is an empty method that should be overridden by objects that subclass from this class. |
DataObject |
runUserMethod(DataObject data)
This method is meant to handle any internal methods that the baseObject doesn't handle. |
protected void |
setInAttribute(java.lang.String name,
java.lang.String type)
Adds an incoming attribute |
protected abstract Attributes |
setInAttributes()
Sets the incoming attributes for the interpreter |
protected void |
setOutAttribute(java.lang.String name,
java.lang.String type)
Adds an outgoing attribute |
protected abstract Attributes |
setOutAttributes()
Sets the outgoing attributes for the interpreter |
| 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 INTERPRET
public static final java.lang.String INTERPRET_REPLY
public static final int DEFAULT_PORT
protected Attributes inAttributes
protected Attributes outAttributes
protected java.util.Hashtable inAttributeTypes
protected java.util.Hashtable outAttributeTypes
| Constructor Detail |
public Interpreter(int port)
port - Port number to create the BaseObject onBaseObject| Method Detail |
public DataObject runUserMethod(DataObject data)
data - DataObject containing the method to run and parametersrunInterpreterMethod(DataObject,String)protected abstract AttributeNameValues interpretData(AttributeNameValues data)
data - AttributeNameValues containing data to be interpreted
protected DataObject runInterpreterMethod(DataObject data,
java.lang.String error)
data - DataObject containing the data for the methoderror - String containing the incoming error valueprotected java.lang.String getInAttributeType(java.lang.String name)
name - Name of the attribute to get
protected void setInAttribute(java.lang.String name,
java.lang.String type)
name - Name of the attribute to settype - Type of the attributeprotected boolean isInAttribute(java.lang.String name)
name - Name of the attribute to checkprotected java.lang.String getOutAttributeType(java.lang.String name)
name - Name of the attribute to get
protected void setOutAttribute(java.lang.String name,
java.lang.String type)
name - Name of the attribute to settype - Type of the attributeprotected boolean isOutAttribute(java.lang.String name)
name - Name of the attribute to checkprotected abstract Attributes setInAttributes()
protected abstract Attributes setOutAttributes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||