|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object context.arch.enactor.EnactorSubscriptionManager
This class manages CTK subscriptions on behalf of enactors. It generates discovery queries out of enactor references, and notifies enactors of any new widgets that match those references. If multiple enactors utilize one subscription manager, it tries to minimize the number of actual CTK subscriptions used for all enactors.
Field Summary | |
static int |
DEFAULT_PORT
|
Constructor Summary | |
EnactorSubscriptionManager()
|
|
EnactorSubscriptionManager(int port)
|
Method Summary | |
boolean |
addEnactor(Enactor r)
Adds an enactor to the ESM. |
protected void |
addEnactorReference(EnactorReference rwr)
This method registers an EnactorReference with the ESM. |
DataObject |
executeWidgetService(java.lang.String subscriptionId,
java.lang.String serviceName,
java.lang.String functionName,
Attributes input)
|
protected void |
fireAddEventsForAll(Enactor e,
EnactorListener sml)
|
protected BaseObject |
getBaseObject()
|
DataObject |
handle(java.lang.String subscriptionId,
DataObject data)
This abstract method is used to generically handle any callbacks that a widget may support. |
void |
handleIndependentReply(IndependentCommunication independentCommunication)
This method is used to forward the result of an independent communication |
protected void |
handleNewComponent(ComponentDescription cd)
We see if any registered enactors (through references) are interested in this component. |
protected void |
init()
subscribes to the CTK Discover with a query that retrieves information about all new widgets. |
boolean |
removeEnactor(Enactor r)
Removes an enactor from the ESM, and removes all of its subscriptions. |
protected void |
removeEnactorReference(EnactorReference rwr)
removed EnactorReference from manager. |
protected java.util.Collection |
sendDiscovererAttributeQuery(AbstractQueryItem q)
|
protected void |
subscribe(ComponentDescription cd,
EnactorReference rwr)
Subscribes to the widget described by the component description, and binds it to the enactor reference. |
protected void |
unsubscribe(java.lang.String subscriptionId)
Unsubscribes to the widget with the given subscription id, and notifies all bound enactor references. |
protected void |
updateWidgetSubscriptionCondition(java.lang.String subscriptionId)
resubscribe to a currently subscribed widget with new conditions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_PORT
Constructor Detail |
public EnactorSubscriptionManager()
public EnactorSubscriptionManager(int port)
Method Detail |
public boolean addEnactor(Enactor r) throws EnactorException
r
- enactor to be added.
EnactorException
public boolean removeEnactor(Enactor r) throws EnactorException
r
- enactor to be removed.
EnactorException
protected void addEnactorReference(EnactorReference rwr) throws EnactorException
rwr
- the EnactorReference to add.
SituationException
- if the Enactor is not registered with the ESM.
EnactorException
protected void removeEnactorReference(EnactorReference rwr) throws EnactorException
rwr
- the EnactorReference to be removed.
EnactorException
protected void fireAddEventsForAll(Enactor e, EnactorListener sml)
sml
- protected BaseObject getBaseObject()
public DataObject executeWidgetService(java.lang.String subscriptionId, java.lang.String serviceName, java.lang.String functionName, Attributes input)
public void handleIndependentReply(IndependentCommunication independentCommunication)
Handler
handleIndependentReply
in interface Handler
public DataObject handle(java.lang.String subscriptionId, DataObject data) throws InvalidMethodException, MethodException
Handler
handle
in interface Handler
data
- DataObject containing the data for the widget callback
InvalidMethodException
- if the specified callback can't be found
MethodException
- is thrown if the specified callback can not be
executed successfullyprotected void init()
protected void handleNewComponent(ComponentDescription cd)
cd
- description of component to be registeredprotected void subscribe(ComponentDescription cd, EnactorReference rwr)
protected void unsubscribe(java.lang.String subscriptionId)
protected void updateWidgetSubscriptionCondition(java.lang.String subscriptionId)
protected java.util.Collection sendDiscovererAttributeQuery(AbstractQueryItem q)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |