context.arch.interpreter
Class IIButton2Group

java.lang.Object
  |
  +--context.arch.BaseObject
        |
        +--context.arch.interpreter.Interpreter
              |
              +--context.arch.interpreter.IIButton2Group

public class IIButton2Group
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 CRB
          String for CRB
static java.lang.String FCE
          String for FCE
static java.lang.String GROUP
          Tag for group
static java.lang.String IBUTTONID
          Tag for iButton id
static java.lang.String IS
          String for IS
static java.lang.String VE
          String for VE
 
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
IIButton2Group()
          Constructor that creates the interpreter at the default port.
IIButton2Group(int port)
          Constructor that creates the interpreter at the given port.
 
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  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, runInterpreterMethod, runUserMethod, setInAttribute, setOutAttribute
 
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
 

Field Detail

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

FCE

public static final java.lang.String FCE
String for FCE

VE

public static final java.lang.String VE
String for VE

IS

public static final java.lang.String IS
String for IS

CRB

public static final java.lang.String CRB
String for CRB
Constructor Detail

IIButton2Group

public IIButton2Group()
Constructor that creates the interpreter at the default port. It sets the id of the this interpreter to CLASSNAME.

IIButton2Group

public IIButton2Group(int port)
Constructor that creates the interpreter at the given port. It sets the id of the this interpreter to CLASSNAME.
Method Detail

interpretData

protected AttributeNameValues interpretData(AttributeNameValues data)
This method performs the actual interpretation of this component. It takes an iButton id and returns a group 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