LibMuse 6.0.2
com.choosemuse.libmuse.MuseErrorListener Class Referenceabstract

Public Member Functions

abstract void receiveError (Error error)

Detailed Description

Listens for Muse Error packets.

Member Function Documentation

§ receiveError()

abstract void com.choosemuse.libmuse.MuseErrorListener.receiveError ( Error  error)

Handler method for Muse error packets. Packet is sent iff muse receives an exception.

Generally if an error occurred, LogListener.receiveLog() will be called with a LogPacket of "error" severity. It is therefore not usually necessary or advisable to print log messages for errors received by this method. Rather, this handler should take actions like alerting users or deciding to end a session.

It is important that you do not perform any computation intensive tasks in this callback. This would result in significant delays in all the listener callbacks from being called. You should delegate any intensive tasks to another thread or schedule it to run with a delay through handler/scheduler for the platform.

However, you can register/unregister listeners in this callback. All previously registered listeners would still receive callbacks for this current event. On subsequent events, the newly registered listeners will be called. For example, if you had 2 listeners 'A' and 'B' for this event. If, on the callback for listener A, listener A unregisters all listeners and registers a new listener 'C' and then in the callback for listener 'B', you unregister all listeners again and register a new listener 'D'. Then on the subsequent event callback, only listener D's callback will be invoked.

errorThe error encountered.

The documentation for this class was generated from the following file: