context.arch.subscriber
Class DiscovererSubscriber

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

public class DiscovererSubscriber
extends AbstractSubscriber

This class implements a subscriber object, encapsulating the information needed to create a subscriber and send information to it.

See Also:
Subscribers

Field Summary
static java.lang.String DISCOVERER_SUBSCRIPTION_CONTENT
           
static java.lang.String DISCOVERER_SUBSCRIPTION_REPLY
          Tag to indicate message is a subscription reply
static java.lang.String DISCOVERER_SUBSCRIPTION_REPLY_CONTENT
           
static java.lang.String DISCOVERER_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
DiscovererSubscriber(DataObject data)
          Basic constructor that creates a subscriber object from a DataObject.
DiscovererSubscriber(java.lang.String componentId, java.lang.String subHostname, int subPort, java.lang.String subCallback, AbstractQueryItem query)
          Basic constructor that creates a subscriber object.
DiscovererSubscriber(java.lang.String baseObjectId, java.lang.String subHostname, java.lang.String subPort, java.lang.String subCallback, AbstractQueryItem query)
          Basic constructor that creates a subscriber object.
 
Method Summary
 AbstractQueryItem getQuery()
          Returns the subscription query, under which the subscriber will be notified
 boolean isFullDescriptionResponse()
           
 void setFullDescriptionResponse(boolean b)
          Sets whether or not this subscriber wishes to receive full information about matching components, or just basic description information.
 void setQuery(AbstractQueryItem query)
          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

DISCOVERER_TYPE

public static final java.lang.String DISCOVERER_TYPE
See Also:
Constant Field Values

DISCOVERER_SUBSCRIPTION_CONTENT

public static final java.lang.String DISCOVERER_SUBSCRIPTION_CONTENT
See Also:
Constant Field Values

DISCOVERER_SUBSCRIPTION_REPLY_CONTENT

public static final java.lang.String DISCOVERER_SUBSCRIPTION_REPLY_CONTENT
See Also:
Constant Field Values

DISCOVERER_SUBSCRIPTION_REPLY

public static final java.lang.String DISCOVERER_SUBSCRIPTION_REPLY
Tag to indicate message is a subscription reply

See Also:
Constant Field Values
Constructor Detail

DiscovererSubscriber

public DiscovererSubscriber(java.lang.String componentId,
                            java.lang.String subHostname,
                            int subPort,
                            java.lang.String subCallback,
                            AbstractQueryItem query)
Basic constructor that creates a subscriber object.


DiscovererSubscriber

public DiscovererSubscriber(java.lang.String baseObjectId,
                            java.lang.String subHostname,
                            java.lang.String subPort,
                            java.lang.String subCallback,
                            AbstractQueryItem query)
Basic constructor that creates a subscriber object.


DiscovererSubscriber

public DiscovererSubscriber(DataObject data)
Basic constructor that creates a subscriber object from a DataObject. The DataObject must contain a tag The query is in Discoverer.DISCOVERER_QUERY_CONTENT

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

setQuery

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


getQuery

public AbstractQueryItem getQuery()
Returns the subscription query, under which the subscriber will be notified

Returns:
subscription query used for notification

setFullDescriptionResponse

public void setFullDescriptionResponse(boolean b)
Sets whether or not this subscriber wishes to receive full information about matching components, or just basic description information.


isFullDescriptionResponse

public boolean isFullDescriptionResponse()