Interface OSCListener


  • public interface OSCListener
    The OSCListener interface is used to register a client to an OSCReceiver object which will be notified when an incoming message was received.

    See OSCReceiver for a code example.

    Note that these methods are typically called from the OSC receiver thread which is not the regular AWT event dispatcher thread. You may often want to defer actual code to the event thread. You can do this by adding the received messages to a list and invoking the actual code using EventQueue.invokeLater(). This is particularly required when dealing with GUI processes which require methods to be called in the event thread. A future version of NetUtil may include a utility deferrer class.

    Version:
    0.24, 11-Sep-05
    Author:
    Hanns Holger Rutz
    See Also:
    OSCReceiver, java.awt.EventQueue#invokeLater( Runnable )
    • Method Detail

      • messageReceived

        void messageReceived​(OSCMessage msg,
                             SocketAddress sender,
                             long time)
        Called when a new OSC message arrived at the receiving local socket.
        Parameters:
        msg - the newly arrived and decoded message
        sender - who sent the message
        time - the time tag as returned by OSCBundle.getTimeTag() ; or OSCBundle.NOW if no time tag was specified or the message is expected to be processed immediately