context.arch.subscriber
Class Subscriber

java.lang.Object
  extended bycontext.arch.subscriber.AbstractSubscriber
      extended bycontext.arch.subscriber.Subscriber

public class Subscriber
extends AbstractSubscriber

This class implements a server or widget side subscriber object, encapsulating the information needed to talk to a widget's subscriber.

See Also:
Subscribers, ClientSideSubscriber

Field Summary
static java.lang.String GENERAL_TYPE
           
 
Fields inherited from class context.arch.subscriber.AbstractSubscriber
ADD_SUBSCRIBER, CALLBACK_NAME, CALLBACK_TAG, CLIENT_BASEOBJECT_ID, HOSTNAME, MAX_ERRORS, PORT, REMOVE_SUBSCRIBER, SUBSCRIBER, SUBSCRIBER_ID, SUBSCRIBER_TYPE, SUBSCRIPTION_CALLBACK, SUBSCRIPTION_CALLBACK_REPLY, SUBSCRIPTION_REPLY
 
Constructor Summary
Subscriber(DataObject data)
          Basic constructor that creates a subscriber object from a DataObject.
Subscriber(java.lang.String subBaseObjectId, java.lang.String subHostname, int subPort, java.lang.String subCallback, AbstractQueryItem condition, Attributes attributes)
          Basic constructor that creates a subscriber object.
Subscriber(java.lang.String subBaseObjectId, java.lang.String subHostname, java.lang.String subPort, java.lang.String subCallback, AbstractQueryItem condition, Attributes attributes)
          Basic constructor that creates a subscriber object.
 
Method Summary
 Attributes getAttributes()
          Returns the subscription attributes to be returned
 AbstractQueryItem getCondition()
          Returns the subscription conditions, under which the subscriber will be notified
 void setAttributes(Attributes attributes)
          Sets the attributes to return to the subscriber
 void setCondition(AbstractQueryItem condition)
          Sets the subscription conditions, under which the subscriber will be notified
 DataObject toDataObject()
          This method converts the subscriber info to a DataObject
 
Methods inherited from class context.arch.subscriber.AbstractSubscriber
addError, dataObjectToAbstractSubscriber, getBaseObjectId, getErrors, getSubscriberHostName, getSubscriberPort, getSubscriptionCallback, getSubscriptionId, resetErrors, setBaseObjectId, setSubscriberHostname, setSubscriberPort, setSubscriptionCallback, setSubscriptionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GENERAL_TYPE

public static final java.lang.String GENERAL_TYPE
See Also:
Constant Field Values
Constructor Detail

Subscriber

public Subscriber(java.lang.String subBaseObjectId,
                  java.lang.String subHostname,
                  int subPort,
                  java.lang.String subCallback,
                  AbstractQueryItem condition,
                  Attributes attributes)
Basic constructor that creates a subscriber object.

Parameters:
condition - A query that conditions the type of widget data returned
attributes - Attributes to return to subscriber

Subscriber

public Subscriber(java.lang.String subBaseObjectId,
                  java.lang.String subHostname,
                  java.lang.String subPort,
                  java.lang.String subCallback,
                  AbstractQueryItem condition,
                  Attributes attributes)
Basic constructor that creates a subscriber object.

Parameters:
condition - A query that conditions the type of widget data returned
attributes - Attributes to return to subscriber

Subscriber

public Subscriber(DataObject data)
Basic constructor that creates a subscriber object from a DataObject. The DataObject must contain a tag

Parameters:
data - DataObject containing the subscriber info
Method Detail

toDataObject

public DataObject toDataObject()
This method converts the subscriber info to a DataObject

Overrides:
toDataObject in class AbstractSubscriber
Returns:
Subscriber object converted to a DataObject

setCondition

public void setCondition(AbstractQueryItem condition)
Sets the subscription conditions, under which the subscriber will be notified


getCondition

public AbstractQueryItem getCondition()
Returns the subscription conditions, under which the subscriber will be notified

Returns:
subscription conditions used for notification

setAttributes

public void setAttributes(Attributes attributes)
Sets the attributes to return to the subscriber

Parameters:
attributes - Attributes to return to the subscriber

getAttributes

public Attributes getAttributes()
Returns the subscription attributes to be returned

Returns:
subscription attributes to return to subscriber