context.arch.subscriber
Class ClientSideSubscriber

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

public class ClientSideSubscriber
extends AbstractSubscriber

This class implements a client side subscriber object This code is awful.... we need to rewrite the subscription system

See Also:
Subscribers, ClientSideSubscriber

Field Summary
static java.lang.String CLIENT_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
ClientSideSubscriber(DataObject data)
          Basic constructor that creates a subscriber object from a DataObject.
ClientSideSubscriber(java.lang.String baseObjectId, java.lang.String subHostname, int subPort, java.lang.String subCallback, AbstractQueryItem condition, Attributes attributes)
          Creates new ClientSideSubscriber
ClientSideSubscriber(java.lang.String baseObjectId, 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
 java.lang.String toString()
           
 
Methods inherited from class context.arch.subscriber.AbstractSubscriber
addError, dataObjectToAbstractSubscriber, getBaseObjectId, getErrors, getSubscriberHostName, getSubscriberPort, getSubscriptionCallback, getSubscriptionId, resetErrors, setBaseObjectId, setSubscriberHostname, setSubscriberPort, setSubscriptionCallback, setSubscriptionId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLIENT_TYPE

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

ClientSideSubscriber

public ClientSideSubscriber(java.lang.String baseObjectId,
                            java.lang.String subHostname,
                            int subPort,
                            java.lang.String subCallback,
                            AbstractQueryItem condition,
                            Attributes attributes)
Creates new ClientSideSubscriber

Parameters:
attributes - Attributes to return to subscriber

ClientSideSubscriber

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

Parameters:
attributes - Attributes to return to subscriber

ClientSideSubscriber

public ClientSideSubscriber(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

toString

public java.lang.String toString()
Overrides:
toString in class AbstractSubscriber