|
|||||||||
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 | +--context.arch.interpreter.IIButton2NameExt
This class is an interpreter that converts iButton ids to names. It looks up correspondences between ids and names from an XML web page given as an argument. It expects the XML page to comply with the context-users DTD. Another component (app/widget/interpreter) sends an interpret command to it with an ibutton id, and this class returns the corresponding name.
Interpreter
Field Summary | |
static java.lang.String |
CLASSNAME
Name of interpreter |
static int |
DEFAULT_PORT
Default port to use to receive communications |
static java.lang.String |
DEFAULT_USERSLIST
Default port to use to receive communications |
static java.lang.String |
DUMMBO
String for Dummbo |
static java.lang.String |
IBUTTONID
Tag for iButton id |
static java.lang.String |
LISTUSERSNAMES
Tag for requesting the list of all users names |
static java.lang.String |
LISTUSERSNAMES_REPLY
Tag for reply to request for the list of all users names |
static java.lang.String |
USERNAME
Tag for username |
Fields inherited from class context.arch.interpreter.Interpreter |
DEFAULT_PORT,
inAttributes,
inAttributeTypes,
INTERPRET,
INTERPRET_REPLY,
outAttributes,
outAttributeTypes |
Fields inherited from class context.arch.BaseObject |
communications,
EXIT_OK,
handlers,
ID,
parser,
PING,
PING_REPLY,
serviceHandlers |
Constructor Summary | |
IIButton2NameExt()
Constructor that creates the interpreter at the default port and using the default users list. |
|
IIButton2NameExt(int port)
Constructor that creates the interpreter at the given port and using the default users list. |
|
IIButton2NameExt(int port,
java.lang.String url)
Constructor that creates the interpreter at the given port and with the given url for the users list. |
|
IIButton2NameExt(java.lang.String url)
Constructor that creates the interpreter at the default port and using the given url for the users list. |
Method Summary | |
protected AttributeNameValues |
interpretData(AttributeNameValues data)
This method performs the actual interpretation of this component. |
static void |
main(java.lang.String[] argv)
Main method to create this interpreter with port specified by command line arguments |
protected DataObject |
runInterpreterMethod(DataObject data,
java.lang.String error)
This is method that handles methods for this Interpreter that are no interpreter requests. |
protected Attributes |
setInAttributes()
Sets the incoming attributes for the interpreter. |
protected Attributes |
setOutAttributes()
Sets the outgoing attributes for the interpreter. |
Methods inherited from class context.arch.interpreter.Interpreter |
getInAttributeType,
getOutAttributeType,
isInAttribute,
isOutAttribute,
runUserMethod,
setInAttribute,
setOutAttribute |
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 CLASSNAME
public static final java.lang.String LISTUSERSNAMES
public static final java.lang.String LISTUSERSNAMES_REPLY
public static final java.lang.String IBUTTONID
public static final java.lang.String USERNAME
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_USERSLIST
public static final java.lang.String DUMMBO
Constructor Detail |
public IIButton2NameExt()
public IIButton2NameExt(int port)
public IIButton2NameExt(java.lang.String url)
public IIButton2NameExt(int port, java.lang.String url)
Method Detail |
protected AttributeNameValues interpretData(AttributeNameValues data)
data
- AttributeNameValues containing data to be interpretedprotected DataObject runInterpreterMethod(DataObject data, java.lang.String error)
data
- DataObject containing the data for the methoderror
- String containing the incoming error valueprotected Attributes setInAttributes()
protected Attributes setOutAttributes()
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |