if(state==LoginState.LOGIN_SUCCESS){ //登录成功
System.out.println("登录成功,正在发送消息至 "+args[2]+",请稍候...");
ActionEventFuture future = new ActionEventFuture(); //建立一个Future来等待操作事件
client.sendChatMessage(Long.parseLong(args[2]), new Message(args[3]), future);
ActionEvent event = future.waitActionEventWithoutException(); //等待操作完成事件
switch(event.getEventType()){
case SUCCESS:
SendChatMessageSuccessEvent evt = (SendChatMessageSuccessEvent) event;
if(evt.isSendToMobile()){