|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--context.arch.BaseObject | +--context.arch.widget.Widget | +--context.arch.widget.WPersonPresence | +--context.arch.widget.WTourDemo
This class is a context widget that provides information on the presence of a person at a particular demo and their level of interest in the demo. The information is in the form of a demo and a user id. It has the following callbacks: VISIT and INTEREST. It supports polling and subscriptions. Currently it uses WPersonPresence as a means of providing presence. When a user is present at a particular demo, the name of the demo, and relevant demo information is sent to subscribers. As well, a service is called to display a choices menu to the user, to allow them to select their level of interest in the demo. This information is also passed to interested subscribers.
WPersonPresence
,
AsyncServiceHandler
Field Summary | |
static java.lang.String |
CLASSNAME
Name of widget |
static int |
DEFAULT_PORT
Default port this widget is running on |
static java.lang.String |
DEMO_NAME
Tag for demo |
static java.lang.String |
DEMO_URL
Tag for demo url |
static java.lang.String |
DEMOER_URL
Tag for demoer url |
static java.lang.String |
DISPLAY_DEVICE
Tag for display device |
static java.lang.String |
INTEREST
Tag for interest callback |
static java.lang.String |
INTEREST_LEVEL
Tag for interest level |
static java.lang.String |
MAX_LABEL
Label for maximum interest |
static java.lang.String |
MAXIMUM_INTEREST
Tag for maximum interest |
static java.lang.String |
MED_LABEL
Label for medium interest |
static java.lang.String |
MEDIUM_INTEREST
Tag for medium interest |
static java.lang.String |
MIN_LABEL
Label for minimum interest |
static java.lang.String |
MINIMUM_INTEREST
Tag for minimum interest |
java.lang.String |
VERSION_NUMBER
Widget version number |
static java.lang.String |
VISIT
Tag for visit callback |
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 | |
WTourDemo(java.lang.String demo,
int port,
java.lang.String configFile,
java.lang.String demoFile)
Constructor that creates the widget at the given demo and monitors communications on the given port . |
|
WTourDemo(java.lang.String demo,
int port,
java.lang.String configFile,
java.lang.String demoFile,
boolean storageFlag)
Constructor that creates the widget at the given demo and monitors communications on the given port . |
|
WTourDemo(java.lang.String demo,
int port,
java.lang.String configFile,
java.lang.String demoFile,
java.lang.String id,
boolean storageFlag)
Constructor that creates the widget at the given demo and monitors communications on the given port It also sets the id of this widget to the given id. |
|
WTourDemo(java.lang.String demo,
java.lang.String configFile,
java.lang.String demoFile)
Constructor that creates the widget at the given demo and monitors communications on the DEFAULT_PORT. |
|
WTourDemo(java.lang.String demo,
java.lang.String configFile,
java.lang.String demoFile,
boolean storageFlag)
Constructor that creates the widget at the given demo and monitors communications on the DEFAULT_PORT. |
Method Summary | |
DataObject |
asynchronousServiceHandle(java.lang.String id,
DataObject result)
Method for the AsyncServiceHandle interface. |
static void |
main(java.lang.String[] argv)
Temporary main method to create a widget with demo and port specified by command line arguments |
void |
notify(java.lang.String event,
java.lang.Object data)
Called by the generator class when a significant event has occurred. |
protected Attributes |
setAttributes()
This method implements the abstract method Widget.setAttributes(). |
protected Callbacks |
setCallbacks()
This method implements the abstract method Widget.setCallbacks(). |
Methods inherited from class context.arch.widget.WPersonPresence |
IButtonData2Attributes,
queryGenerator,
setServices |
Methods inherited from class context.arch.widget.Widget |
addSubscriber,
canHandle,
canHandle,
canHandle,
canHandle,
executeService,
getAttributeType,
getCurrentTime,
getNewOffset,
getNewOffsetNoDelay,
isAttribute,
isCallback,
processCallbackReply,
putData,
queryAttributes,
queryCallbacks,
queryServices,
queryWidget,
removeSubscriber,
retrieveData,
runUserMethod,
runWidgetMethod,
sendToSubscribers,
setAttribute,
store,
store,
updateWidgetInformation |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.lang.String VERSION_NUMBER
public static final java.lang.String INTEREST_LEVEL
public static final java.lang.String DEMO_NAME
public static final java.lang.String DEMO_URL
public static final java.lang.String DEMOER_URL
public static final java.lang.String DISPLAY_DEVICE
public static final java.lang.String MINIMUM_INTEREST
public static final java.lang.String MEDIUM_INTEREST
public static final java.lang.String MAXIMUM_INTEREST
public static final java.lang.String MIN_LABEL
public static final java.lang.String MED_LABEL
public static final java.lang.String MAX_LABEL
public static final java.lang.String VISIT
public static final java.lang.String INTEREST
public static final java.lang.String CLASSNAME
public static final int DEFAULT_PORT
Constructor Detail |
public WTourDemo(java.lang.String demo, java.lang.String configFile, java.lang.String demoFile)
demo
- Demo the widget is "monitoring"configFile
- File to use for configurationdemoFile
- File to use for configurationpublic WTourDemo(java.lang.String demo, java.lang.String configFile, java.lang.String demoFile, boolean storageFlag)
demo
- Demo the widget is "monitoring"configFile
- File to use for configurationdemoFile
- File to use for configurationstorageFlag
- Flag to indicate whether storage is enabledpublic WTourDemo(java.lang.String demo, int port, java.lang.String configFile, java.lang.String demoFile)
demo
- Demo the widget is "monitoring"port
- Port to run the widget onconfigFile
- File to use for configurationdemoFile
- File to use for configurationpublic WTourDemo(java.lang.String demo, int port, java.lang.String configFile, java.lang.String demoFile, boolean storageFlag)
demo
- Demo the widget is "monitoring"port
- Port to run the widget onconfigFile
- File to use for configurationdemoFile
- File to use for configurationstorageFlag
- Flag to indicate whether storage is enabledpublic WTourDemo(java.lang.String demo, int port, java.lang.String configFile, java.lang.String demoFile, java.lang.String id, boolean storageFlag)
demo
- Demo the widget is "monitoring"port
- Port to run the widget onconfigFile
- File to use for configurationdemoFile
- File to use for demo informationid
- Widget idstorageFlag
- Flag to indicate whether storage is enabledMethod Detail |
protected Callbacks setCallbacks()
protected Attributes setAttributes()
public void notify(java.lang.String event, java.lang.Object data)
event
- Name of the event that has occurreddata
- Object containing relevant event dataWidget.sendToSubscribers(String, AttributeNameValues)
,
Widget.store(AttributeNameValues)
public DataObject asynchronousServiceHandle(java.lang.String id, DataObject result)
id
- CLASSNAME+userid stringresult
- DataObject containing the result of the service executionpublic static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |