context.arch.interpreter
Class IIButton2Name

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

public class IIButton2Name
extends Interpreter

This class is an interpreter that converts iButton ids to names. Another component (app/widget/interpreter) sends an interpret command to it with an ibutton id, and this class returns the corresponding name.

See Also:
Interpreter

Field Summary
static java.lang.String ABOWD
          String for Gregory Abowd
static java.lang.String ANIND
          String for Anind Dey
static java.lang.String BAS
          String for Brad Singletary
static java.lang.String BROTHERT
          String for Jason Brotherton
static java.lang.String CLASSNAME
          Name of interpreter
static java.lang.String DNGUYEN
          String for David Nguyen
static java.lang.String DUMMBO
          String for Dummbo
static java.lang.String FUTAKAWA
          String for Futakawa
static java.lang.String IBUTTONID
          Tag for iButton id
static java.lang.String ISHIGURO
          String for Ishiguro
static java.lang.String JMANKOFF
          String for Jen Mankoff
static java.lang.String KENT
          String for Kent Lyons
static java.lang.String KHAI
          String for Khai Truong
static java.lang.String KOOPER
          String for Rob Kooper
static java.lang.String MGP
          String for Maria Pimentel
static java.lang.String RJO
          String for Robert Orr
static java.lang.String SALBER
          String for Daniel Salber
static java.lang.String USERNAME
          Tag for username
static java.lang.String VISHAL
          String for Vishal Dalal
 
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
IIButton2Name()
          Constructor that creates the interpreter at the default port.
IIButton2Name(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

USERNAME

public static final java.lang.String USERNAME
Tag for username

ANIND

public static final java.lang.String ANIND
String for Anind Dey

SALBER

public static final java.lang.String SALBER
String for Daniel Salber

ABOWD

public static final java.lang.String ABOWD
String for Gregory Abowd

BROTHERT

public static final java.lang.String BROTHERT
String for Jason Brotherton

KHAI

public static final java.lang.String KHAI
String for Khai Truong

JMANKOFF

public static final java.lang.String JMANKOFF
String for Jen Mankoff

RJO

public static final java.lang.String RJO
String for Robert Orr

DNGUYEN

public static final java.lang.String DNGUYEN
String for David Nguyen

KOOPER

public static final java.lang.String KOOPER
String for Rob Kooper

MGP

public static final java.lang.String MGP
String for Maria Pimentel

FUTAKAWA

public static final java.lang.String FUTAKAWA
String for Futakawa

ISHIGURO

public static final java.lang.String ISHIGURO
String for Ishiguro

BAS

public static final java.lang.String BAS
String for Brad Singletary

KENT

public static final java.lang.String KENT
String for Kent Lyons

VISHAL

public static final java.lang.String VISHAL
String for Vishal Dalal

DUMMBO

public static final java.lang.String DUMMBO
String for Dummbo
Constructor Detail

IIButton2Name

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

IIButton2Name

public IIButton2Name(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 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: USERNAME.
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