How do I notify a MATLAB object of an event in a Java object? <p>For simplicity, say I have a Java object which generates a random number at randomly spaced time intervals. I wish to have a MATLAB object notified every time one of these random numbers is generated (so that the MATLAB object can then perform some task on the data).</p> <p>How can I implement something like this? How can I have the Java object notify a MATLAB object that something has happened?</p> <p>P.S. I am a strong programmer in MATLAB but fairly new to Java.</p>