Manager API - Java - timeout on executing a CLI command

I’m Using
=> Asterik 1.8
=> asterisk-java-0.1.jar

Can anybody give me an example java manager class to execute a CLI command.
Say, “queue show” and how do I capture it.

my code:

System.out.println("************** after login");

CommandAction commandAction = new CommandAction();
commandAction.setCommand(“queue show”);
CommandResponse response = (CommandResponse) managerConnection.sendAction(commandAction, 10000);

Logs in fine, but when ‘sendAction’ is executed, the action request gets timed-out…

Pls pls help…