Java Reference
In-Depth Information
print.println( TCPAdapter.SET_ATTRIBUTE );
print.flush();
print.println( "Greeting" );
print.flush();
print.println( "JMXBookAgent:name=TCPCreatedHW" );
print.flush();
print.println( TCPAdapter.ARGS );
print.flush();
print.println( "This is my greeting after being changed" );
print.flush();
print.println( "java.lang.String" );
print.flush();
Thread.sleep(10000);
//get the greeting
print.println( TCPAdapter.GET_ATTRIBUTE );
print.flush();
print.println( "Greeting" );
print.flush();
print.println( "JMXBookAgent:name=TCPCreatedHW" );
print.flush();
System.out.println( in.readLine() );
//invoke printGreeting
print.println( TCPAdapter.INVOKE );
print.flush();
print.println( "printGreeting" );
print.flush();
print.println( "JMXBookAgent:name=TCPCreatedHW" );
print.flush();
print.println( TCPAdapter.SHUTDOWN );
print.flush();
System.out.println( in.readLine() );
}
public static void main(String args[]) throws Exception
{
TCPTester t = new TCPTester( args[0] );
}
}
The output on the agent and from the test program should tell you everything
you need to know. In addition, you can check out the HTML adapter view to see
the results of running the test program.
Search WWH ::




Custom Search