The Java application is responsible for periodic checking of the events from the custom server. By calling waitForEvent with a timeout (in seconds), the application can pick up any events in the queue. If an event has already been sent to the application from the custom server, waitForEvent will return immediately and the event can be retrieved by calling getEvent on the returned CTICiscoReturn object. The status (getStatus on the returned object) should also be checked to confirm a successful status value of 0.
CTICiscoReturn waitForEvent(Integer Timeout);