Asked • 04/17/19

Can I add listeners/publisher subscriber to JAXB objects?

I have a multithreaded application using JAXB. The JAXB object represent state of other system hardware. I have a thread monitoring the system hardware, and it updates the JAXB objects with the setters to update the state. I have another chunk of code that is supposed to "do something" when the state of an object changes. I'm wondering how to set up event listeners, or some sort of publisher subscriber scheme, so that when a JAXB object changes state, the appropriate response to the change is kicked off. I have not seen anything describing how something could register as a listener with a JAXB object.

1 Expert Answer

By:

Rize S. answered • 03/23/23

Tutor
New to Wyzant

Senior IT Certified Trainer, IT Developer & DBA Administrator

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.