Howdy
I've been struggling/sweating for quite some time now how I can get to the name/id that was used when the client connected to FluorineFx through Flex's mx:Consumer object (amf messaging polling). For example, I want to find the "charlie" used in:
consumer.subscribe("charlie");
I've tried
FluorineContext.Current.Client.Id
and other permutations of that, but it only gives me the internal Fluorine id (hex-string like 43bcdec1a9...), not "charlie". Reading lots of Fluorine code led me frustratingly to some abomination like
(((MessageDestination)msgBroker.GetDestination(DESTINATION_ID))).SubscriptionManager.GetSubscribers(asyncMsg);
which works, except that it won't compile because MessageDestination is internal.
Also, by debugging the message in the Flex client, I see that it in fact contains a clientId property (and a weird header called 'DSDstClientId') which contains the real thing. So apparently it is there somewhere, but where?
So please, if possible, shed some light on this. Thanks!
(The full story is that I'm implementation a simple locking scheme for my Flex clients and I need to send back the userid to all clients telling who's locking the object at the moment, so each client must know if they are holding the lock or not by comparing their own userid (ie "charlie") to the userid returned in my "object_is_locked_by: 43bcdec1a9..." message)
/Martin
_______________________________________________
fluorine mailing list
fluorine@...
http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com