/** * 发送消息 */ public void sendMessage() { /**当前线程的名称**/ System.out.println(Thread.currentThread().getName()); /**创建一个新的线程发送消息**/ Thread thread = new Thread(this); thread.start(); /**当前线程继续执行**/ System.out.println("Message has been sent by Local~!"); }
} /**处理完其他事情,现在来处理消息**/ System.out.println(msg); System.out.println("I hava executed the message by Local"); /**执行回调**/ callBack.execute(new String[]{"Nice to meet you~!"}); }