context.arch.widget
Class WidgetHandle

java.lang.Object
  extended bycontext.arch.widget.WidgetHandle

public class WidgetHandle
extends java.lang.Object

This class implements a widget handler object, encapsulating the information needed to subscribe to a widget. Agathe: I modified this class so that it may also specify conditions and attributes conditions TODO: removed conditions, must replace with queryitem

See Also:
WidgetHandles

Constructor Summary
WidgetHandle(java.lang.String id, java.lang.String hostname, int port)
          Basic constructor that creates a WidgetHandle object.
WidgetHandle(java.lang.String id, java.lang.String hostname, java.lang.String port)
          Basic constructor that creates a WidgetHandle object.
 
Method Summary
 Attributes getAttributes()
          Return the Attributes of the subscription
 java.lang.String getHostName()
          Returns the name of the subscriber's host computer
 java.lang.String getId()
          Returns the id of the subscriber
 int getPort()
          Returns the port number to send info to
 void setAttributes(Attributes atts)
          Sets the Attributes for the widget subscription
 void setHostName(java.lang.String hostname)
          Sets the name of the subscriber's host computer
 void setId(java.lang.String id)
          Sets the id of the subscriber
 void setPort(int port)
          Sets the port number to send info to
 java.lang.String toString()
          Returns a printable version of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WidgetHandle

public WidgetHandle(java.lang.String id,
                    java.lang.String hostname,
                    int port)
Basic constructor that creates a WidgetHandle object.

Parameters:
id - ID of the widget being subscribed to
hostname - Name of the widget's host computer
port - Port number of the widget

WidgetHandle

public WidgetHandle(java.lang.String id,
                    java.lang.String hostname,
                    java.lang.String port)
Basic constructor that creates a WidgetHandle object.

Parameters:
id - ID of the widget being subscribed to
hostname - Name of the widget's host computer
port - Port number of the widget
Method Detail

getId

public java.lang.String getId()
Returns the id of the subscriber

Returns:
the subscriber id

setId

public void setId(java.lang.String id)
Sets the id of the subscriber

Parameters:
id - ID of the subscriber

getHostName

public java.lang.String getHostName()
Returns the name of the subscriber's host computer

Returns:
the host name of the subscriber

setHostName

public void setHostName(java.lang.String hostname)
Sets the name of the subscriber's host computer

Parameters:
hostname - Name of the subscriber's host computer

getPort

public int getPort()
Returns the port number to send info to

Returns:
the port number of the subscriber

setPort

public void setPort(int port)
Sets the port number to send info to

Parameters:
port - Port number to send information to

setAttributes

public void setAttributes(Attributes atts)
Sets the Attributes for the widget subscription

Parameters:
atts -

getAttributes

public Attributes getAttributes()
Return the Attributes of the subscription

Returns:
Attributes

toString

public java.lang.String toString()
Returns a printable version of the object

Returns:
String