Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

EventHandler questions

Looking for advice/examples for creating an EventHandler plugin to send a notification to an external app when a work item is closed.

2 Questions:

1. Looking at the other process articles, such as: https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample
it isn't clear to me whether my plugin should have an Activator created or not. The instructions in the example article say to check the Singleton and "auto-activate" check boxes. The plugin wizard must have changed in 3.5 because there's no Singleton check box. I am assuming that Activator==auto-activate (but it could be the reverse). Anyone know the answer?

2. Are there any examples floating around of an EventHandler plugin? I'd like see one and haven't been able to find any.

-Sky

0 votes



5 answers

Permanent link
On Fri, 25 Sep 2009 18:37:59 +0000, sky wrote:

Looking for advice/examples for creating an EventHandler plugin to send
a notification to an external app when a work item is closed.

2 Questions:

1. Looking at the other process articles, such as:
https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample
it isn't clear to me whether my plugin should have an Activator created
or not. The instructions in the example article say to check the
Singleton and "auto-activate" check boxes. The plugin wizard must have
changed in 3.5 because there's no Singleton check box. I am assuming
that Activator==auto-activate (but it could be the reverse). Anyone know
the answer?

2. Are there any examples floating around of an EventHandler plugin? I'd
like see one and haven't been able to find any.

-Sky

Have you also checked for this option in the manifest (Manifest.mf/
plugin.xml) editor? I'm on Eclipse 3.4, but for me there are two options
on the Overview tab: "Activate this plug-in when one of its classes is
loaded" and "This plug-in is a singleton". Both of those should be
checked.

--
Jared Burns
Jazz Process Team

0 votes


Permanent link
I think there is away to register a listener using an extension point declared in com.ibm.team.repository.client which would cause your plugin to be loaded and your listener to handle the events of when someone connects/disconnects, logs in/logs out from a repository. I don't have access to the source code currently. I will reply tomorrow with an example.

0 votes


Permanent link
Here is an example:

<extension>
<listener>
</listener>
</extension>

The listener class must extend com.ibm.team.repository.client.util.IListener

In the above example the listener will notified about repository connections being added and removed. Hope this helps.

0 votes


Permanent link
<extension
point="com.ibm.team.repository.client.eventListener">
<listener
eventCategory="state"
listenerClass="com.ibm.team.repository.client.tests.events.DeclarativeListenerTest$Listener">
</listener>
</extension>

0 votes


Permanent link
For listening to repository connection additions and removals use:
eventCategory="repositories"

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952

Question asked: Sep 25 '09, 2:29 p.m.

Question was seen: 5,952 times

Last updated: Sep 25 '09, 2:29 p.m.

Confirmation Cancel Confirm