cancel
Showing results for 
Search instead for 
Did you mean: 

Temporarily disable events or listeners in code?

bruce_Grant
Elite Collaborator
Elite Collaborator

Is there a simple way to disable an event or a listener temporarily, and then re-enabling on completion (or in the finally block)?

Thanks, Bruce.

1 ACCEPTED ANSWER

Arnaud_Kervern
Confirmed Champ
Confirmed Champ

Hi,

You should be able to disable/enable your listeners with the EventServiceAdmin#setListenerEnabledFlag service.

And you may ensure that you re-enabled them using a finally block.

View answer in original post

1 REPLY 1

Arnaud_Kervern
Confirmed Champ
Confirmed Champ

Hi,

You should be able to disable/enable your listeners with the EventServiceAdmin#setListenerEnabledFlag service.

And you may ensure that you re-enabled them using a finally block.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.