Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## context.arch.widget
Class WPNPSonic

    java.lang.Object
      |
      +--context.arch.BaseObject
            |
            +--context.arch.widget.Widget
                  |
                  +--context.arch.widget.WPersonPresence
                        |
                        +--context.arch.widget.WPersonNamePresence
                              |
                              +--context.arch.widget.WPNPSonic

public class WPNPSonic
extends WPersonNamePresence

This class is a context widget that provides information on the in/out status of a person in a particular location. The information is in the form of a location, user name and in/out status. It has the following callbacks: UPDATE. It supports polling and subscriptions. Currently it only uses the IButton as a means of providing presence. It handles only a single IButton instance. It plays certain sounds when people come in and out, (assuming the distinction can be made)

See Also:
  `Widget`, `WPersonNamePresence`, `PositionIButton`

Field Summary
`static java.lang.String` | `CLASSNAME` Name of widget
`static int` | `DEFAULT_PORT` The default port this widget runs on is 5300
`static java.lang.String` | `PLAY_SOUND` Tag that indicates a sound should be played
`static java.lang.String` | `SOUND_FILE` Tag that indicates the sound file to play (URL)
`static java.lang.String` | `SOUND_KIND` Tag that indicates the sound kind to play (in or out)
`java.lang.String` | `VERSION_NUMBER` Widget version number

Fields inherited from class context.arch.widget.WPersonNamePresence
`CLASSNAME, DEFAULT_PORT, MOBILE_SMARTBOARD1, USERNAME, VERSION_NUMBER`

Fields inherited from class context.arch.widget.WPersonPresence
`ANIND_OFFICE, CLASSNAME, COMMON_AREA, DANIEL_OFFICE, DEFAULT_PORT, FCL, GREGORY_OFFICE, ibutton, LOCATION, USERID, VERSION_NUMBER`

Fields inherited from class context.arch.widget.Widget
`attributes, attributeTypes, callbacks, CLASS, CurrentOffset, DEFAULT_PORT, id, PUT_DATA, PUT_DATA_REPLY, QUERY, QUERY_ATTRIBUTES, QUERY_ATTRIBUTES_REPLY, QUERY_CALLBACKS, QUERY_CALLBACKS_REPLY, QUERY_REPLY, QUERY_SERVICES, QUERY_SERVICES_REPLY, QUERY_VERSION, QUERY_VERSION_REPLY, services, SPACER, storage, subscribers, TIMESTAMP, UPDATE, UPDATE_AND_QUERY, UPDATE_AND_QUERY_REPLY, VERSION, VERSION_NUMBER`

Fields inherited from class context.arch.BaseObject
`communications, EXIT_OK, handlers, ID, parser, PING, PING_REPLY, serviceHandlers`

Constructor Summary
`WPNPSonic(java.lang.String location, int port, java.lang.String ihost, int iport)` Constructor that creates the widget at the given location and monitors communications on the given port and creates an instance of the IButton position generator.
`WPNPSonic(java.lang.String location, int port, java.lang.String ihost, int iport, boolean storageFlag)` Constructor that creates the widget at the given location and monitors communications on the given port and creates an instance of the IButton position generator.
`WPNPSonic(java.lang.String location, java.lang.String ihost, int iport)` Constructor that creates the widget at the given location and monitors communications on the DEFAULT_PORT and creates an instance of the IButton position generator.
`WPNPSonic(java.lang.String location, java.lang.String ihost, int iport, boolean storageFlag)` Constructor that creates the widget at the given location and monitors communications on the DEFAULT_PORT and creates an instance of the IButton position generator.

Method Summary
`static void` | `main(java.lang.String[] argv)` Temporary main method to create a widget with location and port specified by command line arguments
`protected void` | `processCallbackReply(DataObject result, Subscriber sub)` This method processes the results of subscription callbacks.

Methods inherited from class context.arch.widget.WPersonNamePresence
`IButtonData2Attributes, setAttributes, setCallbacks`

Methods inherited from class context.arch.widget.WPersonPresence
`notify, queryGenerator, setServices`

Methods inherited from class context.arch.widget.Widget
`addSubscriber, canHandle, canHandle, canHandle, canHandle, executeService, getAttributeType, getCurrentTime, getNewOffset, getNewOffsetNoDelay, isAttribute, isCallback, putData, queryAttributes, queryCallbacks, queryServices, queryWidget, removeSubscriber, retrieveData, runUserMethod, runWidgetMethod, sendToSubscribers, setAttribute, store, store, updateWidgetInformation`

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

### VERSION_NUMBER

    public java.lang.String VERSION_NUMBER

  Widget version number

### CLASSNAME

    public static final java.lang.String CLASSNAME

  Name of widget

### DEFAULT_PORT

    public static final int DEFAULT_PORT

  The default port this widget runs on is 5300

### PLAY_SOUND

    public static final java.lang.String PLAY_SOUND

  Tag that indicates a sound should be played

### SOUND_KIND

    public static final java.lang.String SOUND_KIND

  Tag that indicates the sound kind to play (in or out)

### SOUND_FILE

    public static final java.lang.String SOUND_FILE

  Tag that indicates the sound file to play (URL)

Constructor Detail

### WPNPSonic

    public WPNPSonic(java.lang.String location,
                     java.lang.String ihost,
                     int iport)

  Constructor that creates the widget at the given location and monitors communications on the DEFAULT_PORT and creates an instance of the IButton position generator. It also sets the id of this widget to CLASSNAME_ and enables storage.
  Parameters:
    `location` - Location the widget is "monitoring"
    `ihost` - Hostname/ip the IIButton2Name is running on
    `iport` - Port the IIButton2Name is running on
  See Also:
    `PositionIButton`

### WPNPSonic

    public WPNPSonic(java.lang.String location,
                     java.lang.String ihost,
                     int iport,
                     boolean storageFlag)

  Constructor that creates the widget at the given location and monitors communications on the DEFAULT_PORT and creates an instance of the IButton position generator. It also sets the id of this widget to CLASSNAME_ and sets storage functionality to storageFlag
  Parameters:
    `location` - Location the widget is "monitoring"
    `ihost` - Hostname/ip the IIButton2Name is running on
    `iport` - Port the IIButton2Name is running on
    `storageFlag` - Flag to indicate whether storage is enabled or not
  See Also:
    `PositionIButton`

### WPNPSonic

    public WPNPSonic(java.lang.String location,
                     int port,
                     java.lang.String ihost,
                     int iport)

  Constructor that creates the widget at the given location and monitors communications on the given port and creates an instance of the IButton position generator. It also sets the id of this widget to CLASSNAME_ and enables storage.
  Parameters:
    `location` - Location of the widget
    `port` - Port of the machine the widget is running on
    `ihost` - Hostname of the machine the interpreter is running on
    `iport` - Port of the machine the interpreter is running on

### WPNPSonic

    public WPNPSonic(java.lang.String location,
                     int port,
                     java.lang.String ihost,
                     int iport,
                     boolean storageFlag)

  Constructor that creates the widget at the given location and monitors communications on the given port and creates an instance of the IButton position generator. It also sets the id of this widget to CLASSNAME_ and sets storage to storageFlag.
  Parameters:
    `location` - Location of the widget
    `port` - Port of the machine the widget is running on
    `ihost` - Hostname of the machine the interpreter is running on
    `iport` - Port of the machine the interpreter is running on
    `storageFlag` - Flag to indicate whether storage is enabled or not

Method Detail

### processCallbackReply

    protected void processCallbackReply(DataObject result,
                                        Subscriber sub)

  This method processes the results of subscription callbacks. It plays a sound depending on whether a person has arrived or left.
  Overrides:
    processCallbackReply in class Widget
  Parameters:
    `result` - DataObject containing the result
    `sub` - Subscriber that returned this reply

### main

    public static void main(java.lang.String[] argv)

  Temporary main method to create a widget with location and port specified by command line arguments

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD