|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.sciss.jcollider.OSCResponderNode
public class OSCResponderNode
Similar operation as the SClang class
of the same name, but slightly different implementation,
based on the new OSCMultiResponder class
and NetUtil.
As of v0.29 the creator signature had to be changed to use a Server instead
of a network address, unfortunately (a side effect of using OSCClient in Server
and OSCMultiResponder). So you may need to update old code.
| Nested Class Summary | |
|---|---|
static interface |
OSCResponderNode.Action
|
| Constructor Summary | |
|---|---|
OSCResponderNode(Server s,
java.lang.String cmdName,
de.sciss.net.OSCListener action)
Creates a new responder node to listen for messages coming in from the given server. |
|
OSCResponderNode(Server s,
java.lang.String cmdName,
OSCResponderNode.Action action)
Creates a new responder node to listen for messages coming in from the given server. |
|
| Method Summary | |
|---|---|
OSCResponderNode |
add()
Adds the node to the list of actively listening nodes. |
java.lang.String |
getCommandName()
Queries the name which is used as the message filter |
boolean |
isListening()
Queries the node's state. |
void |
messageReceived(de.sciss.net.OSCMessage msg,
java.net.SocketAddress sender,
long time)
This method is called as part of the implementation of the OSCListener
interface. |
OSCResponderNode |
remove()
Removes the node from the list of actively listening nodes. |
OSCResponderNode |
removeWhenDone()
Tags the node to remove itself after the next unfiltered message arrived. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OSCResponderNode(Server s,
java.lang.String cmdName,
de.sciss.net.OSCListener action)
After creating the responder, the add
method has to be called separately to actually start
the listening process.
s - server of incoming messagescmdName - name of the OSC command at whose
arrival the action is invokedaction - the action's messageReceived
method is called upon message reception.
Note that just as specified in the
OSCListener interface, the action
should not assume to be in any particular thread.
The current implementation calls the action in the
OSC listening thread, but this is not guaranteed.
Calls to Swing components should be deferred appropriately.Server,
add()
public OSCResponderNode(Server s,
java.lang.String cmdName,
OSCResponderNode.Action action)
After creating the responder, the add
method has to be called separately to actually start
the listening process.
s - server of incoming messagescmdName - name of the OSC command at whose
arrival the action is invokedaction - the action's respond
method is called upon message reception.
Note that just as specified in the
OSCListener interface, the action
should not assume to be in any particular thread.
The current implementation calls the action in the
OSC listening thread, but this is not guaranteed.
Calls to Swing components should be deferred appropriately.Server,
add()| Method Detail |
|---|
public java.lang.String getCommandName()
public OSCResponderNode add()
throws java.io.IOException
isListening first, since this method will
throw an IllegalStateException if you try
to add it twice.
java.lang.IllegalStateException - if the node has already been added
java.io.IOExceptionremove(),
isListening()public boolean isListening()
true if the node is active
(was added), false otherwise
(newly created node or removed)public OSCResponderNode removeWhenDone()
add
method.
public void messageReceived(de.sciss.net.OSCMessage msg,
java.net.SocketAddress sender,
long time)
OSCListener
interface. It dispatches the message to
the action. If removeWhenDone
was called, it will remove the node after
the action returns.
messageReceived in interface de.sciss.net.OSCListenerremoveWhenDone()public OSCResponderNode remove()
java.io.IOException - if there was a problemadd()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||