Hi Andreas, I'm a colleague of Matthias and as he is not at office today, I will give you some details about the required global event:
our component (let's call it A) processes TextDocuments. So it listens for "OnNew"-Events and starts the asynchron processing of the documents (in new Threads). This works fine, but now we need to synchronize our component with an other component (let's call it B) that does a similar job and requires the result of A. We are now searching for a mechanism to broadcast a kind of synchronization-event. This mechanism should of course be as most independent of our custom component and as most integrable into the generic OOo-Mechanisms. Using the globalEventBroadcaster is one approach we have in mind, but there might still be other other ways. We also considered implementing one of the XComponent- or XEventBroadcaster-Interfaces but this seems to be a very component-specific thing as the corresponding listener has to be registered on exactly one specific object (our component A). Broadcasting an event via GlobalEventBroadcaster seems to be a more generic way as there is one central point for registering the listener. To avoid the need of a complex naming-scheme for the event-names, I would prefer a generic event like "OnCustomProcessingFinished" (with an event-object containing information about the custom component and the processed document). regards, Christoph On Nov 16, 2007 9:03 AM, Andreas Schlüns <[EMAIL PROTECTED]> wrote: > Hello Matthias, > > > Is it possible for our custom Java component to broadcast events via > > the GlobalEventBroadcaster, so that listeners listening on it will > > receive them? > > Yes it's possible ... but till now an undocumented feature. > The problem behind: who will be responsible to make sure that all event > names will be non ambigous ? E.g. you shouldnt broadcast "OnNew" with a > different meaning then now .-) Nobody wish to have a complex naming > schema for such event names - do you ? > > I think it would be the best to let OOo core control such events. > Can you please provide more details about the feature you wish to > implement ... before I tell you something more about the "tricky way for > broadcasting own document events" ? > > > > > Matthias > > Regards > Andreas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]