?? testmsgbean.java
字號:
/**
* Project:ms4j (Message Server for Java)
* Date:2007-3-21
* Authoer : jobsun@gmail.com
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
package com.sunjob.ms4j.sample;
import com.sunjob.ms4j.server.MsgProcesser;
import com.sunjob.ms4j.server.MsgRequest;
import com.sunjob.ms4j.server.MsgResponse;
/**
* @author sunjb
*
*/
public class TestMsgBean implements MsgProcesser {
public TestMsgBean()
{
}
/* (non-Javadoc)
* @see com.sunjob.ms4j.server.MsgProcesser#process(com.sunjob.ms4j.server.MsgRequest, com.sunjob.ms4j.server.MsgResponse)
*/
public void process(MsgRequest request, MsgResponse response)
throws Exception {
String s = (String) request.read();
System.out.println("recv:" + s);
response.write("ok.");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -