import com.cmlabs.air.JavaAIRPlug; import com.cmlabs.air.Message; public class Bob { /*---------------------------------------------- --------- Member variables -------------- ----------------------------------------------*/ private JavaAIRPlug m_obPlug = new JavaAIRPlug( "Bob", "localhost", 10000 ); /*---------------------------------------------- ----------- Constructors -------------- ----------------------------------------------*/ /*---------------------------------------------- ---------- Get & Set Functions ---------- ----------------------------------------------*/ /*---------------------------------------------- ------------ Functions -------------- ----------------------------------------------*/ public void runModule() { postHello(); while(true) { Message obMessage = m_obPlug.waitForNewMessage( 100 ); if( obMessage != null ) { if( obMessage.type.equalsIgnoreCase( "Intro.AI.Communication.Greeting.Response") ) { System.out.println( "Got response" ); } } } } private void postHello() { m_obPlug.postMessage( "WB1", "Intro.AI.Communication.Greeting", "Hello", "English", "" ); } public static void main( String[] args ) { Bob obBob = new Bob(); obBob.runModule(); } }