context.arch.interpreter
Class IIButton2GroupURL
java.lang.Object
|
+--context.arch.BaseObject
|
+--context.arch.interpreter.Interpreter
|
+--context.arch.interpreter.IIButton2GroupURL
- public class IIButton2GroupURL
- extends Interpreter
This class is an interpreter that converts iButton ids to groups.
Another component (app/widget/interpreter) sends an interpret command
to it with an ibutton id, and this class returns the corresponding group.
- See Also:
Interpreter
Field Summary |
static java.lang.String |
CLASSNAME
Name of interpreter |
static java.lang.String |
GROUP
Tag for group |
static java.lang.String |
IBUTTONID
Tag for iButton id |
static java.lang.String |
URL
Tag for group url |
Constructor Summary |
IIButton2GroupURL(int port,
java.lang.String ibrghost,
int ibrgport,
java.lang.String rgurlhost,
int rgurlport)
Constructor that creates the interpreter at the given port. |
IIButton2GroupURL(java.lang.String ibrghost,
int ibrgport,
java.lang.String rgurlhost,
int rgurlport)
Constructor that creates the interpreter at the default port. |
Methods inherited from class context.arch.BaseObject |
askInterpreter,
decodeData,
encodeData,
executeAsynchronousWidgetService,
executeSynchronousWidgetService,
getHostAddress,
getId,
getVersion,
getVersion,
getWidgetAttributes,
getWidgetCallbacks,
getWidgetServices,
pingComponent,
pollWidget,
putDataInWidget,
queryVersion,
quit,
retrieveDataFrom,
retrieveDataFrom,
retrieveDataFrom,
retrieveDataFrom,
retrieveDataFrom,
retrieveDataFrom,
retrieveDataFrom,
returnPing,
runComponentMethod,
runMethod,
serviceResult,
setId,
setVersion,
subscribeTo,
subscribeTo,
subscribeTo,
subscribeTo,
unsubscribeFrom,
updateAndPollWidget,
userCallback,
userRequest,
userRequest,
userRequest |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CLASSNAME
public static final java.lang.String CLASSNAME
- Name of interpreter
IBUTTONID
public static final java.lang.String IBUTTONID
- Tag for iButton id
GROUP
public static final java.lang.String GROUP
- Tag for group
URL
public static final java.lang.String URL
- Tag for group url
IIButton2GroupURL
public IIButton2GroupURL(java.lang.String ibrghost,
int ibrgport,
java.lang.String rgurlhost,
int rgurlport)
- Constructor that creates the interpreter at the default port. It sets
the id of the this interpreter to CLASSNAME.
- Parameters:
ibrghost
- Hostname of the machine IIButton2Group is running onibrgport
- Port of the machine IIButton2Group is running onrgurlhost
- Hostname of the machine IGroup2URL is running onrgurlport
- Port of the machine IGroup2URL is running on
IIButton2GroupURL
public IIButton2GroupURL(int port,
java.lang.String ibrghost,
int ibrgport,
java.lang.String rgurlhost,
int rgurlport)
- Constructor that creates the interpreter at the given port. It sets
the id of the this interpreter to CLASSNAME.
- Parameters:
port
- Port this interpreter is running onibrghost
- Hostname of the machine IIButton2Group is running onibrgport
- Port of the machine IIButton2Group is running onrgurlhost
- Hostname of the machine IGroup2URL is running onrgurlport
- Port of the machine IGroup2URL is running on
interpretData
protected AttributeNameValues interpretData(AttributeNameValues data)
- This method performs the actual interpretation of this component.
It takes an iButton id and returns a user name.
- Overrides:
- interpretData in class Interpreter
- Parameters:
data
- AttributeNameValues containing data to be interpreted- Returns:
- AttributeNameValues object containing the interpreted data
setInAttributes
protected Attributes setInAttributes()
- Sets the incoming attributes for the interpreter. It has only
one: IBUTTONID.
- Overrides:
- setInAttributes in class Interpreter
- Returns:
- the incoming attributes for this interpreter
setOutAttributes
protected Attributes setOutAttributes()
- Sets the outgoing attributes for the interpreter. It has only
one: GROUP
- Overrides:
- setOutAttributes in class Interpreter
- Returns:
- the outgoing attributes for this interpreter.
main
public static void main(java.lang.String[] argv)
- Main method to create this interpreter with port specified by
command line arguments