|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectTUIO.TuioClient
public class TuioClient
The TuioClient class is the central TUIO protocol decoder component. It provides a simple callback infrastructure using the TuioListener interface.
In order to receive and decode TUIO messages an instance of TuioClient needs to be created. The TuioClient instance then generates TUIO events
which are broadcasted to all registered classes that implement the TuioListener interface.
TuioClient client = new TuioClient();
client.addTuioListener(myTuioListener);
client.connect();
| Constructor Summary | |
|---|---|
TuioClient()
The default constructor creates a client that listens to the default TUIO port 3333 |
|
TuioClient(int port)
This constructor creates a client that listens to the provided port |
|
| Method Summary | |
|---|---|
void |
acceptMessage(java.util.Date date,
com.illposed.osc.OSCMessage message)
The OSC callback method where all TUIO messages are received and decoded and where the TUIO event callbacks are dispatched |
void |
addTuioListener(TuioListener listener)
Adds the provided TuioListener to the list of registered TUIO event listeners |
void |
connect()
The TuioClient starts listening to TUIO messages on the configured UDP port All reveived TUIO messages are decoded and the resulting TUIO events are broadcasted to all registered TuioListeners |
void |
disconnect()
The TuioClient stops listening to TUIO messages on the configured UDP port |
TuioCursor |
getTuioCursor(long s_id)
Returns the TuioCursor corresponding to the provided Session ID or NULL if the Session ID does not refer to an active TuioCursor |
java.util.Vector<TuioCursor> |
getTuioCursors()
Returns a Vector of all currently active TuioCursors |
TuioObject |
getTuioObject(long s_id)
Returns the TuioObject corresponding to the provided Session ID or NULL if the Session ID does not refer to an active TuioObject |
java.util.Vector<TuioObject> |
getTuioObjects()
Returns a Vector of all currently active TuioObjects |
boolean |
isConnected()
Returns true if this TuioClient is currently connected. |
void |
removeAllTuioListeners()
Removes all TuioListener from the list of registered TUIO event listeners |
void |
removeTuioListener(TuioListener listener)
Removes the provided TuioListener from the list of registered TUIO event listeners |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TuioClient()
public TuioClient(int port)
port - the listening port number| Method Detail |
|---|
public void connect()
public void disconnect()
public boolean isConnected()
public void addTuioListener(TuioListener listener)
listener - the TuioListener to addpublic void removeTuioListener(TuioListener listener)
listener - the TuioListener to removepublic void removeAllTuioListeners()
public java.util.Vector<TuioObject> getTuioObjects()
public java.util.Vector<TuioCursor> getTuioCursors()
public TuioObject getTuioObject(long s_id)
public TuioCursor getTuioCursor(long s_id)
public void acceptMessage(java.util.Date date,
com.illposed.osc.OSCMessage message)
acceptMessage in interface com.illposed.osc.OSCListenerdate - the time stamp of the OSC bundlemessage - the received OSC message
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||