public class OSCMultiResponder extends Object implements de.sciss.net.OSCListener
OSCMultiResponder
mimics the SClang counter part only superficially.
It absorbs the whole OSCResponder class
and is based on the NetUtil OSC library.
While the super class OSCReceiver allows
only a coarse message filtering, using the simple
OSCListener interface, the OSCMultiResponder
maintains a map of OSC command names and listeners
(OSCResponderNodes) who wish to be
informed about only this particular type of messages.
When a new node is added using the addNode
method, the static list of all multi responders is searched
for the given server address. If it exists, the corresponding
multi responder is used, otherwise a new multi responder is
created. Likewise, when removeNode is called,
the multi responder checks if all nodes have been removed,
and if so will terminate the OSC receiver.
To keep the responder permanently active, the server creates a multi responder for its address upon instantiation.
| Modifier | Constructor and Description |
|---|---|
protected |
OSCMultiResponder(de.sciss.net.OSCClient c)
Creates a new responder for the given
OSCClient. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addNode(OSCResponderNode node) |
protected void |
dispose() |
protected Object |
getSync() |
void |
messageReceived(de.sciss.net.OSCMessage msg,
SocketAddress sender,
long time) |
protected void |
removeNode(OSCResponderNode node) |
protected OSCMultiResponder(de.sciss.net.OSCClient c)
throws IOException
OSCClient. This is done by the server to
create a permanent listener. Users should
use the OSCResponderNode class
instead.c - the client to who's receiver we should listenIOExceptionOSCResponderNodeprotected Object getSync()
protected void addNode(OSCResponderNode node) throws IOException
IOExceptionprotected void removeNode(OSCResponderNode node)
protected void dispose()
public void messageReceived(de.sciss.net.OSCMessage msg,
SocketAddress sender,
long time)
messageReceived in interface de.sciss.net.OSCListenerCopyright © 2015–2022 SciJava. All rights reserved.