<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_16) on Mon May 18 10:30:51 CEST 2009 -->
<TITLE>
TuioClient
</TITLE>
<META NAME="keywords" CONTENT="TUIO.TuioClient class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="TuioClient";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../TUIO/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../TUIO/TuioCursor.html" title="class in TUIO"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?TUIO/TuioClient.html" target="_top"><B>FRAMES</B></A>
<A HREF="TuioClient.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
TUIO</FONT>
<BR>
Class TuioClient</H2>
<PRE>
java.lang.Object
<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>TUIO.TuioClient</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>com.illposed.osc.OSCListener</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>TuioClient</B><DT>extends java.lang.Object<DT>implements com.illposed.osc.OSCListener</DL>
</PRE>
<P>
The TuioClient class is the central TUIO protocol decoder component. It provides a simple callback infrastructure using the <A HREF="../TUIO/TuioListener.html" title="interface in TUIO"><CODE>TuioListener</CODE></A> 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 <A HREF="../TUIO/TuioListener.html" title="interface in TUIO"><CODE>TuioListener</CODE></A> interface.<P>
<code>
TuioClient client = new TuioClient();<br/>
client.addTuioListener(myTuioListener);<br/>
client.connect();<br/>
</code>
<P>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#TuioClient()">TuioClient</A></B>()</CODE>
<BR>
The default constructor creates a client that listens to the default TUIO port 3333</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#TuioClient(int)">TuioClient</A></B>(int port)</CODE>
<BR>
This constructor creates a client that listens to the provided port</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#acceptMessage(java.util.Date, com.illposed.osc.OSCMessage)">acceptMessage</A></B>(java.util.Date date,
com.illposed.osc.OSCMessage message)</CODE>
<BR>
The OSC callback method where all TUIO messages are received and decoded
and where the TUIO event callbacks are dispatched</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#addTuioListener(TUIO.TuioListener)">addTuioListener</A></B>(<A HREF="../TUIO/TuioListener.html" title="interface in TUIO">TuioListener</A> listener)</CODE>
<BR>
Adds the provided TuioListener to the list of registered TUIO event listeners</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#connect()">connect</A></B>()</CODE>
<BR>
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</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#disconnect()">disconnect</A></B>()</CODE>
<BR>
The TuioClient stops listening to TUIO messages on the configured UDP port</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../TUIO/TuioCursor.html" title="class in TUIO">TuioCursor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#getTuioCursor(long)">getTuioCursor</A></B>(long s_id)</CODE>
<BR>
Returns the TuioCursor corresponding to the provided Session ID
or NULL if the Session ID does not refer to an active TuioCursor</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Vector<<A HREF="../TUIO/TuioCursor.html" title="class in TUIO">TuioCursor</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#getTuioCursors()">getTuioCursors</A></B>()</CODE>
<BR>
Returns a Vector of all currently active TuioCursors</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../TUIO/TuioObject.html" title="class in TUIO">TuioObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#getTuioObject(long)">getTuioObject</A></B>(long s_id)</CODE>
<BR>
Returns the TuioObject corresponding to the provided Session ID
or NULL if the Session ID does not refer to an active TuioObject</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Vector<<A HREF="../TUIO/TuioObject.html" title="class in TUIO">TuioObject</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#getTuioObjects()">getTuioObjects</A></B>()</CODE>
<BR>
Returns a Vector of all currently active TuioObjects</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#isConnected()">isConnected</A></B>()</CODE>
<BR>
Returns true if this TuioClient is currently connected.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#removeAllTuioListeners()">removeAllTuioListeners</A></B>()</CODE>
<BR>
Removes all TuioListener from the list of registered TUIO event listeners</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../TUIO/TuioClient.html#removeTuioListener(TUIO.TuioListener)">removeTuioListener</A></B>(<A HREF="../TUIO/TuioListener.html" title="interface in TUIO">TuioListener</A> listener)</CODE>
<BR>
Removes the provided TuioListener from the list of registered TUIO event listeners</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="TuioClient()"><!-- --></A><H3>
TuioClient</H3>
<PRE>
public <B>TuioClient</B>()</PRE>
<DL>
<DD>The default constructor creates a client that listens to the default TUIO port 3333
<P>
</DL>
<HR>
<A NAME="TuioClient(int)"><!-- --></A><H3>
TuioClient</H3>
<PRE>
public <B>TuioClient</B>(int port)</PRE>
<DL>
<DD>This constructor creates a client that listens to the provided port
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>port</CODE> - the listening port number</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="connect()"><!-- --></A><H3>
connect</H3>
<PRE>
public void <B>connect</B>()</PRE>
<DL>
<DD>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
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="disconnect()"><!-- --></A><H3>
disconnect</H3>
<PRE>
public void <B>disconnect</B>()</PRE>
<DL>
<DD>The TuioClient stops listening to TUIO messages on the configured UDP port
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isConnected()"><!-- --></A><H3>
isConnected</H3>
<PRE>
public boolean <B>isConnected</B>()</PRE>
<DL>
<DD>Returns true if this TuioClient is currently connected.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if this TuioClient is currently connected</DL>
</DD>
</DL>
<HR>
<A NAME="addTuioListener(TUIO.TuioListener)"><!-- --></A><H3>
addTuioListener</H3>
<PRE>
public void <B>addTuioListener</B>(<A HREF="../TUIO/TuioListener.html" title="interface in TUIO">TuioListener</A> listener)</PRE>
<DL>
<DD>Adds the provided TuioListener to the list of registered TUIO event listeners
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the TuioListener to add</DL>
</DD>
</DL>
<HR>
<A NAME="removeTuioListener(TUIO.TuioListener)"><!-- --></A><H3>
removeTuioListener</H3>
<PRE>
public void <B>removeTuioListener</B>(<A HREF="../TUIO/TuioListener.html" title="interface in TUIO">TuioListener</A> listener)</PRE>
<DL>
<DD>Removes the provided TuioListener from the list of registered TUIO event listeners
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the TuioListener to remove</DL>
</DD>
</DL>
<HR>
<A NAME="removeAllTuioListeners()"><!-- --></A><H3>
removeAllTuioListeners</H3>
<PRE>
public void <B>removeAllTuioListeners</B>()</PRE>
<DL>
<DD>Removes all TuioListener from the list of registered TUIO event listeners
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTuioObjects()"><!-- --></A><H3>
getTuioObjects</H3>
<PRE>
public java.util.Vector<<A HREF="../TUIO/TuioObject.html" title="class in TUIO">TuioObject</A>> <B>getTuioObjects</B>()</PRE>
<DL>
<DD>Returns a Vector of all currently active TuioObjects
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a Vector of all currently active TuioObjects</DL>
</DD>
</DL>
<HR>
<A NAME="getTuioCursors()"><!-- --></A><H3>
getTuioCursors</H3>
<PRE>
public java.util.Vector<<A HREF="../TUIO/TuioCursor.html" title="class in TUIO">TuioCursor</A>> <B>getTuioCursors</B>()</PRE>
<DL>
<DD>Returns a Vector of all currently active TuioCursors
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a Vector of all currently active TuioCursors</DL>
</DD>
</DL>
<HR>
<A NAME="getTuioObject(long)"><!-- --></A><H3>
getTuioObject</H3>
<PRE>
public <A HREF="../TUIO/TuioObject.html" title="class in TUIO">TuioObject</A> <B>getTuioObject</B>(long s_id)</PRE>
<DL>
<DD>Returns the TuioObject corresponding to the provided Session ID
or NULL if the Session ID does not refer to an active TuioObject
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an active TuioObject corresponding to the provided Session ID or NULL</DL>
</DD>
</DL>
<HR>
<A NAME="getTuioCursor(long)"><!-- --></A><H3>
getTuioCursor</H3>
<PRE>
public <A HREF="../TUIO/TuioCursor.html" title="class in TUIO">TuioCursor</A> <B>getTuioCursor</B>(long s_id)</PRE>
<DL>
<DD>Returns the TuioCursor corresponding to the provided Session ID
or NULL if the Session ID does not refer to an active TuioCursor
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an active TuioCursor corresponding to the provided Session ID or NULL</DL>
</DD>
</DL>
<HR>
<A NAME="acceptMessage(java.util.Date, com.illposed.osc.OSCMessage)"><!-- --></A><H3>
acceptMessage</H3>
<PRE>
public void <B>acceptMessage</B>(java.util.Date date,
com.illposed.osc.OSCMessage message)</PRE>
<DL>
<DD>The OSC callback method where all TUIO messages are received and decoded
and where the TUIO event callbacks are dispatched
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>acceptMessage</CODE> in interface <CODE>com.illposed.osc.OSCListener</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - the time stamp of the OSC bundle<DD><CODE>message</CODE> - the received OSC message</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../TUIO/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../TUIO/TuioCursor.html" title="class in TUIO"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?TUIO/TuioClient.html" target="_top"><B>FRAMES</B></A>
<A HREF="TuioClient.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>