[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
xmlblaster TODO list: 'Client should be able to query which subscriptions he has'
Hello Marcel
After the logged-in info, I wanted to be able to see the subscription list
of the clients.
I have played a little with the code and I have a proposal (I can send the
modif tomorrow, need to re-check it):
- In ClientInfo: I have added two Vectors to keep the 'SubscriptionInfo' and
the 'SubscriptionInfo.UniqueKey'
+ 3 functions:
public void addSubscription(SubscriptionInfo subs)
public int removeSubscription(SubscriptionInfo subs)
public String listSubscriptions()
- in RequestBroker: I call theses function on the clientInfo inside the
unSubscribe() and Subscribe() methods.
in the MessageUnit[] get() function I have added a hack to
intercept a key like '__sys__SubscriptionList'
if (xmlKey.getKeyOid().equals("__sys__SubscriptionList"))
//GL: I want to get my subscription list!!
MessageUnit msg[]=new MessageUnit[1];
msg[0]=new
MessageUnit("<SubscriptionList></SubscriptionList>",clientInfo.listSubscript
ions().getBytes(),"<qos></qos>");
return msg;
}
the clientInfo.listSubscriptions() return something like this:
<SubscriptionsList>
<SubscriptionInfo
id='Subscription-IIOP:0110210C301B294C200B-MyWebApp.MyServer.control'>
<clientInfo id='Services_Status'/>
<xmlKey oid='MyWebApp.MyServer.control'/>
<SubscribeQoS>
</SubscribeQoS>
<UnSubscribeQoS></UnSubscribeQoS>
<msgUnitHandler id='MyWebApp.MyServer.control'/>
<creationTime>May 30, 2001 6:57:21 PM</creationTime>
</SubscriptionInfo>
<SubscriptionInfo
id='Subscription-IIOP:0110210C301B294C200B-__sys__UserList'>
<clientInfo id='Services_Status'/>
<xmlKey oid='__sys__UserList'/>
<SubscribeQoS>
</SubscribeQoS>
<UnSubscribeQoS></UnSubscribeQoS>
<msgUnitHandler id='__sys__UserList'/>
<creationTime>May 30, 2001 6:57:22 PM</creationTime>
</SubscriptionInfo>
</SubscriptionsList>
First I had problem with the subscription with 'xpath', but now afaik it's
ok.
If you think it's an acceptable solution I send you the modified classes.
They was no activity lately(mailing list), is there some new stuffs
arround??
Best regards
Gilles Lavaux